logo separator

[mkgmap-dev] Exit_hint and Dest_hint result is not what I was expecting

From Gerd Petermann GPetermann_muenchen at hotmail.com on Mon Mar 21 08:01:50 GMT 2016

Hi Greg,


"why is "Beck Road" being set for variable $[destination] ??"

I've answered this question multiple times now, seems my english is too bad, so

I try again.


The option --process-destination in mkgmap triggers a function that

is execute when the OSM data is read and before your style rules are executed.

This function checks a list of tags ike destination, destination:forward, destination:lanes

and destination:street . When any of those is found mkgmap adds the tag mkgmap:dest_hint=true

and if the tag destination is not already set it is set with the value that was found in the

alternatives.

I guess this happens because nobody tried to create detailed hints like you do.

If I'd start to code this now I would simplify the code so that it

sets mkgmap:dest_hint to the value that was found. So, instead of checking

mkgmap:dest_hint=true one would use mkgmap:dest_hint=*


If I change that now all style authors have to change the corresponding rules,

so I'd like to get positive feedback for this idea before I change the code.


Gerd








________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von greg crago <gregcrago at gmail.com>
Gesendet: Montag, 21. März 2016 00:12
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Exit_hint and Dest_hint result is not what I was expecting

Now we are getting somewhere:

I ran this code:

# build destination hint
dest_hint=* { delete dest_hint }
highway=* & mkgmap:dest_hint=true { echo 'BEFORE destination=${destination}';
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-}';
set destination = '${destination|subst:/=>,}';
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}';
echo 'AFTER destination=${destination}';
}

And got this response from mkgmap:

Time started: Sun Mar 20 19:09:49 EDT 2016
Found one style in \MKGMAP\openmapchest-style\openmapchest
finished check-styles
4611686018427387907 (8729200): BEFORE destination=Beck Road
4611686018427387907 (8729200): AFTER destination=Beck Road
4611686018427387909 (8729934): BEFORE destination=Beck Road
4611686018427387909 (8729934): AFTER destination=Beck Road
Number of MapFailedExceptions: 0
Number of ExitExceptions: 0
Time finished: Sun Mar 20 19:09:51 EDT 2016
Total time taken: 1497ms

If you look at the OSM data, there IS NO DESTINATION tag, so why is "Beck Road" being set for variable $[destination] ??

Greg

On Sat, Mar 19, 2016 at 5:42 PM, Andrzej Popowski <popej at poczta.onet.pl<mailto:popej at poczta.onet.pl>> wrote:
Hi,

> No, echotags expects a string constant as parm, and it prints all
> tags of an object

It is not that bad, I think it works like string in "set" command. This should work:
... {echotags 'testing destination=${destination}'}

but it is kind of redundant, maybe better looking would be:

... {echo 'testing destination=${destination}'}

--
Best regards,
Andrzej


_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160321/d407d78f/attachment.html>


More information about the mkgmap-dev mailing list