Analysis of MP issues in Finland

Hi WanMil, Mark, all, I analyzed all the multipolygon errors and warnings I got for today's finland.osm.bz2 from Geofabrik, without --generate-sea. Most of them can apparently be blamed on missing boundary information. I wrote the relation IDs an explanations to my logging.ignore file, so that I will not have to see these messages again. You can get the file from http://www.polkupyoraily.net/osm/, but I will repeat the interesting bits here: # overlapping lines in multipolygons, should be fixed in mkgmap later http://www.openstreetmap.org/browse/relation/48542 http://www.openstreetmap.org/browse/relation/367049 http://www.openstreetmap.org/browse/relation/372975 http://www.openstreetmap.org/browse/relation/387793 http://www.openstreetmap.org/browse/relation/389976 # multipolygon problem at tile border, should be fixed in mkgmap or splitter http://www.openstreetmap.org/browse/relation/302897 http://www.openstreetmap.org/browse/relation/306274 http://www.openstreetmap.org/browse/relation/311221 (the offending tile border is at lat=62.226562; the other one is at lat=64.819336) I could not see what is causing the following issues. WanMil, can you please analyze these? One of them was edited recently, but the other was not, as far as I can tell: 2010/01/29 12:11:44 WARNING (MultiPolygonRelation): 63240001.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/372970 contains intersected or overlapping ways 2010/01/29 12:11:44 WARNING (MultiPolygonRelation): 63240001.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/375636 contains intersected or overlapping ways Last but not least, here is an idea for quality control. I came across two lakes whose islands were in another lake (the change message hinted that the lake had been split). There is no warning for that. The errors must be coming from missing boundary information in the Geofabrik extract. http://www.openstreetmap.org/browse/relation/303320 http://www.openstreetmap.org/browse/relation/303321 Best regards, Marko

Hi Marko,
Hi WanMil, Mark, all,
I analyzed all the multipolygon errors and warnings I got for today's finland.osm.bz2 from Geofabrik, without --generate-sea.
that's great!!
Most of them can apparently be blamed on missing boundary information. I wrote the relation IDs an explanations to my logging.ignore file, so that I will not have to see these messages again. You can get the file from http://www.polkupyoraily.net/osm/, but I will repeat the interesting bits here:
# overlapping lines in multipolygons, should be fixed in mkgmap later http://www.openstreetmap.org/browse/relation/48542 http://www.openstreetmap.org/browse/relation/367049 http://www.openstreetmap.org/browse/relation/372975 http://www.openstreetmap.org/browse/relation/387793 http://www.openstreetmap.org/browse/relation/389976 # multipolygon problem at tile border, should be fixed in mkgmap or splitter http://www.openstreetmap.org/browse/relation/302897 http://www.openstreetmap.org/browse/relation/306274 http://www.openstreetmap.org/browse/relation/311221
Ok, the number is quite small. Finnland contains ~2300 multipolygons. So the result is not too bad :-)
(the offending tile border is at lat=62.226562; the other one is at lat=64.819336)
I could not see what is causing the following issues. WanMil, can you please analyze these? One of them was edited recently, but the other was not, as far as I can tell:
2010/01/29 12:11:44 WARNING (MultiPolygonRelation): 63240001.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/372970 contains intersected or overlapping ways
This mp was changed today (Jan 29th 2010, 06:33). Before the change a small polygon in the north of the mp touched the outer ring. So it contains to your first category overlapping lines.
2010/01/29 12:11:44 WARNING (MultiPolygonRelation): 63240001.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/375636 contains intersected or overlapping ways The inner and outer tags are interchanged. Mp could autodetect this but only if it disregards the inner and outer tags completely. This makes problems with your next examples, because the wrong assigned inner polygons would be autodetected as outer polygons.
Last but not least, here is an idea for quality control. I came across two lakes whose islands were in another lake (the change message hinted that the lake had been split). There is no warning for that. The errors must be coming from missing boundary information in the Geofabrik extract.
http://www.openstreetmap.org/browse/relation/303320 http://www.openstreetmap.org/browse/relation/303321
Yep. At the moment the mp code is quite unspecific with its warning messages. "Multipolygon http://www.openstreetmap.org/browse/relation/xxx contains intersected or overlapping ways" is the only message if something is not correctly inner/outer tagged, or some ways are overlapping or inner ways belong to a complete other mp. I will think about how to improve this.
Best regards,
Marko
Well done! WanMil P.S.: I will start to analyze the mp seabounds treatment and will post it soon.

Hi WanMil,
This mp was changed today (Jan 29th 2010, 06:33). Before the change a small polygon in the north of the mp touched the outer ring. So it contains to your first category overlapping lines.
Thanks for figuring this out. I was too lazy to check previous versions, and the Geofabrik extract is too big for my visualization tools. By the way, I examined one multipolygon near the border more closely. In the split osm.gz file, it contained fewer members than the relation at the browse URL, and it had not been changed recently. I wondered if it is a splitter bug, but the huge finland.osm.bz2 contained the same error. So, Geofabrik's tool of choice (Osmosis?) is apparently dropping the members that are outside its cutting area.
2010/01/29 12:11:44 WARNING (MultiPolygonRelation): 63240001.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/375636 contains intersected or overlapping ways The inner and outer tags are interchanged. Mp could autodetect this but only if it disregards the inner and outer tags completely. This makes problems with your next examples, because the wrong assigned inner polygons would be autodetected as outer polygons.
Thank you, I should have loaded it in JOSM to see it. I just swapped the roles.
Last but not least, here is an idea for quality control. I came across two lakes whose islands were in another lake (the change message hinted that the lake had been split). There is no warning for that. The errors must be coming from missing boundary information in the Geofabrik extract.
http://www.openstreetmap.org/browse/relation/303320 http://www.openstreetmap.org/browse/relation/303321
Yep. At the moment the mp code is quite unspecific with its warning messages. "Multipolygon http://www.openstreetmap.org/browse/relation/xxx contains intersected or overlapping ways" is the only message if something is not correctly inner/outer tagged, or some ways are overlapping or inner ways belong to a complete other mp. I will think about how to improve this.
It would be great if we could print a message saying "outer polygon does not contain one or more inner polygons; should some outer and inner roles be swapped?" By the way, should we complain if there appear to be multiple outer polygons? I know that the outer polygon can consist of multiple role=outer lines (such as long coastlines split to 500 nodes each), but can there legitimately be multiple outer polygons? Hmm yes, thinking about administrative borders, such as Russia+Kaliningrad (Königsberg), Denmark+Greenland, or from the past West Germany + West Berlin. Best regards, Marko

It would be great if we could print a message saying "outer polygon does not contain one or more inner polygons; should some outer and inner roles be swapped?"
Yep, I just have to think about how to code that. The idea to check if an outer polygon does not contain any inner polygon is a good starting point (sounds very simple but simple is good :-). Additionally I could check if the outer polygon is contained by an inner polygon that is not contained by an outer polgon. So we can swap the rule and say: Check all inner polygons that are not contained by an outer polygon and complain about that. Sounds good and too difficult to implement :-)
By the way, should we complain if there appear to be multiple outer polygons? I know that the outer polygon can consist of multiple role=outer lines (such as long coastlines split to 500 nodes each), but can there legitimately be multiple outer polygons? Hmm yes, thinking about administrative borders, such as Russia+Kaliningrad (Königsberg), Denmark+Greenland, or from the past West Germany + West Berlin.
It is defined in the description of the multipolygon relation (http://wiki.openstreetmap.org/wiki/Relation:multipolygon) that multiple outer polygons are allowed. And from my point of view it doesn't harm anything. WanMil
participants (2)
-
Marko Mäkelä
-
WanMil