I would like to import an .osm file into the postgresql database. I used this code to start import:
I have no errors or cleaning ups, but when I open it in QuantumGis from postgresql database the geometry has faults. I dont know why. roads locate in wrong place, polygons are on each others. Is it projection problem? QuantumGis shows WGS84 Mercator EPGS:3395 projection. (I saved a test area from JOSM. It doesnt contain too much value. Its 2MB file.) faults: I could not recognize this coordinates which QGIS shows.Thanks PS: sorry for my bad english asked 29 Sep '13, 11:14 lockdown90 |
I remember seeing something similar when using an old version of osm2pgsql that didn't support 64 bit ids. Can you run
and verify that it reports "64bit id space" answered 30 Sep '13, 03:22 Dymo12 1
Wasn't there a 64-bit issue with QGIS itself, as described here:
(30 Sep '13, 08:59)
SomeoneElse ♦
2
The 64bit issue should be fixed in the newly released QGIS 2.0 But I have not verified that. Is anyone able to try it and report?
(30 Sep '13, 16:35)
stephan75
Like Dymo12 I think this is an osm2pgsql 64-bit problem, rather than anything to do with QGIS.
(30 Sep '13, 17:58)
SK53 ♦
|
The coordinates that QGis shows are Mercator meters, just like you requested by adding "-M" to the osm2pgsql command line. Use "-l" (small letter L) instead if you want latitude/longitude values. The reason why some geometries are broken is likely that you saved your file from JOSM and some relations will be incomplete. This can break polygons (but not usually lines). A more thorough analysis might be possible if you placed your .osm file somewhere for us to inspect! answered 29 Sep '13, 12:26 Frederik Ramm ♦ I downloaded the map of Malta from the official site: geofabrik I used this command that you suggested:
and the result is also same like above. BUT the coordinates changed. osm_roads and osm_line originated from one point.
(29 Sep '13, 16:44)
lockdown90
|