logo separator

[mkgmap-dev] Bogus warnings about intersected ways in multipolygons

From WanMil wmgcnfg at web.de on Mon Jan 25 22:11:04 GMT 2010

Am 25.01.2010 23:03, schrieb WanMil:
>>
>> Hi Adrian,
>>
>>> I don't think these warnings are bogus. Mkgmap definitely has problems
>>> with multipolygons. The Languedoc-Roussillon extract (southern France)
>>> from Geofabrik provokes about a hundred of these warnings. But I believe
>>> that the intersected ways are being generated by mkgmap and that the OSM
>>> data is OK. Mkgmap-r1475 did not have this problem but r1502 and r1507
>>> both do. I am unable to pinpoint more accurately when the behaviour
>>> changed because I do not have copies of the relevant releases. Perhaps
>>> r1494 could be put back on the web site, in the hope that we might have
>>> the benefit of the fixes to generate-sea without the multipolygon
>>> problems.
>>>
>>> Exactly where the problems show up can depend on where the tiles are
>>> split. One example is at
>>> http://www.openstreetmap.org/?lat=43.4047&lon=3.5107&zoom=13&layers=
>>> B000FTF
>>> as seen on Lambertus' site. Take a look at his tile 63240406.img dated
>>> 20-01-2010. If you look at the vineyards (land-use polygons) in the
>>> vicinity of Pinet, you will see an obvious straight edge which is
>>> spurious, and areas where the inside and outside of the polygon have
>>> swapped over.
>>
>> The new MP code has a problem with inner polygons that touch the outer.
>>
>> What you say makes me think that whenever the splitter splits an inner
>> polygon it's going to cause trouble because it splits outers/inners
>> along the same line so they will always intersect then.
>>
>> Whaddyathink WanMil?
>>
>> Mark
>
> Two things to remember:
>
> It is the point of view to say "the OSM data is OK". The Geofabrik dumps
> contain incomplete ways and incomplete relations. To get a 100% correct
> handling of multipolygons if is required to have complete data or to get
> the shape of the OSM dump. At the moment we have betwixt and between. So
> on the shape boundary where osmosis cuts the dumps we cannot do a lot at
> the moment.
>
> The 2nd point is a known problem of the current mp code if inner and
> outer polygons have overlapping lines. This may produce problems
> (although I haven't tried to reproduce it).
> But from my experience this won't happen most of the time on tile
> borders. Certainly the splitter puts the last point of a way inside the
> bounds to the tile and sometimes the next (or some) point(s) outside the
> bounds. The ways are not cut exactly on the tile border. So I expect
> rare situations where inner and outer way contain overlapping ways due
> to the splitter.
>
> Adrian: I want to check the tile from Lambertus. Can you give the
> download link? I haven't found it.
>
> WanMil

I forgot some things:
The mp code will throw away multipolygons on the tile border
* if the outer polygon is not closed AND
* if the non closed outer polygon could not be closed by simply 
connecting last and first point without intersecting itself

In case an outer polygon intersects an inner polygon on the artificially 
added closing segment the mp code should ignore this. If it doesn't - it 
is a bug :-)

WanMil



More information about the mkgmap-dev mailing list