Re: [OSM-dev] Polygon inner/outer relation in osm file
On 8/23/2016 6:58 AM, Martin Koppenhoefer wrote: recently we stumbled upon problematic behavior of current multipoligon processing in osm-carto OpenStreetMap Carto does not do any multipolygon processing. That is all done by osm2pgsql, and the behavior of osm2pgsql has changed significantly from the version used on the OSMF tile servers. ___ dev mailing list dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Polygon inner/outer relation in osm file
On Di, Aug 23, 2016 at 03:58:02 +0200, Martin Koppenhoefer wrote: > > Il giorno 23 ago 2016, alle ore 15:21, Frederik Ramm> > ha scritto: > > > > they can have missing or wrong inner/outer tags > > (usually considered valid)... the C++/Python library "osmium" is > > probably the most advanced in building proper polygons, or check out > > osm2pgsql, imposm, or ogr2ogr which also have code to deal with that. > > > recently we stumbled upon problematic behavior of current multipoligon > processing in osm-carto, as it drops tags on inner relation members if the > outer members (or the relation?) has the same tags. I believe this kind of > "fix" should not be performed, it leads to problems if this kind of mapping > was done on purpose, e.g. because of some properties being different. > > Not applying "magic guesswork" also leads to more predictable behavior and > ultimately to mappers fixing the representation in case it was wrong. This has been a long-standing problem. Unfortunately there is a lot of data in OSM that is still tagged this way, so it is not an option to just not do this anymore. Too many multipolygons (about 17,000) would break. This is not the only problem with current multipolygon tagging, and I am working on a "campaign" to get these fixed. There is more background and some stats here: https://github.com/osmlab/fixing-polygons-in-osm http://area.jochentopf.com/stats/ Jochen -- Jochen Topf joc...@remote.org http://www.jochentopf.com/ +49-351-31778688 ___ dev mailing list dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Polygon inner/outer relation in osm file
sent from a phone > Il giorno 23 ago 2016, alle ore 15:21, Frederik Rammha > scritto: > > they can have missing or wrong inner/outer tags > (usually considered valid)... the C++/Python library "osmium" is > probably the most advanced in building proper polygons, or check out > osm2pgsql, imposm, or ogr2ogr which also have code to deal with that. recently we stumbled upon problematic behavior of current multipoligon processing in osm-carto, as it drops tags on inner relation members if the outer members (or the relation?) has the same tags. I believe this kind of "fix" should not be performed, it leads to problems if this kind of mapping was done on purpose, e.g. because of some properties being different. Not applying "magic guesswork" also leads to more predictable behavior and ultimately to mappers fixing the representation in case it was wrong. cheers, Martin ___ dev mailing list dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Polygon inner/outer relation in osm file
Hi, On 08/23/2016 09:39 AM, patrick keshishian wrote: > What is the mechanism used, while processing "relation"-s, in > matching "inner" and "outer"-s of polygons? There's no guarantee that role="inner" and role="outer" are even set. I strongly advise against trying to write your own algorithm that combines polygons; you will get 80% right quickly and fight with the other 20% for weeks. Rings can be nested (valid), self-intersecting (invalid) or missing bits (invalid), they can have missing or wrong inner/outer tags (usually considered valid)... the C++/Python library "osmium" is probably the most advanced in building proper polygons, or check out osm2pgsql, imposm, or ogr2ogr which also have code to deal with that. Bye Frederik -- Frederik Ramm ## eMail frede...@remote.org ## N49°00'09" E008°23'33" ___ dev mailing list dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Polygon inner/outer relation in osm file
Hi, There is no order for any of the multipolygon members. When I create them, I try to sort them (outer before inner, then to form circles). JOSM combines them to form circles for some months now. But there is no convention. So it is up to you to match the corresponding outer/inner rings and find out if the multipolygon is valid. > http://wiki.openstreetmap.org/wiki/Relation:multipolygon#Valid_Multipolygon_conditions Michael Am 23.08.2016 um 09:39 schrieb patrick keshishian: > Greetings, > > What is the mechanism used, while processing "relation"-s, in > matching "inner" and "outer"-s of polygons? > > Examining some example data extracts (from geofabrik.de) it looked > as if an "outer" is followed by its "inner"-s (if any). > > But soon I came across ones like this: > >changeset="17984334" uid="574654" user="Tom_Holland"> > > > > > > > > > > > > I am really hoping to be missing something obvious, and that the > import (or render) software does not examine each "inner" against > each "outer" to determine the association. > > Also hoping this is the appropriate list for this sort of questions. > > --patrick > > [0] http://www.openstreetmap.org/relation/3215648#map=16/19.9202/-155.8783 > > ___ > dev mailing list > dev@openstreetmap.org > https://lists.openstreetmap.org/listinfo/dev > ___ dev mailing list dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/dev
[OSM-dev] Polygon inner/outer relation in osm file
Greetings, What is the mechanism used, while processing "relation"-s, in matching "inner" and "outer"-s of polygons? Examining some example data extracts (from geofabrik.de) it looked as if an "outer" is followed by its "inner"-s (if any). But soon I came across ones like this: I am really hoping to be missing something obvious, and that the import (or render) software does not examine each "inner" against each "outer" to determine the association. Also hoping this is the appropriate list for this sort of questions. --patrick [0] http://www.openstreetmap.org/relation/3215648#map=16/19.9202/-155.8783 ___ dev mailing list dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/dev