2

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%20Pajonk's gravatar image

Tomas Pajonk
1918817
accept rate: 0%

edited 21 Jan '11, 09:17

TomH's gravatar image

TomH ♦♦
3.2k83541


One Answer:
9

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.

permanent link

answered 18 Jan '11, 13:49

Pieren's gravatar image

Pieren
9.7k2075157
accept rate: 15%

edited 03 Jul '14, 12:12

Thank you.

(18 Jan '11, 17:00) Tomas Pajonk
(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

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×224
×6

question asked: 18 Jan '11, 13:28

question was seen: 8,063 times

last updated: 03 Jul '14, 12:12

powered by OSQA