logo separator

[mkgmap-dev] Commit: r1713: Fix a bug in mkgmap if one use turn restrictions for routing in

From svn commit svn at mkgmap.org.uk on Fri Oct 15 11:42:22 BST 2010

Version 1713 was commited by steve on 2010-10-15 11:42:22 +0100 (Fri, 15 Oct 2010) 

Fix a bug in mkgmap if one use turn restrictions for routing in
combination with the make-cycleway option.

As far as I understand the
make-cycleway options duplicates ways with a bicycle lane etc. The new
way seems to use the same nodes as the original way. If you have a
node with turn restrictions (via node), this operation would add one
ore more additional ways to this node, that may share the same toNode
and fromNode but no or wrong restriction reference. Therefore, it
could be that the fromNode or toNode is added as OtherNode in
StyledConverter.java (line 1616 and 1636).

I think the easiest hot fix is to prevent to add the fromNode and toNode to the restriction, RestrictionRelation.java -> addRestriction(MapCollector collector) in the only_* condition branch (line 293).

I have tested the attached patch. It works fine. I don't think, that
this patch breaks any mkgmap function, because:
1) It avoids adding a from/toNode to a restriction of a only_* condition.
2) Adding other nodes several times to a restriction.
This is obviously a wanted behavior.

Another solution would be to flag generated ways (from make-cycleways)
and to not consider in any turn restriction, because they have no or
wrong turn restrictions. But this is a more invasive change.

- DDYeti


More information about the mkgmap-dev mailing list