1

When using ogr2ogr to export from PostGIS to Shapefile a geometry(PolygonZM, 25832) table, the coordinate references system (SRS) is not accurate.

ogrsrsinfo returns the correct SRS (below the SRSs in WKT format from XXX.prj file and from output of gdalsrsinfo -o wkt epsg:25832). Am I doing something wrong?

PS I tried using ogr2ogr -a_srs EPSG:25832, but the WKT in the .prj file is still incorrect.

XXX.prj from ogr2ogr

PROJCS["ETRS89_UTM_zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]

gdalsrsinfo -o wkt epsg:25832

PROJCS["ETRS89 / UTM zone 32N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","25832"]]

2

There are different dialects of WKT for projections as you can read from the manual page of gdalsrsinfo http://www.gdal.org/gdalsrsinfo.html.

.prj files are typically used by ESRI software but your gdalsrsinfo -0 wkt prints OGC WKT. Use -o wkt_esri instead. As you can see the result if different then.

gdalsrsinfo -o wkt epsg:25832 PROJCS["ETRS89 / UTM zone 32N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989", SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]] ,AUTHORITY["EPSG","4258"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000],PARAMETER["false_northing",0], UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH], AUTHORITY["EPSG","25832"]]

gdalsrsinfo -o wkt_esri epsg:25832 PROJCS["ETRS89_UTM_zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989", SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9], PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000], PARAMETER["false_northing",0],UNIT["Meter",1]]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.