Example of logging Echotags to file

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Example of logging Echotags to file

Joris Bo

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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Example of logging Echotags to file

Henning Scholland
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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Example of logging Echotags to file

Gerd Petermann
Hi,

one small correction:
You'll find the stdout messages in mkgmap.log and stderr in mkgmap_error.log
This is standard in the command shell, should work with all command line programs.

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von Henning Scholland <[hidden email]>
Gesendet: Samstag, 24. März 2018 13:49:36
An: [hidden email]
Betreff: 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
[hidden email]<mailto:[hidden email]>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Example of logging Echotags to file

Joris Bo
In reply to this post by Henning Scholland

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 <[hidden email]> Namens Henning Scholland
Verzonden: zaterdag 24 maart 2018 13:50
Aan: [hidden email]
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
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

 


_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Example of logging Echotags to file

Ticker Berkin
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 <[hidden email]> Namens
> Henning Scholland
> Verzonden: zaterdag 24 maart 2018 13:50
> Aan: [hidden email]
> 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
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>  
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Example of logging Echotags to file

Gerd Petermann
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 <[hidden email]> im Auftrag von Ticker Berkin <[hidden email]>
Gesendet: Sonntag, 25. März 2018 23:43:23
An: [hidden email]
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 <[hidden email]> Namens
> Henning Scholland
> Verzonden: zaterdag 24 maart 2018 13:50
> Aan: [hidden email]
> 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
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

area_size.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Example of logging Echotags to file

Joris Bo
Thx again Gerd,

I'll try it soon

Gr Joris


-----Oorspronkelijk bericht-----
Van: mkgmap-dev <[hidden email]> Namens Gerd Petermann
Verzonden: maandag 26 maart 2018 08:40
Aan: Development list for mkgmap <[hidden email]>
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 <[hidden email]> im Auftrag von Ticker Berkin <[hidden email]>
Gesendet: Sonntag, 25. März 2018 23:43:23
An: [hidden email]
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 <[hidden email]> Namens
> Henning Scholland
> Verzonden: zaterdag 24 maart 2018 13:50
> Aan: [hidden email]
> 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
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev