[gdal-dev] UTM local correction for height and distance-to-reference-meridian ?
Even Rouault
even.rouault at spatialys.com
Tue Jan 21 02:44:58 PST 2025
Le 21/01/2025 à 11:37, Thomas Knudsen via gdal-dev a écrit :
> If you plan to transform to a different system anyway, I would
> definitely prefer going to geographical coordinates, and computing the
> length of the geodesic between the two points.
actually no need to do the explicit conversion to geographical
coordinates, if the appropriate SRS is attached to your geometry,
OGRGeometry::get_GeodesicLength() will do the right thing:
https://gdal.org/en/stable/api/ogrgeometry_cpp.html#_CPPv4NK13OGRLineString18get_GeodesicLengthEPK19OGRSpatialReference
Python API:
https://gdal.org/en/stable/api/python/vector_api.html#osgeo.ogr.Geometry.GeodesicLength
Python examples:
https://github.com/OSGeo/gdal/blob/master/autotest/ogr/ogr_geom.py#L4560
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250121/54f337b5/attachment.htm>
More information about the gdal-dev
mailing list