
Hi Mark, your code works fine with my test cases. Maybe we should add a URL with the coordinate to the error message to encourage people to fix such consecutive points in osm. Thanks Berni. Mark Burton schrieb:
Hi,
it looks like the looped way check doesn't find all self intersection ways. It just checks if some waypoint is the same like the last way point. It misses loops somewhere in the middle of the way. This results in route calculation hangups on the nuvi.
Here comes a patch for the nod branch that fixes the problem. The new function should also work with multiple loops in a way. The check for the two point loops needs a closer look. For now we only check if there are more then 2 points in the way. I have tried a alternate way by checking the distance between the intersection points to be greater the 1 (j-pIdx>1). This will produce some more loop warnings. In one case I was not able to see the reason for the warning so I commented the alternate check out for now.
Berni.
Many thanks for the patch - I did wonder when I wrote the original code whether there would be a problem with intersections.
I have reworked the patch to suit my way of thinking and I believe it does a very similar job to the orginal but, to me, it's easier to understand how it works. Also, this new code actually zaps consecutive identical points.
Please try the attached patch (on nod branch, not on top of your patch) and see what you think.
Cheers,
Mark
PS - I have received the POI patch for nod and will be trying it out at the first opportunity. ------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev