[mkgmap-dev] [Patch v1] change process-destination option
From Gerd Petermann GPetermann_muenchen at hotmail.com on Wed Mar 23 09:07:03 GMT 2016
Hi all, please read carefully: Up to now the process_destination option is a bit problematic because it may add the tag destination=* to an existing OSM element, and I think this is not good, all tags added by mkgmap should have the mkgmap: prefix. As Greg pointed out this causes problems for style authors who want to create special hints depending on tags like destination:street . The attached patch changes the method like this: 1) the tag destination is not changed by mkgmap 2) Instead the special tag mkgmap:dest_hint is now set to the destination string that was found in one of the tags listed in this code snippet: tags.add("destination"); tags.add("destination:lanes"); tags.add("destination:lanes:forward"); tags.add("destination:lanes:backward"); tags.add("destination:forward"); tags.add("destination:backward"); tags.add("destination:street"); (BTW: This is also the order of evaluation in mkgmap searches since r3673, of cause forward/backward are checked depending on the direction of the way) For style authors this means that they have to 1) change all rules with mkgmap:dest_hint=true to mkgmap:dest_hint=* 2) change the rule that produces the hint to something like this: mkgmap:dest_hint=* { set dest_hint = '${destination:ref|subst: =>} ${mkgmap:dest_hint|subst:;=> |subst:/=> }' | '${ref|subst: =>} ${mkgmap:dest_hint|subst:;=> |subst:/=> }' | '${mkgmap:dest_hint|subst:;=> |subst:/=> }'; } Basically all places where "destination" was used were changed to mkgmap:dest_hint. I am aware that this could cause trouble, so I've added a check that complains when the style contains an expression mkgmap:dest_hint=true . A binary can be found here: http://files.mkgmap.org.uk/download/295/mkgmap.jar With the default style this produces the same img file as r3673. Please let me know if you see problems with your style. Gerd -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160323/07c5a51f/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: dest_hint_v1.patch Type: application/x-download Size: 14836 bytes Desc: dest_hint_v1.patch URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160323/07c5a51f/attachment-0001.bin>
- Previous message: [mkgmap-dev] Commit r3673: fix small issues with --process-destination option
- Next message: [mkgmap-dev] [Patch v1] change process-destination option
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list