[Tile-serving] [openstreetmap/osm2pgsql] Flex creating polygons from inner ways (holes) where outer ways not in dataset (Issue #1584)
Jochen Topf
notifications at github.com
Tue Nov 30 13:04:37 UTC 2021
That behaviour is to be expected. It is a side effect of libosmium (and therefore osm2pgsql) ignoring the inner/outer roles on relations, because they are so often wrong or missing. But the problem here is not the inner/outer ring thing, this is just one case of garbage-in-gargabe-out. If you have other missing relation members, like a missing inner ring, you would also get a wrong polygon. (In most cases incomplete relations will simply generate invalid polygons and be dropped completely.) Of course that will not usually happen when you are working with extracts, because having an extract boundary with an inner ring isn't often used.
So the real problem is that we are interpreting an incomplete object at all. We can never be sure that an incomplete object is represented reasonably correctly, so maybe we should not do that. On the other hand "slicing" through a relation when creating an extract isn't an unusual thing to do and often useful, because the remaining data might still be useful. Maybe osm2pgsql is doing the right thing here and the extract generation is to blame for generating an extract with incomplete data?
Also: I don't believe this is related to the flex output, the same should happen with the old pgsql output. Have you checked that?
Our options here are limited:
1. Keep it the way it is
2. Ignore all incomplete objects (or at least incomplete relations)
3. Look at inner/outer roles on incomplete relations to at least not generate something totally wrong
All of the above could also generate some kind of warning, but in practice I don't think this will help much.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1584#issuecomment-982616771
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20211130/0cfcd758/attachment.htm>
More information about the Tile-serving
mailing list