<div dir="ltr">Thanks for the help but the echotags directive does not work for me the way you have it. I&#39;ve tried everything I can think of to make it go. Spaces before and after, semicolon or no semicolon, braces or no braces  - I get nothing in my stderr file.<div><br></div><div>I tried to use echotags in a simplified rule just to make sure I was writing the output to the correct file. It appears to be a very fussy command...</div><div><br></div><div>this works</div><div><br></div><div>(highway=motorway_link | highway=trunk_link)     { echotags &quot;motorway or trunk link seen&quot; }<br></div><div><br></div><div>but this does not</div><div><br></div><div>(highway=motorway_link | highway=trunk_link)     { echotags }  <br></div><div><br></div><div>nor does this</div><div><br></div><div>(highway=motorway_link | highway=trunk_link)     {echotags}<br></div><div><br></div><div>According to the style manual, all those statements should produce output. However, the style manual isn&#39;t very informative unfortunately.</div><div><br></div><div>Your suggestion</div><div><br></div><div><span class="im" style="font-size:16px">(highway=motorway_link | highway=trunk_link) &amp; mkgmap:exit_hint=true &amp;<br>mkgmap:dest_hint=true<br></span><span style="font-size:16px">  { echotags &quot;before&quot;;</span><br style="font-size:16px"><span class="im" style="font-size:16px">name &#39;${destination:ref|subst: =&gt;} ${destination|subst:;=&gt; |subst:/=&gt; }&#39; |<br>         &#39;${ref|subst: =&gt;} ${destination|subst:;=&gt; |subst:/=&gt; }&#39; |<br>         &#39;${destination|subst:;=&gt; |subst:/=&gt; }&#39; |<br>         &#39;Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}&#39; |<br></span><span class="im" style="font-size:16px">         &#39;Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}&#39; |<br>         &#39;Exit ${mkgmap:exit_hint_exit_to}&#39; |<br>         &#39;Exit ${mkgmap:exit_hint_name}&#39; |<br></span><span style="font-size:16px">         &#39;Exit ${mkgmap:exit_hint_ref}&#39; ;</span><br style="font-size:16px"><span style="font-size:16px">echotags &quot;after&quot;</span><br style="font-size:16px"><span style="font-size:16px">       }</span><br></div><div><span style="font-size:16px"><br></span></div><div>produced nothing at all. I know there must be a way to debug these blasted rules but the echotags and echo command don&#39;t seem to work all that well.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 16, 2015 at 12:22 PM, GerdP <span dir="ltr">&lt;<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dave,<br>
<br>
well, I am not an expert for the styles nor did I write the java code<br>
in LinkDestinationHook.java, but I try again:<br>
<br>
The action block of the rule starts with name, so what it does is to set the<br>
mkgmap:label:1 tag. This is explained in the style manual.<br>
The contents of the tags like mkgmap:exit_hint_ref depends on the OSM data<br>
and what the java code in LinkDestinationHook.java does.<br>
If you want to find out what values are passed to the rule and<br>
what the action block changes, use the echotags action:<br>
<span class="">(highway=motorway_link | highway=trunk_link) &amp; mkgmap:exit_hint=true &amp;<br>
mkgmap:dest_hint=true<br>
</span>  { echotags &quot;before&quot;;<br>
<span class="">name &#39;${destination:ref|subst: =&gt;} ${destination|subst:;=&gt; |subst:/=&gt; }&#39; |<br>
         &#39;${ref|subst: =&gt;} ${destination|subst:;=&gt; |subst:/=&gt; }&#39; |<br>
         &#39;${destination|subst:;=&gt; |subst:/=&gt; }&#39; |<br>
         &#39;Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}&#39; |<br>
</span><span class="">         &#39;Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}&#39; |<br>
         &#39;Exit ${mkgmap:exit_hint_exit_to}&#39; |<br>
         &#39;Exit ${mkgmap:exit_hint_name}&#39; |<br>
</span>         &#39;Exit ${mkgmap:exit_hint_ref}&#39; ;<br>
echotags &quot;after&quot;<br>
       }<br>
<br>
BTW: You posted a rule which doesn&#39;t appear in the default style,<br>
the phrase &quot;highway=road&quot; looks wrong there.<br>
<br>
Ciao,<br>
Gerd<br>
<br>
<br>
Dave Swarthout wrote<br>
<div><div class="h5">&gt; @Gerd,<br>
&gt;<br>
&gt; There is no problem and your brief explanation helped. Everything is<br>
&gt; working fine but I wanted to understand the logic of the rule better. But<br>
&gt; because I don&#39;t have any way to experiment with running different strings<br>
&gt; through those filters I&#39;m having trouble visualizing what they are doing.<br>
&gt; In the style manual some examples of the subst filter in action are shown<br>
&gt; for illustrative purposes:<br>
&gt;<br>
&gt; Example, if name =&quot;Queen Street&quot;<br>
&gt; ${name|subst:&quot;Queen=&gt;&quot;} returns &quot; Street&quot;<br>
&gt; ${name|subst:&quot;Queen=&gt;King&quot;} returns &quot;King Street&quot;<br>
&gt; ${name|subst:&quot;.*\s~&gt;&quot;} returns &quot;Street&quot;<br>
&gt;<br>
&gt; I was wanting some similar explanation for how that long rule works.<br>
&gt; Something like this:<br>
&gt;<br>
&gt; If the following tag exists on a way, destination:ref=US 20;Rochester<br>
&gt; the results will be<br>
&gt; ????<br>
&gt;<br>
&gt; I was not seeing what this part of that single long rule was doing until<br>
&gt; you mentioned cleaning up blanks and semicolons:<br>
&gt;<br>
&gt; name &#39;${destination:ref|subst: =&gt;} ${destination|subst:;=&gt; |subst:/=&gt; }&#39;<br>
&gt;<br>
&gt; To me it appeared to be setting the name of the way to blank or null if it<br>
&gt; encounters the tag destination:ref but now I understand it is eliminating<br>
&gt; blanks and other punctuation because I noticed the blank character<br>
&gt; following the colon in the subst command. So that means the second part<br>
&gt; removes semicolons. But why is it doing that? And what part gets passed to<br>
&gt; the Garmin &quot;assistant&quot; who then voices the information as the exit on a<br>
&gt; route is approached?<br>
&gt;<br>
&gt; Continuing: After all the punctuation has been stripped from the<br>
&gt; destination tag we move to the next part of the rule.<br>
&gt;<br>
&gt;           &#39;Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}&#39; |<br>
&gt; highway=road<br>
&gt;          &#39;Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}&#39; |<br>
&gt;          &#39;Exit ${mkgmap:exit_hint_exit_to}&#39; |<br>
&gt;          &#39;Exit ${mkgmap:exit_hint_name}&#39; |<br>
&gt;          &#39;Exit ${mkgmap:exit_hint_ref}&#39;<br>
&gt;<br>
&gt; This seems to be setting a variable named &quot;Exit&quot; to whatever is contained<br>
&gt; in the mkgmap internal variables. Is that what&#39;s happening? Where are<br>
&gt; those<br>
&gt; variables defined and set? Where does the data come from?<br>
&gt;<br>
&gt; Another big question is about the exit_to tag. Take this example of a<br>
&gt; motorway junction node. No destination tag appears on the linking way<br>
&gt; itself but my Garmin will speak the words properly as you approach Exit<br>
&gt; 10:<br>
&gt;<br>
&gt; highway=motorway_junction<br>
&gt; ref:Exit 10<br>
&gt; exit_to:Greenville;South NC 40; US 421<br>
&gt;<br>
&gt; I cannot find a rule that tells me how an exit_to tag is handled. Where<br>
&gt; does that information get processed? And how does the &quot;assistant&quot; know<br>
&gt; what<br>
&gt; words to speak?<br>
&gt;<br>
&gt; In summary, those are the questions I&#39;m trying to answer. Now that I&#39;m<br>
&gt; writing style rules of my own I want to better understand how they work.<br>
&gt; It&#39;s a slow process, especially when the examples in the manual are so<br>
&gt; simple. Perhaps a more complex, real world, example would help future<br>
&gt; mappers.<br>
&gt;<br>
&gt; Dave<br>
&gt;<br>
&gt;<br>
&gt; On Sat, May 16, 2015 at 3:04 AM, Gerd Petermann &lt;<br>
<br>
&gt; gpetermann_muenchen@<br>
<br>
</div></div>&gt;&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ------------------------------<br>
&gt;&gt; From:<br>
<br>
&gt; gpetermann_muenchen@<br>
<br>
&gt;&gt; To:<br>
<br>
&gt; daveswarthout@<br>
<span class=""><br>
&gt;&gt; Subject: RE: [mkgmap-dev] Routing parameters<br>
&gt;&gt; Date: Sat, 16 May 2015 12:02:22 +0200<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi Dave,<br>
&gt;&gt;<br>
&gt;&gt; not sure what the problem is.<br>
&gt;&gt; The subst filters are just used to remove some blanks or semicolons.<br>
&gt;&gt; The rest is more or less &quot;a list of alternative expressions separated<br>
&gt;&gt; with<br>
&gt;&gt; a vertical bar&quot;,<br>
&gt;&gt; you can search for that term in the style manual:<br>
&gt;&gt; <a href="http://www.mkgmap.org.uk/doc/pdf/style-manual.pdf" target="_blank">http://www.mkgmap.org.uk/doc/pdf/style-manual.pdf</a><br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve never tried these options because I use my GPS only for cycling,<br>
&gt;&gt; but my understanding is that the types 0x08 and 0x09 are special<br>
&gt;&gt; as they instruct the Garmin device to use the name of the road for the<br>
&gt;&gt; destination hint, and these rules are used to fill this name with useful<br>
&gt;&gt; information.<br>
&gt;&gt;<br>
&gt;&gt; Does that help?<br>
&gt;&gt;<br>
&gt;&gt; Gerd<br>
&gt;&gt;<br>
</span>&gt;&gt; ------------------------------<br>
&gt;&gt; From:<br>
<br>
&gt; daveswarthout@<br>
<span class=""><br>
&gt;&gt; Date: Fri, 15 May 2015 17:51:13 -0700<br>
&gt;&gt; To:<br>
<br>
</span>&gt; mkgmap-dev@.org<br>
<span class=""><br>
&gt;&gt; Subject: Re: [mkgmap-dev] Routing parameters<br>
&gt;&gt;<br>
&gt;&gt; Yes, as you can see above, I  understand the intent of those two options.<br>
&gt;&gt; But if someone could further explain what&#39;s happening in the rule, I<br>
&gt;&gt; would<br>
&gt;&gt; be most appreciative.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m guessing the first part assigns a name or ref if one appears in the<br>
&gt;&gt; tagging but understanding the logic of the series of &quot;subst&quot; filters<br>
&gt;&gt; following that is, for a newbie, quite challenging.<br>
&gt;&gt;<br>
&gt;&gt; On Fri, May 15, 2015 at 12:17 PM, GerdP &lt;<br>
<br>
&gt; gpetermann_muenchen@<br>
<br>
&gt; &gt;<br>
</span><div><div class="h5">&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Dave,<br>
&gt;&gt;<br>
&gt;&gt; please check the documentation for --process-destination and<br>
&gt;&gt; --process-exits:<br>
&gt;&gt; <a href="http://www.mkgmap.org.uk/doc/options" target="_blank">http://www.mkgmap.org.uk/doc/options</a><br>
&gt;&gt;<br>
&gt;&gt; If I got this right, these option mark exits so that Garmin knows where<br>
&gt;&gt; they are where they lead.<br>
&gt;&gt;<br>
&gt;&gt; Gerd<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Dave Swarthout wrote<br>
&gt;&gt; &gt; I am curious to know how mkgmap handles the display of and text to<br>
&gt;&gt; speech<br>
&gt;&gt; &gt; aspects of motorway junctions. It&#39;s hard to test for this without<br>
&gt;&gt; actually<br>
&gt;&gt; &gt; creating a route and then driving it to see and hear what the Garmin is<br>
&gt;&gt; &gt; doing with the data or to discover where it gets the information from.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I&#39;m assuming that whatever one puts in the exit_to=* tag gets displayed<br>
&gt;&gt; &gt; and<br>
&gt;&gt; &gt; spoken by the Garmin &quot;assistant&quot;. Does mkgmap ever use the<br>
&gt;&gt; destination=*<br>
&gt;&gt; &gt; tag, and if so under what circumstances?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I found this rule in the lines style sheet, but I do not understand it<br>
&gt;&gt; &gt; well<br>
&gt;&gt; &gt; enough to help me answer my question<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; (highway=motorway_link | highway=trunk_link) &amp; mkgmap:exit_hint=true &amp;<br>
&gt;&gt; &gt; mkgmap:dest_hint=true<br>
&gt;&gt; &gt;   { name &#39;${destination:ref|subst: =&gt;} ${destination|subst:;=&gt;<br>
&gt;&gt; |subst:/=&gt;<br>
&gt;&gt; &gt; }&#39; |<br>
&gt;&gt; &gt;          &#39;${ref|subst: =&gt;} ${destination|subst:;=&gt; |subst:/=&gt; }&#39; |<br>
&gt;&gt; &gt;          &#39;${destination|subst:;=&gt; |subst:/=&gt; }&#39; |<br>
&gt;&gt; &gt;          &#39;Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}&#39; |<br>
&gt;&gt; &gt; highway=road<br>
&gt;&gt; &gt;          &#39;Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}&#39; |<br>
&gt;&gt; &gt;          &#39;Exit ${mkgmap:exit_hint_exit_to}&#39; |<br>
&gt;&gt; &gt;          &#39;Exit ${mkgmap:exit_hint_name}&#39; |<br>
&gt;&gt; &gt;          &#39;Exit ${mkgmap:exit_hint_ref}&#39;<br>
&gt;&gt; &gt;        }<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; As always, thanks in advance to any help you can provide.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Dave<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Dave Swarthout<br>
&gt;&gt; &gt; Homer, Alaska<br>
&gt;&gt; &gt; Chiang Mai, Thailand<br>
&gt;&gt; &gt; Travel Blog at <a href="http://dswarthout.blogspot.com" target="_blank">http://dswarthout.blogspot.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; mkgmap-dev mailing list<br>
&gt;&gt;<br>
&gt;&gt; &gt; mkgmap-dev@.org<br>
&gt;&gt;<br>
&gt;&gt; &gt; <a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <a href="http://gis.19327.n5.nabble.com/Routing-parameters-tp5844762p5844766.html" target="_blank">http://gis.19327.n5.nabble.com/Routing-parameters-tp5844762p5844766.html</a><br>
&gt;&gt; Sent from the Mkgmap Development mailing list archive at Nabble.com.<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mkgmap-dev mailing list<br>
&gt;&gt;<br>
<br>
</div></div>&gt; mkgmap-dev@.org<br>
<span class=""><br>
&gt;&gt; <a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Dave Swarthout<br>
&gt;&gt; Homer, Alaska<br>
&gt;&gt; Chiang Mai, Thailand<br>
&gt;&gt; Travel Blog at <a href="http://dswarthout.blogspot.com" target="_blank">http://dswarthout.blogspot.com</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________ mkgmap-dev mailing list<br>
&gt;&gt;<br>
<br>
</span>&gt; mkgmap-dev@.org<br>
<span class=""><br>
&gt;&gt; <a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mkgmap-dev mailing list<br>
&gt;&gt;<br>
<br>
</span>&gt; mkgmap-dev@.org<br>
<span class=""><br>
&gt;&gt; <a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Dave Swarthout<br>
&gt; Homer, Alaska<br>
&gt; Chiang Mai, Thailand<br>
&gt; Travel Blog at <a href="http://dswarthout.blogspot.com" target="_blank">http://dswarthout.blogspot.com</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; mkgmap-dev mailing list<br>
<br>
</span>&gt; mkgmap-dev@.org<br>
<br>
&gt; <a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gis.19327.n5.nabble.com/Routing-parameters-tp5844762p5844865.html" target="_blank">http://gis.19327.n5.nabble.com/Routing-parameters-tp5844762p5844865.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the Mkgmap Development mailing list archive at Nabble.com.<br>
_______________________________________________<br>
mkgmap-dev mailing list<br>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a><br>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Dave Swarthout<br>Homer, Alaska<br>Chiang Mai, Thailand<br>Travel Blog at <a href="http://dswarthout.blogspot.com" target="_blank">http://dswarthout.blogspot.com</a></div></div>
</div>