[PATCH v1] MP: Close ways with both endpoints outside the bounding box

The patch closes all ways having both endpoints on the same side outside the bounding box. In this case it is not necessary to check if closing the way intersects the way itself. This fixes most (but not all) of the outstanding tile splitter problems. WanMil

Wow, this patch seems to have solved all problems when routing from one tile into another and back into it. Similary routing through 3 tiles (meaning crossing two tileboarders works now). This patch finally makes routing long distances in Mapsource possible (well not with my maps as mapsource cracks on the many turn changes, but on normal car navigation maps)!!!!!!!!!!!!!!!!!!!!!!! Was this what you intended? On 02.03.2010 23:31, WanMil wrote:
The patch closes all ways having both endpoints on the same side outside the bounding box. In this case it is not necessary to check if closing the way intersects the way itself.
This fixes most (but not all) of the outstanding tile splitter problems.
WanMil
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Well still is not perfect, but never before Crapsource routed through 4 tiles. (though see the yellow shortcut of a "short route" which was not chosen. This is using "shorter distance" so routing inside one single tile I suppose would have still worked better. But difficult to say knowing how much crapsource dislikes hard turns. You can see it actually went 4 times over tile borders.

On 03.03.2010 00:13, Felix Hartmann wrote:
Well still is not perfect, but never before Crapsource routed through 4 tiles. (though see the yellow shortcut of a "short route" which was not chosen. This is using "shorter distance" so routing inside one single tile I suppose would have still worked better. But difficult to say knowing how much crapsource dislikes hard turns. You can see it actually went 4 times over tile borders.
Well at some other points it did not want to route over 2 tile borders, seems not to be perfect yet - but the greatest step into the right direction so far when it comes to inter tile routing.

Felix,
Well at some other points it did not want to route over 2 tile borders, seems not to be perfect yet - but the greatest step into the right direction so far when it comes to inter tile routing.
Hmm, I'm sure that WanMil's patch does something good but I can't see how it can affect the inter-tile routing. Something changed in your map to allow the routing to improve, perhaps it's just a coincidence that it occurred when you had that patch installed? Mark

On 03.03.2010 00:24, Mark Burton wrote:
Felix,
Well at some other points it did not want to route over 2 tile borders, seems not to be perfect yet - but the greatest step into the right direction so far when it comes to inter tile routing.
Hmm, I'm sure that WanMil's patch does something good but I can't see how it can affect the inter-tile routing. Something changed in your map to allow the routing to improve, perhaps it's just a coincidence that it occurred when you had that patch installed?
Me neither, and it did.... However upon restarting Mapsource it does not do it anymore. Randomly 3 tiles (2 borders) but 3 or 4 borders not working anymore. And it did not change anything about the maps. Also only 6.15.x does 3 tiles. Same route 6.13.x crapsulates.... Well I still got the lucky screenshot of Mapsource crossing 4 borders without via point. I have no clue at all why this is possible now (there is no overlap on the tiles).
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On 03.03.2010 00:24, Mark Burton wrote:
Felix,
Well at some other points it did not want to route over 2 tile borders, seems not to be perfect yet - but the greatest step into the right direction so far when it comes to inter tile routing.
Hmm, I'm sure that WanMil's patch does something good but I can't see how it can affect the inter-tile routing. Something changed in your map to allow the routing to improve, perhaps it's just a coincidence that it occurred when you had that patch installed?
Me neither, and it did.... However upon restarting Mapsource it does not do it anymore. Randomly 3 tiles (2 borders) but 3 or 4 borders not working anymore. And it did not change anything about the maps. Also only 6.15.x does 3 tiles. Same route 6.13.x crapsulates....
Well I still got the lucky screenshot of Mapsource crossing 4 borders without via point. I have no clue at all why this is possible now (there is no overlap on the tiles).
Hi Felix, it sounds like Murphy, isn't it?!? :-) I am very surprised if this patch fixes routing problems. It only closes some incomplete polygons outside the bounding box. Not more and not less. WanMil

Hi Felix,
it sounds like Murphy, isn't it?!? :-)
I am very surprised if this patch fixes routing problems. It only closes some incomplete polygons outside the bounding box. Not more and not less.
WanMil _______________________________________________
Well it didn't really. I just found out that Mapsource 6.15.x is a bit more tolerant to mkgmap maps on borders. However sometimes it also blocks up completly, If I find some time I'll try to analyse why in special cases it does route over several borders. Mapsource 6.13.x never routes above more than 1 border however.... And soon Mapsource 6.16 will be published which is supposed to haver rather big changes regarding routing and regarding the dreaded x/y fixed correction (though not really fixed but centered to the middle of the map, or alternative centered depending on registry entry).

Felix,
Mapsource 6.13.x never routes above more than 1 border however....
Sadly, that's true for our maps. But it will happily route over multiple tiles that have been created with cgpsmapper. I can take the tiles from the NZ opengps map set and generate an overview map with mkgmap and give it and the tiles to mapsource and it loves them, route anywhere Sir, no problem! I live in hope that one day the problem will be solved (I am still working on it as a background task). Mark

On 03.03.2010 23:59, Mark Burton wrote:
Felix,
Mapsource 6.13.x never routes above more than 1 border however....
Sadly, that's true for our maps.
But it will happily route over multiple tiles that have been created with cgpsmapper. I can take the tiles from the NZ opengps map set and generate an overview map with mkgmap and give it and the tiles to mapsource and it loves them, route anywhere Sir, no problem!
I live in hope that one day the problem will be solved (I am still working on it as a background task).
Mark
Well I do know this of course. That's why I said I will try to find out similarities on the borders where for a start Crapsource 6.15.x routes happily over several borders. Maybe I can find some common points. I do hope that with Mapsource 6.16 there is finally a version superior to 6.13.6/7

Hi WanMil,
The patch closes all ways having both endpoints on the same side outside the bounding box. In this case it is not necessary to check if closing the way intersects the way itself.
This fixes most (but not all) of the outstanding tile splitter problems.
I still see some warnings presumably due to tile splitter, but other than that, this and mp_lesscuts_v2.patch look fine to me. Compared to the unpatched mkgmap r1593, these two patches shaved more than 11k off the warning log (181452 bytes for today, 192079 for yesterday, even though today's run contained many non-multipolygon warnings). Marko

Hi WanMil,
The patch closes all ways having both endpoints on the same side outside the bounding box. In this case it is not necessary to check if closing the way intersects the way itself.
This fixes most (but not all) of the outstanding tile splitter problems.
I still see some warnings presumably due to tile splitter, but other than that, this and mp_lesscuts_v2.patch look fine to me. Compared to the unpatched mkgmap r1593, these two patches shaved more than 11k off the warning log (181452 bytes for today, 192079 for yesterday, even though today's run contained many non-multipolygon warnings).
Marko
Torsten Leistikow pointed me to another problem with the tile bounds. In case a polygon was splitted by the bounding box into different distinct polygons only the first of it was taken. Version 2 of this patch handles this case. Summary for version 2: - Closing ways with both endpoints outside the bounding box and with both orientation towards the bounding box. - Bugfix: if a polygon was splitted by the bounding box into different distinct polygons only the first of it was taken. Now all distinct polygons are processed. (thanks to Torsten Leistikow) I give a very big "GO for commit" to this patch :-) WanMil

Hi WanMil,
I give a very big "GO for commit" to this patch :-)
I am not familiar with the MP code so it would be better if someone who is familiar with it commits it rather than me as I prefer to only commit stuff that I understand! Hope you don't have to wait to long. Cheers, Mark

On 04.03.2010 22:23, Mark Burton wrote:
Hi WanMil,
I give a very big "GO for commit" to this patch :-)
I am not familiar with the MP code so it would be better if someone who is familiar with it commits it rather than me as I prefer to only commit stuff that I understand!
Hope you don't have to wait to long.
Cheers,
Mark
Would be good. There are currently three patches on Multipolygonrelation That I would like to use. mp_rolehandling_v1; mp_lesscuts_v2 and mp_closewaysoutbox_v2. mp_lesscuts_v2 and mp_closewaysoutbox_v2 interfere with each other. The forth patch that I think should be submitted is mb_short-arc_removal_v1.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (4)
-
Felix Hartmann
-
Mark Burton
-
Marko Mäkelä
-
WanMil