Hi Gerd,
I have --add-pois-to-lines in my command, but right near the beginning of my
points file I have
mkgmap:line2poitype=start | mkgmap:line2poitype=inner | mkgmap:line2poitype=end
{deletealltags} # only centre of line wanted
I wonder whether there could be some efficiency improvement by extending the
--add-pois-to-lines option to be something like
--add-pois-to-lines[=start|end|inner|mid[,...]]
We would then reduce the number of unwanted POIs created.
I actually only use this for placing bridge and tunnel names at the middle of
the way and replacing line gates with point gates, so being able to do this in
the lines file of my style sheet would be even better:
tunnel=* | bridge=* | barrier=gate {set mkgmap:addpoistoline=mid}
This assumes that generating POIs happens after the line stylesheet is
processed.
Regards,
Mike
-----Original Message-----
From: Gerd Petermann [mailto:[email protected]]
Sent: 01 June 2020 10:50
To: Development list for mkgmap <[email protected]>
Subject: Re: [mkgmap-dev] is_in() function for point on line
Hi Joris,
probably my ideas don't work. Your case is very special because you render the
POI only when it is part of a way. The example with
entrance=main is probably not a good one as
entrance=main & is_in(building,mall,on) [...]
already works.
I've coded a better patch so that your example will also work when option
--link-pois-to-ways is not used. Up to now the patch depends on that.
I do not yet see how mkgmap can avoid the generation of all useless POI without
adding a lot of code to analyse the rules in the points file, but I still think
about this. Problem is that we have the generated tags like
mkgmap:admin_level10 or mkgmap:residential and I fear to break something that
uses tricky rules with just these tags.
> Or we could work the other way around, in stead of render all poi's for all
> objects and not use them, the mapmaker specifies the explicit objects the
> poi's are needed.
Yes, might be an option. An exclude list might also work.
Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Joris
Bo <[email protected]>
Gesendet: Montag, 1. Juni 2020 10:51
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] is_in() function for point on line
Hallo Gerd,
This works perfect ! (points - file)
mkgmap:from-node:highway = turning_circle & highway = track [0x641a
resolution 24]
mkgmap:from-node:highway = turning_circle & highway != track [0x641b
resolution 24]
Your suggestion will indeed also feature your 'entrance=main' example which is
actually a very useful one to avoid cluttering
The "add-poi-to-lines" option is still usefull I think ?
For example
- to give a bicycle route a name-poi
- render a symbol for the line leisure = slipway
- render a cable car symbol for aerialway = gondola
- a warning symbol at the highway = via_ferrata
- or incline symbols at the start of steep mountain highways?
If those could be solved without rendering thousands of poi's for complex
multipolygon lines that would be great of course.
Or we could work the other way around, in stead of render all poi's for all
objects and not use them, the mapmaker specifies the explicit objects the poi's
are needed.
Kind regards
Joris
-----Oorspronkelijk bericht-----
Van: mkgmap-dev <[email protected]> Namens Gerd Petermann
Verzonden: zondag 31 mei 2020 11:38
Aan: Development list for mkgmap <[email protected]>
Onderwerp: Re: [mkgmap-dev] is_in() function for point on line
Hi Joris,
up to now we only mentioned nodes with a highway=* tag used in ways with a
highway=* tag.
I've coded a rather simple patch for that, but while I did that I wondered why
this should be limited to highways.
I decided to use the prefix "mkgmap:from-node:". Tags with prefix mkgmap: are
not copied.
My understanding is that you want a function which tells you if a tagged node
is used in one or more ways with a given tag.
For example, you may want to render a node with entrance=main, but only when it
is the entrance to a building=mall.
This will not work, because only nodes with the tags barrier or highway are
treated special.
I think it is possible to implement this as well. We probably just have to
check the points rules and look for uses of "mkgmap:from-node:".
Maybe this would also allow to get rid of the computational overhead produced
by the add-poi-to-lines option. The current implementation of this option is
really ugly as it computes lots of points which are never used to generate any
map object. Think of a complex natural=wood polygon (no other tags). If the
points file doesn't contain a rule for natural=wood there is no need to
generate the POIs.
I've uploaded a binary compiled with the attached patch here:
http://files.mkgmap.org.uk/download/473/mkgmap.jar
Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Joris
Bo <[email protected]>
Gesendet: Sonntag, 31. Mai 2020 09:06
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] is_in() function for point on line
Hi Gerd
Thanks for the answer, always nice if it makes sense again. Then it was worth
the testing 😊
For me that would be perfect, the number of cases this will occur is limited so
that it's no problem to explicitly test against this replace value. There are
probably more situations around highways where this could occur like highway =
bus_stop, highway = speedcamera, and traffic signals.
Kind regards,
Joris
-----Oorspronkelijk bericht-----
Van: mkgmap-dev <[email protected]> Namens Gerd Petermann
Verzonden: zaterdag 30 mei 2020 18:39
Aan: Development list for mkgmap <[email protected]>
Onderwerp: Re: [mkgmap-dev] is_in() function for point on line
Hi Joris,
yes, it is a special case. The generated POI gets the tags from the way, so
highway=turning_circle is replaced by highway=track.
The node 7131748927 appears only with the tag highway=turning_circle (and maybe
the address tags)
Not sure what to do. Maybe store the replaced tag(s) with a prefix, e.g.
mkgmap:replaced:highway=turning_circle in this case?
Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Joris
Bo <[email protected]>
Gesendet: Samstag, 30. Mai 2020 18:11
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] is_in() function for point on line
Hi Gerd
Could it be possible that in this case the highway tag of the line is ignored
because the point turning_circle is of type highway as well?
It's like there is a point {highway = turning_circle} on a line {highway =
track} It looks like I cannot catch it with the mkgmap:line2poitype and
mkgmap:line2poi.
Somewhere else I already use
leisure = slipway & mkgmap:area2poi != true & mkgmap:line2poitype = mid and
that works fine
Kind regards,
Joris
-----Oorspronkelijk bericht-----
Van: mkgmap-dev <[email protected]> Namens Gerd Petermann
Verzonden: zaterdag 30 mei 2020 17:51
Aan: Development list for mkgmap <[email protected]>
Onderwerp: Re: [mkgmap-dev] is_in() function for point on line
Hi Joris,
is_in() only works with polygons. You can use --add-pois-to-lines, but be aware
that it produces a lot of points for which you probablly don't want to add an
object to the map. See the help for the details.
Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Joris
Bo <[email protected]>
Gesendet: Samstag, 30. Mai 2020 17:40
An: Development list for mkgmap
Betreff: [mkgmap-dev] is_in() function for point on line
Hi
Does the is_in() function should also work for a point on a line in stead of in
a polygon?
highway = turning_circle & is_in(highway, track, in_or_on) = true [0x641a
resolution 24]
It returns false for this situation where the turningcircle is attached to a
highway = track.
(mkgmap:cache_is_in_POINT_highway_track_in_or_on=false)
Would there be another way to know if the point is attached to a highway =
track rather then a for example highway = residential?
I use add-pois-to-lines, and link-pois-to-ways but as far as I can see, that
doesn't give me more information.
https://www.openstreetmap.org/#map=18/49.65888/5.45845
[cid:[email protected]]
Kind regards
Joris
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev