Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

osm2pgsql makes osm ids negative when importing relations with touching inners #2657

Open
openstreetmap-trac opened this issue Jul 23, 2021 · 0 comments

Comments

@openstreetmap-trac
Copy link

Reporter: sim
[Submitted to the original trac issue database at 2.07pm, Sunday, 24th January 2010]

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 default.style -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: http://gis-lab.info/data/samples/touching-inners-error.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant