On Wed, Mar 6, 2013 at 3:59 PM, Uli Strötz <[email protected]> wrote:
> Hi Frank, > > The distance is according to ArcGIS 500m. According to Python(OGR) > 29215.31. I was thinking the same, that GDAL gives the distance according > to the Geographic Coordinate System. Is there a way it uses the units of > the Projected Coordinate System (which would be meters)? Or do you know of > another workaround to get the result in meters? > Uli, A lot depends on the precision you need. Options include: 1) Compute normally and multiply by a fixed degrees to meters value to get an approximate distance in meters. A WGS degree is approximately 111111 meters. 2) Transform everything to an appropriate projected coordinate system, and do the distance there. 3) Somehow find the nearest point on the line to the point (I don't see how to do that with ogr.Geometry) and then use a great circle calculator like the PROJ.4 geod command. 4) Do this in PostGIS using the "geography" type instead of "geometry". This is supposed to allow metric operations on spherical geometry. I have no direct experience though. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [email protected] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Software Developer
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
