[Tile-serving] [osm2pgsql] Bad multipolygon tags (#80)
Petr Morávek
notifications at github.com
Thu Sep 19 19:44:00 UTC 2013
I've created a simple test for the problem, see https://github.com/xificurk/osm2pgsql-multipolygon-test
Case A) If the multipolygon relation has a polygon key, then the resulting geometries are correct (both lua and C) - polygons from relations and lines from individual ways. (file with_rel_tags.osm)
Case B) If the multipolygon relation has no polygon key, then the resulting geometries are wrong, furthermore the results of lua and C parsing differ. (file without_rel_tags.osm)
Both lua and C do the same mistake - they take all the tags from ways and put them on the resulting polygon (lua goes even further and overwrites original tags that came from the relation). I think the correct behavior is to copy over only polygon tags iff they are present on all the (outer?) ways of multipolygon.
Lua parsing suffers from one more bug in case B) - seems like it imports only "random" part of the linear features that are used in multipolygon relation. See the logs in the mentioned repo.
Important note: If you use C parsing, then what is (or is not) a polygon is determined by import.style. So, If you delete this line (https://github.com/xificurk/osm2pgsql-multipolygon-test/blob/master/import.style#L4), you'll end up with the same results in both cases.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/80#issuecomment-24767757
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20130919/4fa47af9/attachment.html>
More information about the Tile-serving
mailing list