[gdal-dev] Issue with Robinson projection

Even Rouault even.rouault at spatialys.com
Mon Jan 13 15:08:44 PST 2025


Le 13/01/2025 à 23:36, afernandez via gdal-dev a écrit :
> Hello,
> The following snippet works fine
> #        epsg = 54030
>         epsg = 4326
>         srs = osr.SpatialReference()
>         srs.ImportFromEPSG(epsg)
> However, and when I switch epsg to 54030 (which I believe it's the 
> value for the Robinson projection), it generates the error:
>   File "/usr/lib/python3/dist-packages/osgeo/osr.py", line 772, in 
> ImportFromEPSG
>     return _osr.SpatialReference_ImportFromEPSG(self, *args)
> RuntimeError: PROJ: proj_create_from_database: crs not found

54030 is not a EPSG CRS but a ESRI one, so use 
srs.SetFromUserInput("ESRI:54030")

Even

-- 

http://www.spatialys.com
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250114/b94d710c/attachment.htm>


More information about the gdal-dev mailing list