JTS does not natively understand geodetic coordinate systems. It assumes
all distances are in the same units as the coordinates used. Therefore
you need to specify the 50 m distance as an equivalent value in decimal
degrees. This varies depending on the location of the centre coordinate.
Also, the generated geometry is only reasonably accurate for small
distance values.
On 9/3/2014 8:13 PM, jingyuwang1 wrote:
> Hi:
> I am a java developer in Autonavi,ShangHai,China.
> Recently,a problem has perplexed me a long time,it is how to create a
> circle on the earth with the giving coordinate and
> radius(121.57090046,31.21557082 and 50 meters ). I sincerely hope to
> get your help!
> The better solution i find in google is the following:
> public static Polygon createCircle(double x, double y, final double
> RADIUS) {
> GeometricShapeFactory shapeFactory = new GeometricShapeFactory();
> shapeFactory.setNumPoints(64);
> shapeFactory.setCentre(new Coordinate(x, y));
> shapeFactory.setSize(RADIUS * 2);
> Polygon circle = shapeFactory.createCircle();
> circle.setSRID(4326);
> return circle;
> }
> but it seem not accurancy,no matter the RADIUS parameter is meters or
> radians. My aim is to get a circle from java JTS such as the follow:
>
> I will be glad to wait for your answer!
> best wish !
> ------------------------------------------------------------------------
> yujin.wang
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
>
>
> _______________________________________________
> Jts-topo-suite-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
>
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2013.0.3485 / Virus Database: 3955/8165 - Release Date: 09/06/14
>
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user