如何处理 WKT 中的 Circle? [英] How to handle Circle in WKT?

查看:135
本文介绍了如何处理 WKT 中的 Circle?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 json 对象

I am having a json object as

区域:CIRCLE (28.625360369528934 77.2227479486792, 3135.6)

area : CIRCLE (28.625360369528934 77.2227479486792, 3135.6)

如何使用 WKTreader 解析它

how to parse it using WKTreader

请帮忙!!

推荐答案

你需要回到写出来的人那里解释一下 CIRCLE 不是 WKT 标准,他们应该停止生产它.

You need to go back to whoever wrote it out and explain the CIRCLE is not a part of the WKT standard and they should stop producing it.

那么最好的办法是生成一个有很多 (200) 条边的多边形来近似圆,可能使用 JTS 缓冲区方法.

Your best bet then is to generate a polygon with a lot (200) sides that approximates the circle, probably using the JTS buffer method.

Point p = gFactory.createPoint(28.625360369528934 77.2227479486792);
Polygon circle = p.buffer( 3135.6 );

这篇关于如何处理 WKT 中的 Circle?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆