[PATCH v4] Multipolygon code enabled for overlapping lines

Compared to v3 (posted by Carlos in thread "Wrong multipolygon warnings") some unused debug messages have been removed. The patch enables the multipolygon code to process multipolygons with overlapping lines. WanMil

Hi WanMil,
Compared to v3 (posted by Carlos in thread "Wrong multipolygon warnings") some unused debug messages have been removed.
The patch enables the multipolygon code to process multipolygons with overlapping lines.
For the Geofabrik Finland extract of today, the patch reduces the amount of log output from 198129 to 195563 bytes. If I specify --generate-sea=multipolygon I will get 1887595 bytes of log, including 3814 warnings 'is not processed due to an unknown reason'. Normally, I get only one 'unknown reason' warning, for a monster multipolygon that I created some days ago: http://www.openstreetmap.org/browse/relation/404644 WanMil, can you please take a look at that multipolygon and improve the code or diagnostics? That multipolygon could be easily split near Ihanteensalo, but I will leave it as is for now, so that the problem can be diagnosed. Marko

Hi WanMil,
Compared to v3 (posted by Carlos in thread "Wrong multipolygon warnings") some unused debug messages have been removed.
The patch enables the multipolygon code to process multipolygons with overlapping lines.
For the Geofabrik Finland extract of today, the patch reduces the amount of log output from 198129 to 195563 bytes.
If I specify --generate-sea=multipolygon I will get 1887595 bytes of log, including 3814 warnings 'is not processed due to an unknown reason'.
Normally, I get only one 'unknown reason' warning, for a monster multipolygon that I created some days ago: http://www.openstreetmap.org/browse/relation/404644
WanMil, can you please take a look at that multipolygon and improve the code or diagnostics? That multipolygon could be easily split near Ihanteensalo, but I will leave it as is for now, so that the problem can be diagnosed.
Marko
Marko, I downloaded the finland OSM dump from geofabrik from today (Feb 15th). I used splitter v105 and the areas.list file from http://www.polkupyoraily.net/osm/ to get three tiles. Then I tried that patch: * I got no warning for mp 404644 * I got only one "unknown reason" warning for complete finland Apart from improving handling on the tile boundaries (which will be another main patch) I don't see anything to improve. Did you really use the patch? WanMil

Hi WanMil,
I downloaded the finland OSM dump from geofabrik from today (Feb 15th). I used splitter v105 and the areas.list file from http://www.polkupyoraily.net/osm/ to get three tiles. Then I tried that patch: * I got no warning for mp 404644 * I got only one "unknown reason" warning for complete finland
What did you see above the "unknown reason" warning? I saw this when using yesterday’s dump and your patch applied on top of mkgmap r1569 (IIRC): 2010/02/14 21:52:08 WARNING (MultiPolygonRelation): 63240001.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/404644 contains errors. 2010/02/14 21:52:08 WARNING (MultiPolygonRelation): 63240001.osm.gz: Polygon 4611686018427397822(178P : (23045442[43P],19548137[36P],19560742[66P],25581658[35P]) is not processed due to an unknown reason. With today’s dump and mkgmap r1571, I see no such warning. I did not see a warning either with yesterday’s dump and r1569 (IIRC).
Apart from improving handling on the tile boundaries (which will be another main patch) I don't see anything to improve. Did you really use the patch?
I think I did. I just retried mp_linesoverlapping_v4.patch with today’s dump, and sure enough, I do see the 'unknown reason' warning that I thought was for relation 404644: 2010/02/15 21:41:07 WARNING (MultiPolygonRelation): 63240001.osm.gz: Cannot join the following ways to closed polygons. Multipolygon http://www.openstreetmap.org/browse/relation/404644 2010/02/15 21:41:07 WARNING (MultiPolygonRelation): 63240001.osm.gz: - way: http://www.openstreetmap.org/browse/way/25581758 2010/02/15 21:41:08 WARNING (MultiPolygonRelation): 63240001.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/404644 contains errors. 2010/02/15 21:41:08 WARNING (MultiPolygonRelation): 63240001.osm.gz: Polygon 4611686018427397822(178P : (23045442[43P],19548137[36P],19560742[66P],25581658[35P]) is not processed due to an unknown reason. 2010/02/15 09:59:56 WARNING (MultiPolygonRelation): 63240002.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/404644 does not contain any way tagged with role=outer. OK, without the patch, I see one warnings for 404644 in 63240001.osm.gz and two in 63240002.osm.gz, most likely due to incorrect splitting. Here is the warning for 63240001.osm.gz: 2010/02/15 09:59:12 WARNING (MultiPolygonRelation): 63240001.osm.gz: Cannot join the following ways to closed polygons. Multipolygon http://www.openstreetmap.org/browse/relation/404644 2010/02/15 09:59:12 WARNING (MultiPolygonRelation): 63240001.osm.gz: - way: http://www.openstreetmap.org/browse/way/25581758 Can you figure out what is behind the 'unknown reason' if it is not the incorrectly split relation 404644? Marko

Hi WanMil,
I downloaded the finland OSM dump from geofabrik from today (Feb 15th). I used splitter v105 and the areas.list file from http://www.polkupyoraily.net/osm/ to get three tiles. Then I tried that patch: * I got no warning for mp 404644 * I got only one "unknown reason" warning for complete finland
What did you see above the "unknown reason" warning? I saw this when using yesterday’s dump and your patch applied on top of mkgmap r1569 (IIRC):
2010/02/14 21:52:08 WARNING (MultiPolygonRelation): 63240001.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/404644 contains errors. 2010/02/14 21:52:08 WARNING (MultiPolygonRelation): 63240001.osm.gz: Polygon 4611686018427397822(178P : (23045442[43P],19548137[36P],19560742[66P],25581658[35P]) is not processed due to an unknown reason.
With today’s dump and mkgmap r1571, I see no such warning. I did not see a warning either with yesterday’s dump and r1569 (IIRC).
Apart from improving handling on the tile boundaries (which will be another main patch) I don't see anything to improve. Did you really use the patch?
I think I did. I just retried mp_linesoverlapping_v4.patch with today’s dump, and sure enough, I do see the 'unknown reason' warning that I thought was for relation 404644:
2010/02/15 21:41:07 WARNING (MultiPolygonRelation): 63240001.osm.gz: Cannot join the following ways to closed polygons. Multipolygon http://www.openstreetmap.org/browse/relation/404644 2010/02/15 21:41:07 WARNING (MultiPolygonRelation): 63240001.osm.gz: - way: http://www.openstreetmap.org/browse/way/25581758 2010/02/15 21:41:08 WARNING (MultiPolygonRelation): 63240001.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/404644 contains errors. 2010/02/15 21:41:08 WARNING (MultiPolygonRelation): 63240001.osm.gz: Polygon 4611686018427397822(178P : (23045442[43P],19548137[36P],19560742[66P],25581658[35P]) is not processed due to an unknown reason. 2010/02/15 09:59:56 WARNING (MultiPolygonRelation): 63240002.osm.gz: Multipolygon http://www.openstreetmap.org/browse/relation/404644 does not contain any way tagged with role=outer.
OK, without the patch, I see one warnings for 404644 in 63240001.osm.gz and two in 63240002.osm.gz, most likely due to incorrect splitting. Here is the warning for 63240001.osm.gz:
2010/02/15 09:59:12 WARNING (MultiPolygonRelation): 63240001.osm.gz: Cannot join the following ways to closed polygons. Multipolygon http://www.openstreetmap.org/browse/relation/404644 2010/02/15 09:59:12 WARNING (MultiPolygonRelation): 63240001.osm.gz: - way: http://www.openstreetmap.org/browse/way/25581758
Can you figure out what is behind the 'unknown reason' if it is not the incorrectly split relation 404644?
Marko
Marko, if you want to know exactly what's happening please start mkgmap with debug-level FINE. I don't do anything else. I am happy for any good hint what might be a problem. But I don't investigate every warning of the mp code. WanMil

Hi WanMil,
if you want to know exactly what's happening please start mkgmap with debug-level FINE. I don't do anything else. I am happy for any good hint what might be a problem. But I don't investigate every warning of the mp code.
Fair enough. For now, I will blame it on the splitter. I did see thousands of these warnings when compiling with --generate-sea=multipolygons, but I will not be enabling that option yet. There must be some incentive to my fellow mappers to convert lakes to proper multipolygons. :-) Marko

Compared to v3 (posted by Carlos in thread "Wrong multipolygon warnings") some unused debug messages have been removed.
The patch enables the multipolygon code to process multipolygons with overlapping lines.
WanMil
Marko, Steve, I didn't get any negative feedback. Could you please commit this patch? I have some further patches regarding multipolygons and don't want to mix them up. Thanks! WanMil

Hi WanMil,
I didn't get any negative feedback. Could you please commit this patch? You did get some feedback from me, but it is not that critical. I committed the patch in trunk r1575. Thank you for your ongoing efforts,
Marko

Hi WanMil,
I didn't get any negative feedback. Could you please commit this patch? You did get some feedback from me, but it is not that critical. I committed the patch in trunk r1575. Thank you for your ongoing efforts,
Marko
Yeah, but it was not too *negative* ;-) Thanks for committing (and your ongoing finland analysis of the mp code)! WanMil
participants (2)
-
Marko Mäkelä
-
WanMil