I am examining data imported into a PostGIS database with osm2pgsql and I have noticed some values in the osm_id (which I assume is unique) are negative. Is that ok? asked 18 Jan '11, 13:28 Tomas Pajonk TomH ♦♦ |
osm_id is only unique within element types in OSM database (but not in osm2pgsql schema, see the comment from pnorman below). So the same osm_id can apply to a node, a way and a relation. That's why osm2pgsql polygon table changes the sign of the relation id when it comes from relations and the original positive way id when it comes from simple closed ways. answered 18 Jan '11, 13:49 Pieren Thank you.
(18 Jan '11, 17:00)
Tomas Pajonk
More background Information is in Wiki http://wiki.openstreetmap.org/wiki/Osm2pgsql/schema#Processed_Data
(02 Apr '13, 14:13)
geekQ
5
osm_id is not unique in osm2pgsql's tables. Long ways are split by osm2pgsql into multiple rows with the same osm_id and multipolygons with distinct areas are also split into multiple rows.
(29 Sep '13, 05:58)
pnorman
|