<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Greg.</p>
<p><br>
</p>
<p>when mkgmap:dest_hint=true matches than mkgmap has either found a destination tag in the OSM
<br>
</p>
<p>data or it has filled destination with one of the alternative values like <br>
</p>
<p>destination:forward, destination:street, destination:lanes and so on.</p>
<p>Maybe that is not a good idea, maybe mkgmap should fill a prefixed varible instead.</p>
<p>Does that help?<br>
</p>
<p><br>
</p>
<p>Gerd<br>
</p>
<p><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Von:</b> mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von greg crago <gregcrago@gmail.com><br>
<b>Gesendet:</b> Samstag, 19. März 2016 01:34<br>
<b>An:</b> Development list for mkgmap<br>
<b>Betreff:</b> [mkgmap-dev] Exit_hint and Dest_hint result is not what I was expecting</font>
<div> </div>
</div>
<div>
<div dir="ltr">I have an exit with a highway=motorway_link and destination:street=Beck Road. I have a node with highway=junction and ref=18.
<div><br>
</div>
<div>I was trying to get:</div>
<div>Exit 18 Beck Rd</div>
<div><br>
</div>
<div>But I am getting:</div>
<div>Exit 18 Beck Rd ~ Beck Road <br>
</div>
<div>
<div><br>
</div>
<div>My <b>line</b> file contains:</div>
<div><br>
</div>
<div>
<div>dest_hint=* { delete dest_hint }</div>
<div>highway=* & mkgmap:dest_hint=true { set destination:ref = '${destination:ref|subst:South=> S|subst:North=> N|subst:East=> E|subst:West=> W|subst:I =>I-|subst:M =>M-|subst:US =>US-}'; </div>
<div><span class="" style="white-space:pre"></span>set destination = '${destination|subst:/=>,}';</div>
<div><span class="" style="white-space:pre"></span>set destination:street = '${destination:street|subst:;=>,|subst: Road=> Rd|subst: Street=> St|subst: Avenue=> Ave|subst: Mile=> Mi|subst: Boulevard=> Blvd|subst: Parkway=> Pkwy|subst: Highway=> Hwy|subst: Southwest=>
 SW|subst: Northwest=> NW|subst: Southeast=> SE|subst: Northeast=> NE}';</div>
<div><span class="" style="white-space:pre"></span>}</div>
<div><br>
</div>
<div>(highway=motorway_link | highway=trunk_link | highway=primary_link | highway=secondary_link | highway=tertiary_link) & mkgmap:dest_hint=true</div>
<div>  { set dest_hint = '${destination:ref} ${destination:street} - ${destination}' |</div>
<div><span class="" style="white-space:pre"></span>'${destination:ref} ${destination:street}' |</div>
<div><span class="" style="white-space:pre"></span><b>'${destination:street} ~ ${destination}' </b>|</div>
<div><span class="" style="white-space:pre"></span>'${destination:ref} ^ ${destination}' | </div>
<div><span class="" style="white-space:pre"></span>'${destination:street}' |</div>
<div><span class="" style="white-space:pre"></span>'${exit_hint_ref|subst: South=> S|subst: North=> N|subst: East=> E|subst: West=> W} ${exit_hint_name|subst: Road=> Rd|subst: Street=> St|subst: Avenue=> Ave|subst: Mile=> Mi|subst: Boulevard=> Blvd|subst: Parkway=>
 Pkwy|subst: Highway=> Hwy}' |</div>
<div><span class="" style="white-space:pre"></span>'${exit_to|subst: Road=> Rd|subst: Street=> St|subst: Avenue=> Ave|subst: Mile=> Mi|subst: Boulevard=> Blvd|subst: Parkway=> Pkwy|subst: Highway=> Hwy}' |</div>
<div><span class="" style="white-space:pre"></span>'${destination}';</div>
<div>       }</div>
<div># build exit hint </div>
<div>exit_hint=* { delete exit_hint }</div>
<div>(highway=motorway_link | highway=trunk_link | highway=primary_link | highway=secondary_link | highway=tertiary_link) & mkgmap:exit_hint=true </div>
<div>  { set exit_hint = 'Exit ${mkgmap:exit_hint_ref}';</div>
<div>#<span class="" style="white-space:pre"> </span>'Exit ${mkgmap:exit_hint_name|subst: Road=> Rd|subst: Street=> St|subst: Avenue=> Ave|subst: Mile=> Mi|subst: Boulevard=> Blvd|subst: Parkway=> Pkwy|subst: Highway=> Hwy}' | </div>
<div>#<span class="" style="white-space:pre"> </span>'Exit ${ref|subst: South=> S|subst: North=> N|subst: East=> E|subst: West=> W}' |</div>
<div>#<span class="" style="white-space:pre"> </span>'Exit ${mkgmap:exit_hint_ref|subst: South=> S|subst: North=> N|subst: East=> E|subst: West=> W} ${mkgmap:exit_hint_exit_to|subst: Road=> Rd|subst: Street=> St|subst: Avenue=> Ave|subst: Mile=> Mi|subst: Boulevard=>
 Blvd|subst: Parkway=> Pkwy|subst: Highway=> Hwy}' | </div>
<div>#<span class="" style="white-space:pre"> </span>'Exit ${mkgmap:exit_hint_exit_to|subst: Road=> Rd|subst: Street=> St|subst: Avenue=> Ave|subst: Mile=> Mi|subst: Boulevard=> Blvd|subst: Parkway=> Pkwy|subst: Highway=> Hwy}' |</div>
<div>#<span class="" style="white-space:pre"> </span>'Exit ${mkgmap:exit_hint_name|subst: Road=> Rd|subst: Street=> St|subst: Avenue=> Ave|subst: Mile=> Mi|subst: Boulevard=> Blvd|subst: Parkway=> Pkwy|subst: Highway=> Hwy}' |</div>
<div>#<span class="" style="white-space:pre"> </span>'Exit ${mkgmap:exit_hint_ref|subst: South=> S|subst: North=> N|subst: East=> E|subst: West=> W}';</div>
<div>       }</div>
<div># use destination hint and/or exit hint to build name              </div>
<div>(highway=motorway_link | highway=trunk_link | highway=primary_link | highway=secondary_link | highway=tertiary_link) & (mkgmap:exit_hint=true | mkgmap:dest_hint=true)</div>
<div>  {<span class="" style="white-space:pre"> </span>name '${exit_hint} ${dest_hint}' | '${dest_hint}' | '${exit_hint}'}</div>
<div><br>
</div>
<div>I used different symbols to tell me which code is being executed. Since the result string contains a "~" I think it is executing <b>'${destination:street} ~ ${destination}' </b>which is strange, since there is no DESTINATION tag at all.</div>
<div><br>
</div>
<div>Can someone see why I am getting "Exit 18 Beck Rd ~ Beck Road" when I should be getting "Exit 18 Beck Rd"?</div>
</div>
</div>
<div><br>
</div>
<div>Attached are screenshots and actual osm.pbf data for just this intersection.</div>
<div><br>
</div>
<div>Greg</div>
</div>
</div>
</div>
</div>
</body>
</html>