[GIS] What can go wrong in UTM to WGS1984 conversion (shifted data)

coordinate systemogr2ogropenstreetmapshapefile

I try to convert .shp files to OSM data with shp2osm and ogr2osm but the output data is shifted.

Semi-Cross-Posting Warning: I have already asked a questions on the OSM help site, but this questions is more theoretical.

The .prj file I have contains the following (line-breaks added for readability) and the source data was saved using ArcGIS:

PROJCS["Adindan_UTM_Zone_37N",
GEOGCS["GCS_Adindan",
DATUM["D_Adindan",
SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",39.0],
PARAMETER["Scale_Factor",0.9996],
PARAMETER["Latitude_Of_Origin",0.0],
UNIT["Meter",1.0]]

I am using ogr2ogr for the coordinate transformation:

ogr2ogr -t_srs WGS84 -s_srs "ESRI::subcities.prj" "subcities_converted.shp" "subcities.shp"

When I finally import the data in the OpenStreetMap editor, the data is shifted by around 176m, 222°.

Does this mean the source data and the .prj file is plain wrong? Or I am doing something wrong on the way?

Best Answer

Adindan UTM 37N is EPSG:20137. Latest build of Quantum Gis has this code incorporated. Alternatively you can use the following proj string:

+proj=utm +zone=37 +ellps=clrk80 +towgs84=-166,-15,204,0,0,0,0 +units=m +no_defs

Full command:

ogr2ogr -t_srs WGS84 \
-s_srs "+proj=utm +zone=37 +ellps=clrk80 +towgs84=-166,-15,204,0,0,0,0 +units=m +no_defs"\
"subcities_converted.shp" "subcities.shp"

Note that the towgs84 parameters are not null.

The prj file only contains the datum information "Adindan", and leaves it to the software to determin the towgs84 parameter. This can go wrong.