If you don't want to measure an ogr geometry but produce for instance a geotiff in a LDP (low distortion projection), you can just convert to a transverse mercator (without "universal") centred in your area of interest. Makeing a wkt by hand is very easy.
In case you want to consider also the distortion due to height, I recommend either compute a scale factor for your projection (as explained somehow in https://geodesy.noaa.gov/web/science_edu/webinar_series/changes-afoot-after-2022.shtml ) or compute it yourself. For the projection distortion factor (not including height) there is something in PROJ: https://proj.org/en/stable/apps/proj.html#cmdoption-proj-S As a curiosity or helper there is a plugin for QGIS to visualize the factors: https://plugins.qgis.org/plugins/proj_factors_redux/ (Thanks Johannes) On Tue, 21 Jan 2025 at 11:45, Even Rouault via gdal-dev < gdal-dev@lists.osgeo.org> wrote: > > 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. > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/gdal-dev >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev