[gdal-dev] units=km not working

Rahkonen Jukka jukka.rahkonen at maanmittauslaitos.fi
Tue Jan 23 12:14:21 PST 2024


Hi,

Because the units mean the units of the projected coordinates. An example:
https://epsg.io/map#srs=3067-1149&x=295545.168414&y=6836388.322477&z=4&layer=streets
Here x and y are in meters: "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs".

By changing the the units into kilometers the x value would change into 295.545168414 any y into 6836.388322477 but that does not change the size of the Earth.

-Jukka Rahkonen-

Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org> Puolesta Wilco K via gdal-dev
Lähetetty: tiistai 23. tammikuuta 2024 21.57
Vastaanottaja: gdal-dev at lists.osgeo.org
Aihe: [gdal-dev] units=km not working

Hi,

why is units=km not working?

gdaltransform -s_srs EPSG:4326 -t_srs "+proj=stere +lat_0=90 +lon_0=0 +lat_ts=60 +a=6378.14 +b=6356.75 +x_0=0 +y_0=0 +units=km"

The following error is returned:
ERROR 1: PROJ: proj_create_operations: Source and target ellipsoid do not belong to the same celestial body

Converting +a and +b to meters and it does works:
gdaltransform -s_srs EPSG:4326 -t_srs "+proj=stere +lat_0=90 +lon_0=0 +lat_ts=60 +a=6378140 +b=6356750 +x_0=0 +y_0=0"

Any ideas?

Wilco



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240123/ca557780/attachment.htm>


More information about the gdal-dev mailing list