[gdal-dev] GetProjectionRef returns invalid projection

Even Rouault even.rouault at spatialys.com
Fri Apr 15 04:41:57 PDT 2022


Frank,

please provide a link to such file

Even

Le 15/04/2022 à 13:27, Frank Hübenthal a écrit :
> I use GDAL C++ to load GeoTIFF files. Since I moved to GDAL 3.4 I have 
> problems to get the projection string from some (not all) of these 
> GeoTIFF files. With GDAL 3.2 still something like this was returned:
>
> PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 
> 84",DATUM["WGS_1984",SPHEROID["WGS 
> 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],EXTENSION["PROJ4","+proj=merc 
> +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m 
> +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]
>
> With GDAL 3.4 I get for the same map file only this:
>
> "LOCAL_CS["WGS 84 / 
> Pseudo-Mercator",UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","3857"]]"
>
> I use the projection to create finally a transformation, but 
> OGRCreateCoordinateTransformation returns NULL with the short string 
> from GDAL 3.4 while it was still working with 3.2.
>
> Best regards,
>
> Frank
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list