[geotk] Circle Polygon

Adrian Custer adrian.custer at geomatys.fr
Tue Sep 15 04:44:57 EDT 2009


Hey Thuns,

For the discussion to be precise, we need more precision since '2000m'
could be relative to lots of things. 

First, you do understand that JTS is merely drawing circles in a
cartesian space and they will therefore, as created, be identical
regardless of position relative to the origin or of 'crs' (which JTS
ignores), right?

So, the circles *created* by JTS will be (1) circular and (2) the same
size no matter where you draw them. Mercator, on the other had,
stretches out as you move away from the equator. So the circle, if
plotted directly on top of a map without transformation will describe a
non-circular shape *relative to the ground* and which has a smaller
radius polewards than equator-wards. Is this what you see, or is your
JTS circle transformed prior to display? If the latter, can you describe
what you are seeing?

I would not be surprised at all to have mercator introducing a 10%
difference in distance away from the equator. If you moved north of 80
\deg north, you would see a massive difference in the two merdian radii.
Unless I am understanding you incorrectly, it sounds to me like the
behaviour is acting as I would expect it to.

--adrian


On Tue, 2009-09-15 at 09:55 +0200, theuns wrote:
> HI Martin
> I am trying to create a circle polygon, by using the JTS geometry
> point.buffer(int) method.
> The code i use, to achieve this is as follows.
> 
> Geometry buffer = point_geom.buffer(2000) ;
> 
> I suspected the circular buffer  to be 2000m radius , since a am using
> EPSG:3395 , the Mercator projection, but the circle is 1800m in
> radius.
> 
> I collaborated with Johann, and he suggested that i must try to create a
> circle closer to the equator, and see what the result there is , and yes
> the results is better, the circle do have a radius of 2000m.
> 
> So the more south or north i create the circle it will render less than
> the input radius.
> I have a suspicion that if i work the values for the circle out manually
> i will end up with the same result, because of the renderer using the
> same CRS to render. 
> 
> 1.What exactly is the cause of this?
> 2.Is there a way to get the circle rendered correctly?
> 3.Is there maybe a error value to be added to the radius, the more you
> move away from the equator?
> 
> Thank you in advance
> 
> Theuns Heydenrych
>   
> 
> 
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit



More information about the Geotoolkit mailing list