[gdal-dev] gdalsrsinfo Incorrect or Inconsistent results reporting EPSG codes

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Sun Nov 3 23:55:30 PST 2019


If it happens to help, by opening the .img file with a text editor I found
this ESRI style WKT from it:

COMPD_CS["unknown",PROJCS["NAD_1983_2011_UTM_Zone_14N",GEOGCS["GCS_NAD_1983_2011",DATUM["D_NAD_1983_2011",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-99.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]],VERTCS["NAVD_1988",VDATUM["North_American_Vertical_Datum_1988",AUTHORITY["EPSG","5103"]],PARAMETER["Vertical_Shift",0.0,AUTHORITY["Esri","100006"]],PARAMETER["Direction",1.0,AUTHORITY["Esri","100007"]],UNIT["Meter",1.0,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","5703"]]]

WKT does not include code for the projected coordinate system so I think
that GDAL and the HFA driver must find it by studying the parameters.
Perhaps they fail now with these two:

GEOGCS["GCS_NAD_1983_2011",DATUM["D_NAD_1983_2011"

-Jukka-


jratike80 wrote
> Hi,
> 
> I guess that the Erdas .img format
> https://gdal.org/drivers/raster/hfa.html
> has somewhat limited support for projections
> https://github.com/OSGeo/gdal/blob/master/gdal/frmts/hfa/hfadataset.cpp.
> 
> At least there is a difference in behavior with GeoTIFF and img:
> 
> gdal_translate -of Gtiff -a_srs epsg:6343 DEM_14T_MK_4636.img
> DEM_14T_MK.tif
> gdalsrsinfo DEM_14T_MK.tif -o epsg
> EPSG:6343
> 
> gdal_translate -of HFA -a_srs epsg:6343 DEM_14T_MK_4636.img DEM_14T_MK.img
> gdalsrsinfo DEM_14T_MK.img -o epsg
> EPSG:26914
> 
> Perhaps using GeoTIFF format instead of img could be a workaround? 
> 
> -Jukka Rahkonen-





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list