logo separator

[mkgmap-dev] Example of logging Echotags to file

From Joris Bo jorisbo at hotmail.com on Tue Mar 27 20:09:33 BST 2018

Thx again Gerd,

I'll try it soon

Gr Joris


-----Oorspronkelijk bericht-----
Van: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> Namens Gerd Petermann
Verzonden: maandag 26 maart 2018 08:40
Aan: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
Onderwerp: Re: [mkgmap-dev] Example of logging Echotags to file

Hi,
I see no need to use two rules:
relevant-condition & length() != -1 {echotags 'all'} should show the tag  mkgmap:cache_length.
This does not work with all style functions, only with the cached ones.
At the moment these are area_size(), length(), and maxspeed (maxspeedkmh or maxspeedmph).

When you get 0 from area_size() the way is not closed. This would be the case for some multipolygon members.
I also was not able to create a rule that sets a tag to the value of the value returned by length() or area_size().
It seems this is not implemented.

I've attached a small patch that sets the tag mkgmap:cache_area_size for all ways with mkgmap:mp_created=true & mkgmap:stylefilter=polyline Don't know why this was not done alredy.

With this patch you can use rules like these in lines:
boundary=* & mkgmap:mp_created=true & area_size() > 100000  {echotags "big"}
boundary=* & mkgmap:mp_created=true & area_size() > 1000000  {echotags "bigger"}

A binary is here:
http://files.mkgmap.org.uk/download/426/mkgmap.jar

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
Gesendet: Sonntag, 25. März 2018 23:43:23
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Example of logging Echotags to file

Hi Joris

To see the value of a function in the echotags try something like:

relevant-condition & length() > 0 {}
relevant-condition {echotags 'length'}

the cache value of the length should be in the tags

Regards
Ticker

On Sat, 2018-03-24 at 18:49 +0000, Joris Bo wrote:
> Hallo
>
> Thank you, that was the trick !
> I'm trying to show a thin border (line) around Boundary = 
> nature_reserve on lower zoomlevels based on the size of it and another 
> thicker linetype at higher zoomlevels.
>
> Question 1
> From within the Lines-file I would like to have the result of the
> length() and area_size () function in an echotag result variable I 
> only get errors when trying to add tags or set existing tags to these 
> function values Does somebody has an example?
>
> Question 2
> Is it possible to retrieve the area_size() of an mkgmap:mp_created 
> multipolygon from within the lines file? For me it looks like it 
> always returns 0
>
>
>
>
>
> Van: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> Namens 
> Henning Scholland
> Verzonden: zaterdag 24 maart 2018 13:50
> Aan: mkgmap-dev at lists.mkgmap.org.uk
> Onderwerp: Re: [mkgmap-dev] Example of logging Echotags to file
>
> Hi Joris,
> I'm using java .... 1> mkgmap.log 2> mkgmap_error.log In that case you 
> will find the echo-tags in mkgmap-error.log together with all other 
> error-messages send to stdout.
>
> Henning
>
>
> On 24.03.2018 13:11, Joris Bo wrote:
> Hello
>
> Does somebody have an example of logging the output of echotags to 
> file rather then the command window.
> I tried a lot already  like:   java > c:\temp\log.txt
> The logfile is created but the log only shows basic info and not the 
> Echotags info
>
> Thx in advance
> Joris
>
>
>
>
> _______________________________________________
> 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
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list