Opened 10 years ago

Last modified 9 years ago

#2657 new defect

osm2pgsql makes osm ids negative when importing relations with touching inners

Reported by: sim Owned by: jburgess777@…
Priority: major Milestone:
Component: osm2pgsql Version:
Keywords: osm2pgsql, postgis, topology Cc: openstreetmap@…


If you try to import a OSM XML that contains relations with outer and two touching inners, two issues occur:

  1. osm id of the outer is set to negative in the DB
  2. postgis is throwing topology error for this id

Command to import (also tried with -G): osm2pgsql -U pgsql -d topocheck -p osm -c -l -s -S -G -C 1024 err.osm

Command to check topology: psql -d topocheck -U pgsql -c "select ST_IsValidReason(way),osm_id from osm_polygon where ST_IsValid(way)<>'t'"

See attached test case:

Change History (3)

comment:1 Changed 10 years ago by twain

Cc: openstreetmap@… added

comment:2 Changed 10 years ago by Ldp

Owner: changed from mapnik-team@… to jburgess777@…

comment:3 Changed 9 years ago by amm

Component: mapnikosm2pgsql
Note: See TracTickets for help on using tickets.