[gdal-dev] units=km not working

Even Rouault even.rouault at spatialys.com
Tue Jan 23 12:11:20 PST 2024


Le 23/01/2024 à 20:56, Wilco K via gdal-dev a écrit :
> 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?

Cf https://proj.org/en/9.3/usage/projections.html#units : "Horizontal 
coordinate system units can be specified using the |+units| keyword 
[...] Note that this does /not/ affect the units of linear parameters 
such as |+x_0| or |+y_0| which should always be specified in meters." .  
This also applies to the +a and +b parameters. Doc enhancement filed in 
https://github.com/OSGeo/PROJ/pull/4010


When you specify +units=km, it just means that you wish the output 
projected coordinates are expressed in km. But this doesn't affect the 
units of any linear parameters of the projection definition.

Even

-- 
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/20240123/7c35aba7/attachment.htm>


More information about the gdal-dev mailing list