[OpenLayers-Dev] geodesic measures
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Tue Nov 11 16:10:10 EST 2008
Hey Tim,
great, the one thing I wonder here is if we should not have projection
as a property of a geometry. It would make more sense to me that way
than passing it as an argument to the getGeodesicXXX functions.
I think we had this discussion before but it was never concluded.
http://www.mail-archive.com/dev@openlayers.org/msg02523.html
Best regards,
Bart
Tim Schaub wrote:
> Hey-
>
> A contributor (mwa at sourcepole.ch?) posted a patch for approximating
> geodesic areas for polygons [1].
>
> I have used this algorithm to give geometries a getGeodesicArea method.
> In a similar way, I added a getGeodesicLength method using the
> Vincenty algorithm already in Util.
>
> Combined, these give us handy methods for calculating metrics from our
> geometries as if they were projected onto the earth's surface. Both of
> these calculations require that a projection is provided
> (Geographic/WGS84 is assumed if none is given).
>
> This functionality allows a "geodesic" property to be added to the
> measure control. So, if your map projection is properly set, and if you
> have provided the appropriate definition for that projection so a
> transform to Geographic/WGS84 can be done, you can use the measure
> control to do geodesic measures.
>
> All this is wrapped up in a new patch for ticket 1819 [2]. If anybody
> cares to comment or test it out, that would be appreciated.
>
> Tim
>
> [1] http://trac.openlayers.org/attachment/ticket/1819/area_measurement.patch
>
> [2] http://trac.openlayers.org/ticket/1819
>
>
--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl
More information about the Dev
mailing list