logo separator

R: [mkgmap-dev] [PATCH v3] - merge nodes to remove evil short arcs

From Mark Burton markb at ordern.com on Wed May 27 18:05:41 BST 2009

Hi Marko,

Many thanks for your suggestion about avoiding adding an arc from a node
to itself. Your detective work/thinking has paid off.

Actually, the real problem is much earlier in the processing and I have
now committed a fix.

The problem is that you can't use Coord objects as keys in HashMaps
because two Coords with the same coordinates map to the same object
rather than distinct objects. The bug is mine, I introduced it when I
wrote the OSM support for routing. The fix is trivial, use
IdentityHashMaps instead. I had already come across this issue when
working on the node merging patch yesterday but it didn't occur to me
to look at the rest of the code to see if the problem happened
elsewhere.

However, although that fixes a real bug that was causing routing
crashes, it doesn't make maps that contain short segments work right.
Even with that fix, the sample map I have been trying still doesn't
route OK through the short segment unless I also use the merging nodes
patch I have posted today.

Cheers,

Mark



More information about the mkgmap-dev mailing list