logo separator

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

From greg crago gregcrago at gmail.com on Tue Mar 22 12:37:34 GMT 2016

I have another suggestion.

Can you make a mkgmap:actual_destination variable that is set to the
destination=* tag, if it exists. That was mappers would not have to change
their code and I can just use this new variable to get the information I
want.

Greg

On Mon, Mar 21, 2016 at 11:27 AM, greg crago <gregcrago at gmail.com> wrote:

> Gerd,
>
> Sorry to be so much trouble. Just trying to understand how mkgmap works.
> I have studied the OSM wiki page for EXIT INFO and I assumed that each tag
> would get it's own mkgmap:(variable)
>
> If a DESTINATION tag did not exits, I did not realize, it would be
> assigned to any other existing tags.
>
> I was trying to form a coherent string based on each tag defined in the
> motorway_link. What was messing me up was that DESTINATION was begin set to
> something other that the DESTINATION tag, if it did not exist.
>
> Your written english is perfect. When I went back to read your posts, I
> read this:
>
> "If a value for destination is found, the tag destination is set to it
> and the way is split."
>
> I just assumed that there would be nothing set for 'destination' if it did
> NOT exist.
>
> I vote for keeping each OSM tag separate, so mappers can build better exit
> 'strings'. What I find is that I get DUPLICATES because now I get a
> 'destination'=Beck Road' and a 'destionation:street'=Beck Rd.
>
> If someone can show me some code that can remove these duplicates, please
> let me know. I was just using the standard code structure to build a string
> only if certain tags existed.
>
> Thank you for your help. I was not trying to be difficult.
>
> Greg
>
> On Mon, Mar 21, 2016 at 4:01 AM, Gerd Petermann <
> GPetermann_muenchen at hotmail.com> wrote:
>
>> 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>
>> 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
>>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>>>
>>
>>
>> _______________________________________________
>> mkgmap-dev mailing list
>> 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/20160322/6ca0c8f4/attachment.html>


More information about the mkgmap-dev mailing list