@Gerd,
There is no problem and your brief explanation helped. Everything is
working fine but I wanted to understand the logic of the rule better. But
because I don't have any way to experiment with running different strings
through those filters I'm having trouble visualizing what they are doing.
In the style manual some examples of the subst filter in action are shown
for illustrative purposes:
Example, if name ="Queen Street"
${name|subst:"Queen=>"} returns " Street"
${name|subst:"Queen=>King"} returns "King Street"
${name|subst:".*\s~>"} returns "Street"
I was wanting some similar explanation for how that long rule works.
Something like this:
If the following tag exists on a way, destination:ref=US 20;Rochester
the results will be
????
I was not seeing what this part of that single long rule was doing until
you mentioned cleaning up blanks and semicolons:
name '${destination:ref|subst: =>} ${destination|subst:;=> |subst:/=> }'
To me it appeared to be setting the name of the way to blank or null if it
encounters the tag destination:ref but now I understand it is eliminating
blanks and other punctuation because I noticed the blank character
following the colon in the subst command. So that means the second part
removes semicolons. But why is it doing that? And what part gets passed to
the Garmin "assistant" who then voices the information as the exit on a
route is approached?
Continuing: After all the punctuation has been stripped from the
destination tag we move to the next part of the rule.
'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}' |
highway=road
'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}' |
'Exit ${mkgmap:exit_hint_exit_to}' |
'Exit ${mkgmap:exit_hint_name}' |
'Exit ${mkgmap:exit_hint_ref}'
This seems to be setting a variable named "Exit" to whatever is contained
in the mkgmap internal variables. Is that what's happening? Where are those
variables defined and set? Where does the data come from?
Another big question is about the exit_to tag. Take this example of a
motorway junction node. No destination tag appears on the linking way
itself but my Garmin will speak the words properly as you approach Exit 10:
highway=motorway_junction
ref:Exit 10
exit_to:Greenville;South NC 40; US 421
I cannot find a rule that tells me how an exit_to tag is handled. Where
does that information get processed? And how does the "assistant" know what
words to speak?
In summary, those are the questions I'm trying to answer. Now that I'm
writing style rules of my own I want to better understand how they work.
It's a slow process, especially when the examples in the manual are so
simple. Perhaps a more complex, real world, example would help future
mappers.
Dave
On Sat, May 16, 2015 at 3:04 AM, Gerd Petermann <
[email protected]> wrote:
>
>
> ------------------------------
> From: [email protected]
> To: [email protected]
> Subject: RE: [mkgmap-dev] Routing parameters
> Date: Sat, 16 May 2015 12:02:22 +0200
>
>
> Hi Dave,
>
> not sure what the problem is.
> The subst filters are just used to remove some blanks or semicolons.
> The rest is more or less "a list of alternative expressions separated with
> a vertical bar",
> you can search for that term in the style manual:
> http://www.mkgmap.org.uk/doc/pdf/style-manual.pdf
>
> I've never tried these options because I use my GPS only for cycling,
> but my understanding is that the types 0x08 and 0x09 are special
> as they instruct the Garmin device to use the name of the road for the
> destination hint, and these rules are used to fill this name with useful
> information.
>
> Does that help?
>
> Gerd
>
> ------------------------------
> From: [email protected]
> Date: Fri, 15 May 2015 17:51:13 -0700
> To: [email protected]
> Subject: Re: [mkgmap-dev] Routing parameters
>
> Yes, as you can see above, I understand the intent of those two options.
> But if someone could further explain what's happening in the rule, I would
> be most appreciative.
>
> I'm guessing the first part assigns a name or ref if one appears in the
> tagging but understanding the logic of the series of "subst" filters
> following that is, for a newbie, quite challenging.
>
> On Fri, May 15, 2015 at 12:17 PM, GerdP <[email protected]>
> wrote:
>
> Hi Dave,
>
> please check the documentation for --process-destination and
> --process-exits:
> http://www.mkgmap.org.uk/doc/options
>
> If I got this right, these option mark exits so that Garmin knows where
> they are where they lead.
>
> Gerd
>
>
> Dave Swarthout wrote
> > I am curious to know how mkgmap handles the display of and text to speech
> > aspects of motorway junctions. It's hard to test for this without
> actually
> > creating a route and then driving it to see and hear what the Garmin is
> > doing with the data or to discover where it gets the information from.
> >
> > I'm assuming that whatever one puts in the exit_to=* tag gets displayed
> > and
> > spoken by the Garmin "assistant". Does mkgmap ever use the destination=*
> > tag, and if so under what circumstances?
> >
> > I found this rule in the lines style sheet, but I do not understand it
> > well
> > enough to help me answer my question
> >
> > (highway=motorway_link | highway=trunk_link) & mkgmap:exit_hint=true &
> > mkgmap:dest_hint=true
> > { name '${destination:ref|subst: =>} ${destination|subst:;=> |subst:/=>
> > }' |
> > '${ref|subst: =>} ${destination|subst:;=> |subst:/=> }' |
> > '${destination|subst:;=> |subst:/=> }' |
> > 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}' |
> > highway=road
> > 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}' |
> > 'Exit ${mkgmap:exit_hint_exit_to}' |
> > 'Exit ${mkgmap:exit_hint_name}' |
> > 'Exit ${mkgmap:exit_hint_ref}'
> > }
> >
> >
> > As always, thanks in advance to any help you can provide.
> >
> > Dave
> >
> > --
> > Dave Swarthout
> > Homer, Alaska
> > Chiang Mai, Thailand
> > Travel Blog at http://dswarthout.blogspot.com
> >
> > _______________________________________________
> > mkgmap-dev mailing list
>
> > [email protected]
>
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
>
>
>
> --
> View this message in context:
> http://gis.19327.n5.nabble.com/Routing-parameters-tp5844762p5844766.html
> Sent from the Mkgmap Development mailing list archive at Nabble.com.
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
>
>
> --
> Dave Swarthout
> Homer, Alaska
> Chiang Mai, Thailand
> Travel Blog at http://dswarthout.blogspot.com
>
> _______________________________________________ mkgmap-dev mailing list
> [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev