[OpenLayers-Users] Circles

Heidt, Christopher M. CHRISTOPHER.M.HEIDT at saic.com
Mon Dec 8 19:23:01 EST 2008


You are absolutly correct and my frustrations are more centered on specifications than on OpenLayers.
 
You are spot on that having a circle geometry whould mean nothing to the community if it couldn't be represented in the standard specifications like GML, WKT, KML, etc.
It just saddens me that the lack of circle support in the specs has led to work-arounds and abuses that should never have needed to exist.
WKT's lack of circle support lead Oracle to create CURVEPOLYGON which is completely unsupported by anything, even though Oracle outputs it as valid WKT.
 
Although you are correct that a RegularPolygon with many sides can look like a circle, calculations based off that shape can be severly flawed when treated as one.
if i were to make an app that fetched data within a drawn circle, my results could prove to be highly inacurate by the lack of true curveature.
 
________________________________

From: Christopher Schmidt [mailto:crschmidt at metacarta.com]
Sent: Mon 12/8/2008 2:07 PM
To: Heidt, Christopher M.
Cc: users at openlayers.org
Subject: Re: [OpenLayers-Users] Circles



On Mon, Dec 08, 2008 at 01:45:55PM -0500, Heidt, Christopher M. wrote:
> this is definitly a clever aproach, but it is still a work-around for what i consider to be a basic shape.
> I just wonder why i cant have something along the lines of: new Openlayers.Geometry.Circle(lon,lat,radius);

Adding a new Geometry type is about more than just creating the
geometry. What should happen when the GML writer encounters a circle?
How does a renderer which doesn't have circle types as built ins handle
it? etc. etc.

Adding a new Geometry type probably ends up affecting more than a dozen
different classes in OpenLayers in ways that are ill defined. Sure, we
culd make it easier to draw a circle -- but the REgularPolygon ends up
having the same result, with not a very different API than you're
proposing, and has the benefit that it works with all the existing
functionality built around the Simple Features specifications that
OpenLayers vector support is based on.

Is it unfortunate that circles are not a 'default' geometry type in more
specifications? Maybe. But I don't understand why the RegularPolygon --
which creates a visual circle, but has the benefit of being usable in
software other than OpenLayers -- is such a problem.

Help me understand?

Regards,
--
Christopher Schmidt
MetaCarta


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081208/dd8571eb/attachment.html


More information about the Users mailing list