length() and mkgmap:line2poitype

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

length() and mkgmap:line2poitype

ligfietser
Hi,
I'd like to add specific pois for restricted access on bridges and tunnels with mkgmap:line2poitype, but not all bridges are as important, only the longer ones.

This is working:
mkgmap:line2poitype=start & (bridge=* | tunnel=*) & (bicycle:conditional=* | access:conditional=* | vehicle:conditional=*)  { name 'bicycle=${bicycle:conditional}' | 'access=${access:conditional}'|  'vehicle=${vehicle:conditional}'} [0x2809 resolution 24]

However, it is not possible to add the length() operator into the points style file, because I don't want small short bridges.

I know I can use the lines style file, but adding a custom line tag like restricted_access_on_bridges=yes and use this in the points style does not seem to work. I know I can add this line to the map and render it, but I prefer a point symbol, not another line on a already huge pile of lines on top of each other.

Is this because points are processed before lines?
Is there another trick I can use?



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

Re: length() and mkgmap:line2poitype

Gerd Petermann
Hi,

the POIs are generated from the original lines before style processing. I could add java code to calculate the length of the way before the POIs are generated and add it as a special tag... Looking at the source I see that the length is already calculated,
so the only disadvantage would be the increase in memory usage.

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von lig fietser <[hidden email]>
Gesendet: Samstag, 6. April 2019 17:34
An: mkgmap-dev
Betreff: [mkgmap-dev] length() and mkgmap:line2poitype

Hi,
I'd like to add specific pois for restricted access on bridges and tunnels with mkgmap:line2poitype, but not all bridges are as important, only the longer ones.

This is working:
mkgmap:line2poitype=start & (bridge=* | tunnel=*) & (bicycle:conditional=* | access:conditional=* | vehicle:conditional=*)  { name 'bicycle=${bicycle:conditional}' | 'access=${access:conditional}'|  'vehicle=${vehicle:conditional}'} [0x2809 resolution 24]

However, it is not possible to add the length() operator into the points style file, because I don't want small short bridges.

I know I can use the lines style file, but adding a custom line tag like restricted_access_on_bridges=yes and use this in the points style does not seem to work. I know I can add this line to the map and render it, but I prefer a point symbol, not another line on a already huge pile of lines on top of each other.

Is this because points are processed before lines?
Is there another trick I can use?


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

Re: length() and mkgmap:line2poitype

nwillink
Hi Gerd

This would be a great addition as it would also avoid adding symbols for
walking routes on smaller sections of a long distance route.

Nick


On 06/04/2019 17:22, Gerd Petermann wrote:

> Hi,
>
> the POIs are generated from the original lines before style processing. I could add java code to calculate the length of the way before the POIs are generated and add it as a special tag... Looking at the source I see that the length is already calculated,
> so the only disadvantage would be the increase in memory usage.
>
> Gerd
>
> ________________________________________
> Von: mkgmap-dev <[hidden email]> im Auftrag von lig fietser <[hidden email]>
> Gesendet: Samstag, 6. April 2019 17:34
> An: mkgmap-dev
> Betreff: [mkgmap-dev] length() and mkgmap:line2poitype
>
> Hi,
> I'd like to add specific pois for restricted access on bridges and tunnels with mkgmap:line2poitype, but not all bridges are as important, only the longer ones.
>
> This is working:
> mkgmap:line2poitype=start & (bridge=* | tunnel=*) & (bicycle:conditional=* | access:conditional=* | vehicle:conditional=*)  { name 'bicycle=${bicycle:conditional}' | 'access=${access:conditional}'|  'vehicle=${vehicle:conditional}'} [0x2809 resolution 24]
>
> However, it is not possible to add the length() operator into the points style file, because I don't want small short bridges.
>
> I know I can use the lines style file, but adding a custom line tag like restricted_access_on_bridges=yes and use this in the points style does not seem to work. I know I can add this line to the map and render it, but I prefer a point symbol, not another line on a already huge pile of lines on top of each other.
>
> Is this because points are processed before lines?
> Is there another trick I can use?
>
>
> _______________________________________________
> 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: length() and mkgmap:line2poitype

ligfietser
Thanks Gerd, looking forward to it.


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

Re: length() and mkgmap:line2poitype

Gerd Petermann
Hi all,

attached is a quick hack to implement this.
The tag mkgmap:way-length is added to all generated way POI and contains the rounded length of the way in meters.
The binary is here: http://files.mkgmap.org.uk/download/445/mkgmap.jar

Please let me know if it works as expected and I'll add the docu for it.

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von lig fietser <[hidden email]>
Gesendet: Samstag, 6. April 2019 18:46
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] length() and mkgmap:line2poitype

Thanks Gerd, looking forward to it.


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

way-length.patch (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: length() and mkgmap:line2poitype

nwillink

Hi Gerd

Great! It works for me. Many thanks!

Nick

On 06/04/2019 18:12, Gerd Petermann wrote:
Hi all,

attached is a quick hack to implement this.
The tag mkgmap:way-length is added to all generated way POI and contains the rounded length of the way in meters.
The binary is here: http://files.mkgmap.org.uk/download/445/mkgmap.jar

Please let me know if it works as expected and I'll add the docu for it.

Gerd

________________________________________
Von: mkgmap-dev [hidden email] im Auftrag von lig fietser [hidden email]
Gesendet: Samstag, 6. April 2019 18:46
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] length() and mkgmap:line2poitype

Thanks Gerd, looking forward to it.


_______________________________________________
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: length() and mkgmap:line2poitype

ligfietser
Yes, works for me too, excellent, thanks Gerd!

Van: mkgmap-dev <[hidden email]> namens osm@pinns <[hidden email]>
Verzonden: zaterdag 6 april 2019 10:25
Aan: [hidden email]
Onderwerp: Re: [mkgmap-dev] length() and mkgmap:line2poitype
 

Hi Gerd

Great! It works for me. Many thanks!

Nick

On 06/04/2019 18:12, Gerd Petermann wrote:
Hi all,

attached is a quick hack to implement this.
The tag mkgmap:way-length is added to all generated way POI and contains the rounded length of the way in meters.
The binary is here: http://files.mkgmap.org.uk/download/445/mkgmap.jar

Please let me know if it works as expected and I'll add the docu for it.

Gerd

________________________________________
Von: mkgmap-dev [hidden email] im Auftrag von lig fietser [hidden email]
Gesendet: Samstag, 6. April 2019 18:46
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] length() and mkgmap:line2poitype

Thanks Gerd, looking forward to it.


_______________________________________________
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