[gdal-dev] GetProjectionRef returns invalid projection
Frank Hübenthal
huebenthal at uxis.de
Fri Apr 15 04:27:50 PDT 2022
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
More information about the gdal-dev
mailing list