logo separator

[mkgmap-dev] Commit: r806: Off by one error is determining if a point is a node or not.

From Steve Ratcliffe steve at parabola.demon.co.uk on Wed Dec 10 21:33:59 GMT 2008

> Write extra bits only if the road has nodes beside the start and end  
> node. On the assumption that start and end points are always nodes, this 
> should be equivalent to nodes.size()>2, but I've also seen .mp-files 
> where the starting or end point were not routing nodes.

OK I'll change the test to n < points.size() - 1 then.

> Does the change to RoadHelper actually do anything for your sample?

Yes it did, as there were only three nodes on the road but the first four
points were not nodes and so the test against nodes.size() wasn't true.

I think the reason that osm2mp used to give worse results was that it
joins roads together if they are the same type and name.  This gives
more opertunity for the bugs to show as the ways in OSM are often
quite short and end at junctions even when the road doesn't change.



More information about the mkgmap-dev mailing list