Hi,

I found 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

Attachment: RestrictionRelation.patch
Description: Binary data

_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to