[geotk] Circle Polygon

Adrian Custer acuster at gmail.com
Wed Sep 16 04:48:31 EDT 2009

Hey Theuns,

As Martin says and I tried to point out earlier, you have not really
explained what you are doing. No matter, what you apparently really want
to do is to have a geodetic buffer around a bunch of points. Out to the
horizon, the earth can be considered flat, beyond your 50km, that
assumption starts to fail so you can't use JTS unless you project it.

If I were to tackle your issue, I would leverage the GeodeticCalculator
class to:
1) find the coordinates for a buffer polygon around my points to
whatever approximation of a circle I needed using GeodeticCalculator.
The class has a method where you give it a point, heading and distance
and it will give you the end point, so you just loop on that until you
have all your coordinates, say 36 for every 10degrees of heading for a
primitive 'circle'.
2) you build polygons with those coordinates.
3) you add a layer with those polygons, which you know how to do.

Is that not the kind of thing you are looking for?


On Wed, 2009-09-16 at 10:24 +0200, Martin Desruisseaux wrote:
> theuns a écrit :
> > I displayed a world shapefile using the EPSG:3395 projection.
> > and draw 4 circles with radius 50km.
> > 
> > This is the places(more or less) where i draw them , and i measured the
> > diameter across the with and height, of the circle.
> > 
> > 1. Equator , width +-100km , height +- 100km 
> > 2. Cape Town (SA) , width +-82km , height +- 82km
> > 3. Southern Tip of South America , width +-57km , height +- 57km
> > 4. Northern Part Greenland , width +-14km , height +- 14km
> > 
> > So the circle's diameter does take off further away from the equator,
> > and like Adrian said, it should be egg shaped (eclipses), but the circle
> > stay round?	
> This is true that if the Data CRS is Mercator and the renderer Objective CRS is 
> Geographic (or the converse; Geographic Data CRS and projected Objective CRS), I 
> would expect egg shaped ellipses. If both the Data CRS and Objective CRS are the 
> same projection, then the shape would stay as in the data but I would not expect 
> a change of circle size neither...
> In order to figure out what is happening, I would need to know the rendering 
> chain: data CRS, objective CRS and which API is used for rendering the circles...
> 	Martin
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit

More information about the Geotoolkit mailing list