<div dir="ltr">Yes, that explains how the Garmin can display a destination even if an exit_to tag does not exist. I also understand better now, after your clarifications, how the destination code works with the mkgmap hinting variables. <div><br></div><div>I'm still having trouble getting the echotags command to work, even with your package. It's complicated to explain because I'm trying to keep your code separate from my stuff but I will keep trying. In the meantime, I solved the problem another way. I merely created two style rules to process exit_to and destination tags so they display on my maps. Now, when I drive past exits the tagging data, if present, will display. In addition I can easily tell from my desktop in Basecamp whether the exit_to tag has been added on that particular node and if not, I can add it myself.</div><div><br></div><div>destination=* {name 'Dest: ${destination}' } #lines style file<br></div><div><br></div><div>exit_to=* {name 'Exit ${ref} ${exit_to}' | '${exit_to}' } [0x12615 resolution 24] #points style file - uses an icon I created<br></div><div><br></div><div>I don't think these two rules will affect the processing of the following rules that we've been discussing because those check highway=*_link tags. At any rate, I have what I need for now.</div><div><br></div><div>I'll let you know about my trials with the echotags command later.</div><div><br></div><div>Thanks very much,</div><div><br></div><div>Dave</div><div><br></div><div>PS: Thanks for including that Java code snippet. I can understand why placing an exit_to tag on highways other than trunk or motorway will never show up. The code only processes links for motorways and trunks. Just in passing let me say it would be helpful if primary highways were included there as many of those have exits similar to motorways. But that's a topic for another day.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 17, 2015 at 8:24 AM, Gerd Petermann <span dir="ltr"><<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Hi all,<br><br>okay, I have now analysed a few situations and I think <br>one problem with the documentation of the --process-exits <br>and --process-destination option is that it doesn't clearly explain <br>what problem you have when you don't use the option.<br><br>My understanding now is this:<br>When Garmin calculates a route and it finds<br>a *_link way with type 0x08 or 0x09 <br>on that route it looks for the name <br>of the next road which is not a link. This name is used for the <br>"exit to ..." messsage.<br>When you want to see / here the information in the destination=* tag<br>or the exit_to=* tag mkgmap has to create a way that is not a link<br>and that has the wanted name.<br>The options --process-exits and process-destination prepare this<br>by splitting the link way and creating a short way tagged with as much info as available<br>while the style rules are used to calculate the name.<br><br>I see a few problems regarding the algo, esp. when a motorway <br>splits into two motorway_link roads. The current algo seems to<br>add the exit_to tag to both links, see e.g. node 97002577.<br>I guess it should ignore the exit_to tag in this case?<br><br>The current source also ignores the tags exit_to:left / exit_to:right.<br>These tags are not often used, so I think this problem is small.<br><br>Does all that make sense?<br><br>Gerd<br><br><div><hr>From: <a href="mailto:daveswarthout@gmail.com" target="_blank">daveswarthout@gmail.com</a><br>Date: Sat, 16 May 2015 15:43:20 -0700<br>To: <a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>Subject: Re: [mkgmap-dev] FW: Routing parameters<div><div class="h5"><br><br><div dir="ltr">Also, not to be a pest, but does anyone know how the exit_to tag is processed?</div><div><br><div>On Sat, May 16, 2015 at 2:18 PM, Dave Swarthout <span dir="ltr"><<a href="mailto:daveswarthout@gmail.com" target="_blank">daveswarthout@gmail.com</a>></span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for the help but the echotags directive does not work for me the way you have it. I'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 "motorway or trunk link seen" }<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't very informative unfortunately.</div><div><br></div><div>Your suggestion</div><span><div><br></div><div><span style="font-size:16px">(highway=motorway_link | highway=trunk_link) & mkgmap:exit_hint=true &<br>mkgmap:dest_hint=true<br></span><span style="font-size:16px"> { echotags "before";</span><br style="font-size:16px"><span style="font-size:16px">name '${destination:ref|subst: =>} ${destination|subst:;=> |subst:/=> }' |<br> '${ref|subst: =>} ${destination|subst:;=> |subst:/=> }' |<br> '${destination|subst:;=> |subst:/=> }' |<br> 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}' |<br></span><span style="font-size:16px"> 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}' |<br> 'Exit ${mkgmap:exit_hint_exit_to}' |<br> 'Exit ${mkgmap:exit_hint_name}' |<br></span><span style="font-size:16px"> 'Exit ${mkgmap:exit_hint_ref}' ;</span><br style="font-size:16px"><span style="font-size:16px">echotags "after"</span><br style="font-size:16px"><span style="font-size:16px"> }</span><br></div><div><span style="font-size:16px"><br></span></div></span><div>produced nothing at all. I know there must be a way to debug these blasted rules but the echotags and echo command don't seem to work all that well.</div></div><div><div><div><br><div>On Sat, May 16, 2015 at 12:22 PM, GerdP <span dir="ltr"><<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>></span> wrote:<br><blockquote style="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>(highway=motorway_link | highway=trunk_link) & mkgmap:exit_hint=true &<br>
mkgmap:dest_hint=true<br>
</span> { echotags "before";<br>
<span>name '${destination:ref|subst: =>} ${destination|subst:;=> |subst:/=> }' |<br>
'${ref|subst: =>} ${destination|subst:;=> |subst:/=> }' |<br>
'${destination|subst:;=> |subst:/=> }' |<br>
'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}' |<br>
</span><span> 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}' |<br>
'Exit ${mkgmap:exit_hint_exit_to}' |<br>
'Exit ${mkgmap:exit_hint_name}' |<br>
</span> 'Exit ${mkgmap:exit_hint_ref}' ;<br>
echotags "after"<br>
}<br>
<br>
BTW: You posted a rule which doesn't appear in the default style,<br>
the phrase "highway=road" looks wrong there.<br>
<br>
Ciao,<br>
Gerd<br>
<br>
<br>
Dave Swarthout wrote<br>
<div><div>> @Gerd,<br>
><br>
> There is no problem and your brief explanation helped. Everything is<br>
> working fine but I wanted to understand the logic of the rule better. But<br>
> because I don't have any way to experiment with running different strings<br>
> through those filters I'm having trouble visualizing what they are doing.<br>
> In the style manual some examples of the subst filter in action are shown<br>
> for illustrative purposes:<br>
><br>
> Example, if name ="Queen Street"<br>
> ${name|subst:"Queen=>"} returns " Street"<br>
> ${name|subst:"Queen=>King"} returns "King Street"<br>
> ${name|subst:".*\s~>"} returns "Street"<br>
><br>
> I was wanting some similar explanation for how that long rule works.<br>
> Something like this:<br>
><br>
> If the following tag exists on a way, destination:ref=US 20;Rochester<br>
> the results will be<br>
> ????<br>
><br>
> I was not seeing what this part of that single long rule was doing until<br>
> you mentioned cleaning up blanks and semicolons:<br>
><br>
> name '${destination:ref|subst: =>} ${destination|subst:;=> |subst:/=> }'<br>
><br>
> To me it appeared to be setting the name of the way to blank or null if it<br>
> encounters the tag destination:ref but now I understand it is eliminating<br>
> blanks and other punctuation because I noticed the blank character<br>
> following the colon in the subst command. So that means the second part<br>
> removes semicolons. But why is it doing that? And what part gets passed to<br>
> the Garmin "assistant" who then voices the information as the exit on a<br>
> route is approached?<br>
><br>
> Continuing: After all the punctuation has been stripped from the<br>
> destination tag we move to the next part of the rule.<br>
><br>
> 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}' |<br>
> highway=road<br>
> 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}' |<br>
> 'Exit ${mkgmap:exit_hint_exit_to}' |<br>
> 'Exit ${mkgmap:exit_hint_name}' |<br>
> 'Exit ${mkgmap:exit_hint_ref}'<br>
><br>
> This seems to be setting a variable named "Exit" to whatever is contained<br>
> in the mkgmap internal variables. Is that what's happening? Where are<br>
> those<br>
> variables defined and set? Where does the data come from?<br>
><br>
> Another big question is about the exit_to tag. Take this example of a<br>
> motorway junction node. No destination tag appears on the linking way<br>
> itself but my Garmin will speak the words properly as you approach Exit<br>
> 10:<br>
><br>
> highway=motorway_junction<br>
> ref:Exit 10<br>
> exit_to:Greenville;South NC 40; US 421<br>
><br>
> I cannot find a rule that tells me how an exit_to tag is handled. Where<br>
> does that information get processed? And how does the "assistant" know<br>
> what<br>
> words to speak?<br>
><br>
> In summary, those are the questions I'm trying to answer. Now that I'm<br>
> writing style rules of my own I want to better understand how they work.<br>
> It's a slow process, especially when the examples in the manual are so<br>
> simple. Perhaps a more complex, real world, example would help future<br>
> mappers.<br>
><br>
> Dave<br>
><br>
><br>
> On Sat, May 16, 2015 at 3:04 AM, Gerd Petermann <<br>
<br>
> gpetermann_muenchen@<br>
<br>
</div></div>>> wrote:<br>
><br>
>><br>
>><br>
>> ------------------------------<br>
>> From:<br>
<br>
> gpetermann_muenchen@<br>
<br>
>> To:<br>
<br>
> daveswarthout@<br>
<span><br>
>> Subject: RE: [mkgmap-dev] Routing parameters<br>
>> Date: Sat, 16 May 2015 12:02:22 +0200<br>
>><br>
>><br>
>> Hi Dave,<br>
>><br>
>> not sure what the problem is.<br>
>> The subst filters are just used to remove some blanks or semicolons.<br>
>> The rest is more or less "a list of alternative expressions separated<br>
>> with<br>
>> a vertical bar",<br>
>> you can search for that term in the style manual:<br>
>> <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>
>><br>
>> I've never tried these options because I use my GPS only for cycling,<br>
>> but my understanding is that the types 0x08 and 0x09 are special<br>
>> as they instruct the Garmin device to use the name of the road for the<br>
>> destination hint, and these rules are used to fill this name with useful<br>
>> information.<br>
>><br>
>> Does that help?<br>
>><br>
>> Gerd<br>
>><br>
</span>>> ------------------------------<br>
>> From:<br>
<br>
> daveswarthout@<br>
<span><br>
>> Date: Fri, 15 May 2015 17:51:13 -0700<br>
>> To:<br>
<br>
</span>> mkgmap-dev@.org<br>
<span><br>
>> Subject: Re: [mkgmap-dev] Routing parameters<br>
>><br>
>> Yes, as you can see above, I understand the intent of those two options.<br>
>> But if someone could further explain what's happening in the rule, I<br>
>> would<br>
>> be most appreciative.<br>
>><br>
>> I'm guessing the first part assigns a name or ref if one appears in the<br>
>> tagging but understanding the logic of the series of "subst" filters<br>
>> following that is, for a newbie, quite challenging.<br>
>><br>
>> On Fri, May 15, 2015 at 12:17 PM, GerdP <<br>
<br>
> gpetermann_muenchen@<br>
<br>
> ><br>
</span><div><div>>> wrote:<br>
>><br>
>> Hi Dave,<br>
>><br>
>> please check the documentation for --process-destination and<br>
>> --process-exits:<br>
>> <a href="http://www.mkgmap.org.uk/doc/options" target="_blank">http://www.mkgmap.org.uk/doc/options</a><br>
>><br>
>> If I got this right, these option mark exits so that Garmin knows where<br>
>> they are where they lead.<br>
>><br>
>> Gerd<br>
>><br>
>><br>
>> Dave Swarthout wrote<br>
>> > I am curious to know how mkgmap handles the display of and text to<br>
>> speech<br>
>> > aspects of motorway junctions. It's hard to test for this without<br>
>> actually<br>
>> > creating a route and then driving it to see and hear what the Garmin is<br>
>> > doing with the data or to discover where it gets the information from.<br>
>> ><br>
>> > I'm assuming that whatever one puts in the exit_to=* tag gets displayed<br>
>> > and<br>
>> > spoken by the Garmin "assistant". Does mkgmap ever use the<br>
>> destination=*<br>
>> > tag, and if so under what circumstances?<br>
>> ><br>
>> > I found this rule in the lines style sheet, but I do not understand it<br>
>> > well<br>
>> > enough to help me answer my question<br>
>> ><br>
>> > (highway=motorway_link | highway=trunk_link) & mkgmap:exit_hint=true &<br>
>> > mkgmap:dest_hint=true<br>
>> > { name '${destination:ref|subst: =>} ${destination|subst:;=><br>
>> |subst:/=><br>
>> > }' |<br>
>> > '${ref|subst: =>} ${destination|subst:;=> |subst:/=> }' |<br>
>> > '${destination|subst:;=> |subst:/=> }' |<br>
>> > 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}' |<br>
>> > highway=road<br>
>> > 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}' |<br>
>> > 'Exit ${mkgmap:exit_hint_exit_to}' |<br>
>> > 'Exit ${mkgmap:exit_hint_name}' |<br>
>> > 'Exit ${mkgmap:exit_hint_ref}'<br>
>> > }<br>
>> ><br>
>> ><br>
>> > As always, thanks in advance to any help you can provide.<br>
>> ><br>
>> > Dave<br>
>> ><br>
>> > --<br>
>> > 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><br>
>> ><br>
>> > _______________________________________________<br>
>> > mkgmap-dev mailing list<br>
>><br>
>> > mkgmap-dev@.org<br>
>><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>
>><br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <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>
>> Sent from the Mkgmap Development mailing list archive at Nabble.com.<br>
>> _______________________________________________<br>
>> mkgmap-dev mailing list<br>
>><br>
<br>
</div></div>> mkgmap-dev@.org<br>
<span><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>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> 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><br>
>><br>
>> _______________________________________________ mkgmap-dev mailing list<br>
>><br>
<br>
</span>> mkgmap-dev@.org<br>
<span><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>
>><br>
>> _______________________________________________<br>
>> mkgmap-dev mailing list<br>
>><br>
<br>
</span>> mkgmap-dev@.org<br>
<span><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>
>><br>
><br>
><br>
><br>
> --<br>
> 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><br>
><br>
> _______________________________________________<br>
> mkgmap-dev mailing list<br>
<br>
</span>> mkgmap-dev@.org<br>
<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>
<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><div>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" target="_blank">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><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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><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>
<br>_______________________________________________
mkgmap-dev mailing list
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a></div></div></div>                                            </div></div>
<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></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>