We were given city administrative boundary data as .shp files with the permission to import those to OSM / use on AddisMap.com. I have used the Ogr2Osm scripts to convert this data to the OSM format. I tried all three versions (old SVN, UVM rewrite, pnorman's updated version) which are linked in the Wiki. All of them produce the same results, but when I load the data in JOSM and compare them with the existing city data (Addis Ababa, Ethiopia), the imported data seems to be shifted by 176m, 222° (I measured this by drawing a way from the point where it should be to the imported point in JOSM) When using Ogr2Osm it produces the following output:
The .prj file we received has the following content:
The data was exported from ArcGIS. What can be the source for the error? How can it be fixed? EDIT: Same problem when I use ogr2ogr and shp2osm
Semi cross-posted to Stackexchange GIS asked 03 Dec '12, 13:00 AddisMap_Ale... edited 07 Apr '15, 09:54 |
One Answer:
As found out on GIS.stackexchange I need to specify the projection string manually, because the ogr library does not detect it properly / does not do the datum conversion:
answered 04 Dec '12, 14:26 AddisMap_Ale... |
I think we used to have a similar problem with EPSG:27700.
@SK53: did you solve it the same way? Or another?
yes I added the explicit Helmert factors (the 7 towgs84 parameters), Chris Hill blogged about it at the time (http://chris-osm.blogspot.co.uk/2010/04/getting-boundaries-right.html), but IIRC there were still bugs in proj4 (and therefore ogr2ogr, PostGIS) relating to WGS84 and OSGB transformations in 2011.
A useful test if you have postgis, but I expect can be done with ogr2ogr is to use a well-defined point and perform transforms between various projections to test accuracy (particularly if there is a non-porj4 transformation available for comparison, as was the case for OSGB).