side effects add-pois-to-lines

If this option is enabled, there are unwanted side effects. For instance if someone accidently tagged a highway with barrier=gate, every node on this highway gets a gate symbol. If I want to change this behaviour I have to put on almost every poi line the statement & mkgmap:line2poi!=true Is it possible to turn this around? That if I DO want to see this poi, I put & mkgmap:line2poi=true in the rule? Something like this: route=ferry & opening_hours=* & mkgmap:line2poi=true & mkgmap:line2poitype=mid {name '${name} (${opening_hours})' | 'operating ${opening_hours}' } [0x6406 resolution 24]

I would support that change. There are only very very few cases where I can see this option having any sense for me, so I would have to use quite a lot of mkgmap:line2poi!=true statements. Also I think in general I would only like these additional POI for the POI search on my Garmin, maybe never actually visible. Hence mkgmap:line2poi=true requirement would be better. On 14.11.2011 17:12, Minko wrote:
If this option is enabled, there are unwanted side effects. For instance if someone accidently tagged a highway with barrier=gate, every node on this highway gets a gate symbol. If I want to change this behaviour I have to put on almost every poi line the statement& mkgmap:line2poi!=true Is it possible to turn this around? That if I DO want to see this poi, I put& mkgmap:line2poi=true in the rule?
Something like this: route=ferry& opening_hours=*& mkgmap:line2poi=true& mkgmap:line2poitype=mid {name '${name} (${opening_hours})' | 'operating ${opening_hours}' } [0x6406 resolution 24] _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

At the moment I have no good idea how to achieve that. I can tag all POIs not created by the line2poi algorithm with mkgmap:line2poi=false but that probably doesn't help you. Any ideas? WanMil
I would support that change. There are only very very few cases where I can see this option having any sense for me, so I would have to use quite a lot of
mkgmap:line2poi!=true
statements. Also I think in general I would only like these additional POI for the POI search on my Garmin, maybe never actually visible. Hence mkgmap:line2poi=true requirement would be better.
On 14.11.2011 17:12, Minko wrote:
If this option is enabled, there are unwanted side effects. For instance if someone accidently tagged a highway with barrier=gate, every node on this highway gets a gate symbol. If I want to change this behaviour I have to put on almost every poi line the statement& mkgmap:line2poi!=true Is it possible to turn this around? That if I DO want to see this poi, I put& mkgmap:line2poi=true in the rule?
Something like this: route=ferry& opening_hours=*& mkgmap:line2poi=true& mkgmap:line2poitype=mid {name '${name} (${opening_hours})' | 'operating ${opening_hours}' } [0x6406 resolution 24] _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

well as it seems to be performance related, would it be then possible to have a new file (e.g. linepois) where such definitions go into? Otherwise I think it's still okay, one just needs to take care with all POI keys that are waterway; highway;barrier and so on---- and tag them with mkgmap:line2poi!=true. On 17.11.2011 20:21, WanMil wrote:
At the moment I have no good idea how to achieve that.
I can tag all POIs not created by the line2poi algorithm with mkgmap:line2poi=false but that probably doesn't help you.
Any ideas?
WanMil
I would support that change. There are only very very few cases where I can see this option having any sense for me, so I would have to use quite a lot of
mkgmap:line2poi!=true
statements. Also I think in general I would only like these additional POI for the POI search on my Garmin, maybe never actually visible. Hence mkgmap:line2poi=true requirement would be better.
On 14.11.2011 17:12, Minko wrote:
If this option is enabled, there are unwanted side effects. For instance if someone accidently tagged a highway with barrier=gate, every node on this highway gets a gate symbol. If I want to change this behaviour I have to put on almost every poi line the statement& mkgmap:line2poi!=true Is it possible to turn this around? That if I DO want to see this poi, I put& mkgmap:line2poi=true in the rule?
Something like this: route=ferry& opening_hours=*& mkgmap:line2poi=true& mkgmap:line2poitype=mid {name '${name} (${opening_hours})' | 'operating ${opening_hours}' } [0x6406 resolution 24] _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

I'm splitting with splitter r185 and mkgmap r2098 as well as r2100 fails. I used previously r2077 which works ok. I'm using Geofabric extract for Finland if that matters. I'm compiling with following options and command lines: java -Xmx2000M -jar mkgmap/mkgmap.jar --remove-short-arcs --style-file=styles/masterstyle --description='Openstreetmap' --family-id=4 --product-id=45 --series-name='OSM-AllInOne-EU-bmap' --family-name=OSM_ai1 --mapname=63240345 --draw-priority=5 --route --index --gmapsupp tiles/*.osm.pbf styles/master.TYP Error messages (with r2100) java.lang.ClassCastException: uk.me.parabola.imgfmt.app.srt.MultiSortKey cannot be cast to uk.me.parabola.imgfmt.app.srt.SrtSortKey at uk.me.parabola.imgfmt.app.srt.SrtSortKey.compareTo(SrtSortKey.java:39) at uk.me.parabola.imgfmt.app.srt.SrtSortKey.compareTo(SrtSortKey.java:22) at uk.me.parabola.imgfmt.app.srt.CombinedSortKey.compareTo(CombinedSortKey.java:43) at uk.me.parabola.imgfmt.app.srt.CombinedSortKey.compareTo(CombinedSortKey.java:22) at java.util.Arrays.mergeSort(Arrays.java:1157) at java.util.Arrays.mergeSort(Arrays.java:1169) at java.util.Arrays.mergeSort(Arrays.java:1168) at java.util.Arrays.mergeSort(Arrays.java:1169) at java.util.Arrays.mergeSort(Arrays.java:1168) at java.util.Arrays.mergeSort(Arrays.java:1169) at java.util.Arrays.mergeSort(Arrays.java:1168) at java.util.Arrays.mergeSort(Arrays.java:1169) at java.util.Arrays.mergeSort(Arrays.java:1168) at java.util.Arrays.mergeSort(Arrays.java:1168) at java.util.Arrays.mergeSort(Arrays.java:1168) at java.util.Arrays.mergeSort(Arrays.java:1168) at java.util.Arrays.mergeSort(Arrays.java:1168) at java.util.Arrays.sort(Arrays.java:1092) at java.util.Collections.sort(Collections.java:134) at uk.me.parabola.imgfmt.app.net.NETFile.sortRoads(NETFile.java:145) at uk.me.parabola.imgfmt.app.net.NETFile.writePost(NETFile.java:86) at uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:206) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:97) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:61) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:217) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Exiting - if you want to carry on regardless, use the --keep-going option

Hi Thanks for reporting this.
java.lang.ClassCastException: uk.me.parabola.imgfmt.app.srt.MultiSortKey cannot be cast to uk.me.parabola.imgfmt.app.srt.SrtSortKey at uk.me.parabola.imgfmt.app.srt.SrtSortKey.compareTo(SrtSortKey.java:39) at uk.me.parabola.imgfmt.app.srt.SrtSortKey.compareTo(SrtSortKey.java:22)
This is a bad bug, although I don't know why it doesn't show all the time. I have not observed it, but I believe that the attached patch will fix it. Thanks ..Steve

Moin, Felix Hartmann schrieb am 17.11.2011 19:35:
There are only very very few cases where I can see this option having any sense for me, so I would have to use quite a lot of
mkgmap:line2poi!=true
statements.
Actually you do not need so many statements like this, since you can combine them and delete the "main"-tag via an action rule. So e.g. if you know, that you do not want any natural POIs based on lines, you could add a rule like natural=* & mkgmap:line2poi=true {set natural=""} Surely it would be more straight forward, if could could positively mark the lines (or areas) in the style for the POI generation, but in the end you can achieve the same results with both. So I am quite satisfied with the actual implementation. Gruss Torsten

Thanks Thorsten, I suppose you can use {delete natural} instead of {set natural=""} too? Just in case one of these tags are on a highway or waterway line, I can remove those pois with these rules: # don't render not relevant mkgmap:line2poi tags amenity=* & mkgmap:line2poi=true {delete amenity} barrier=* & mkgmap:line2poi=true {delete barrier} historic=* & mkgmap:line2poi=true {delete historic} landuse=* & mkgmap:line2poi=true {delete landuse} leisure=* & mkgmap:line2poi=true {delete leisure} man_made=* & mkgmap:line2poi=true {delete man_made} natural=* & mkgmap:line2poi=true {delete natural} rcn_ref=* & mkgmap:line2poi=true {delete rcn_ref} place=* & mkgmap:line2poi=true {delete place} shop=* & mkgmap:line2poi=true {delete shop} sport=* & mkgmap:line2poi=true {delete sport} tourism=* & mkgmap:line2poi=true {delete tourism} Example of unwanted pois on a line element: leisure=track & sport=cycling http://www.openstreetmap.org/browse/way/41176449

Minko <ligfietser@online.nl> writes:
# don't render not relevant mkgmap:line2poi tags amenity=* & mkgmap:line2poi=true {delete amenity} barrier=* & mkgmap:line2poi=true {delete barrier} historic=* & mkgmap:line2poi=true {delete historic} landuse=* & mkgmap:line2poi=true {delete landuse} leisure=* & mkgmap:line2poi=true {delete leisure} man_made=* & mkgmap:line2poi=true {delete man_made} natural=* & mkgmap:line2poi=true {delete natural} rcn_ref=* & mkgmap:line2poi=true {delete rcn_ref} place=* & mkgmap:line2poi=true {delete place} shop=* & mkgmap:line2poi=true {delete shop} sport=* & mkgmap:line2poi=true {delete sport} tourism=* & mkgmap:line2poi=true {delete tourism}
Example of unwanted pois on a line element: leisure=track & sport=cycling http://www.openstreetmap.org/browse/way/41176449
Do we think that it's proper to have these rules in mkgmap or having to have these rules is a sign of bugs in the map, and mkgmap is working around them. In other words, should there be warnings, like the warnings about unreachable oneways, etc.

Greg, leisure=track & sport=cycling is certainly not a bug in OSM, but I dont want a sport icon on every node of this road. What I like is displaying a few relevant poi-to-line icons like bad surfaced roads, ferry schedules etc. on my map.

Can you explain when you want to have a POI for every node in a way? It seems the area->POI code makes one POI for the closed way, and this is different. (Not trying to be difficult; I really don't get it.)

I use the add-poi-to-lines option only in a few cases (yet), and I don't use it on every node either, but only in the middle of a road segment (mkgmap:line2poitype=mid). One example is on lines tagged with route=ferry & opening_hours=* http://www.openstreetmap.org/browse/way/40326852 route=ferry & opening_hours=* & mkgmap:line2poitype=mid {name '${name} (${opening_hours})' | 'operating ${opening_hours}' } [0x6406 resolution 24] This is a screenshot of my map: http://img836.imageshack.us/img836/5582/ferryroute.jpg Before add-poi-to-lines was introduced I used an extra line to render opening_hours, but the disadvantage is that you often cannot see this info on the GPS (it displays the streetname only, or in this case where there is no streetname, it shows the bike route relation name). Other cases that you can use this are for example incline, smoothness, tracktype, access tags etc. Greg wrote: Can you explain when you want to have a POI for every node in a way? It seems the area->POI code makes one POI for the closed way, and this is different. (Not trying to be difficult; I really don't get it.)

Minko <ligfietser@online.nl> writes:
Greg wrote:
Can you explain when you want to have a POI for every node in a way? It seems the area->POI code makes one POI for the closed way, and this is different. (Not trying to be difficult; I really don't get it.)
I use the add-poi-to-lines option only in a few cases (yet), and I don't use it on every node either, but only in the middle of a road segment (mkgmap:line2poitype=mid).
One example is on lines tagged with route=ferry & opening_hours=* http://www.openstreetmap.org/browse/way/40326852
route=ferry & opening_hours=* & mkgmap:line2poitype=mid {name '${name} (${opening_hours})' | 'operating ${opening_hours}' } [0x6406 resolution 24]
This is a screenshot of my map: http://img836.imageshack.us/img836/5582/ferryroute.jpg
Before add-poi-to-lines was introduced I used an extra line to render opening_hours, but the disadvantage is that you often cannot see this info on the GPS (it displays the streetname only, or in this case where there is no streetname, it shows the bike route relation name). Other cases that you can use this are for example incline, smoothness, tracktype, access tags etc.
Thanks. I understand why you want to create one POI from a linear feature. I still don't understand why it would make sense to make a POI per node. What I'm getting at is that perhaps the line2poi code should somehow default to making only one synthetic point POI. I have the impression it didn't, and you were posting code to work around that.

Greg Troxel schrieb am 27.11.2011 17:12:
I still don't understand why it would make sense to make a POI per node. What I'm getting at is that perhaps the line2poi code should somehow default to making only one synthetic point POI.
Below is an example from my points-style, where I generate icons for incline values set to a line, similar to the highway=incline POIs. Perhaps it would be enough, to generate a single icon for each way marked with incline=*, but by generating the icons for all nodes of the way, it is better visible, where the inlcine starts and where it ends. Gruss Torsten highway=incline [0x4009 resolution 24 continue] highway=incline_steep [0x400a resolution 24 continue] highway=* & mkgmap:line2poitype=* & mkmap_incline_type!=done & incline ~ '^-?[0-9].*' {set mkmap_incline_type=numeric} highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?[2-9][0-9].*' & incline ~ '.*%' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?19.*' & incline ~ '.*%' {set name="19%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?18.*' & incline ~ '.*%' {set name="18%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?17.*' & incline ~ '.*%' {set name="17%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?16.*' & incline ~ '.*%' {set name="16%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?15.*' & incline ~ '.*%' {set name="15%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?14.*' & incline ~ '.*%' {set name="14%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?13.*' & incline ~ '.*%' {set name="13%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?12.*' & incline ~ '.*%' {set name="12%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?11.*' & incline ~ '.*%' {set name="11%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?10.*' & incline ~ '.*%' {set name="10%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?9.*' & incline ~ '.*%' {set name="9%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?8.*' & incline ~ '.*%' {set name="8%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?7.*' & incline ~ '.*%' {set name="7%"; set ref=""; set mkmap_incline_type=done} [0x4009 resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?6.*' & incline ~ '.*%' {set name="6%"; set ref=""; set mkmap_incline_type=done} [0x4009 resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?5.*' & incline ~ '.*%' {set name="5%"; set ref=""; set mkmap_incline_type=done} [0x4009 resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?4.*' & incline ~ '.*%' {set name="4%"; set ref=""; set mkmap_incline_type=done} [0x4009 resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?3.*' & incline ~ '.*%' {set name="3%"; set ref=""; set mkmap_incline_type=done} [0x4009 resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?[2-9][0-9].*' & incline ~ '.*°' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?19.*' & incline ~ '.*°' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?18.*' & incline ~ '.*°' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?17.*' & incline ~ '.*°' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?16.*' & incline ~ '.*°' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?15.*' & incline ~ '.*°' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?14.*' & incline ~ '.*°' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?13.*' & incline ~ '.*°' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?12.*' & incline ~ '.*°' {set name=">20%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?11.*' & incline ~ '.*°' {set name="19%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?10.*' & incline ~ '.*°' {set name="18%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?9.*' & incline ~ '.*°' {set name="16%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?8.*' & incline ~ '.*°' {set name="14%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?7.*' & incline ~ '.*°' {set name="12%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?6.*' & incline ~ '.*°' {set name="11%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?5.*' & incline ~ '.*°' {set name="9%"; set ref=""; set mkmap_incline_type=done} [0x400a resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?4.*' & incline ~ '.*°' {set name="7%"; set ref=""; set mkmap_incline_type=done} [0x4009 resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?3.*' & incline ~ '.*°' {set name="5%"; set ref=""; set mkmap_incline_type=done} [0x4009 resolution 24 continue with_actions] highway=* & mkgmap:line2poitype=* & mkmap_incline_type=numeric & incline ~ '^-?2.*' & incline ~ '.*°' {set name="3%"; set ref=""; set mkmap_incline_type=done} [0x4009 resolution 24 continue with_actions]

Am 26.11.2011 15:51, schrieb Greg Troxel:
Example of unwanted pois on a line element: leisure=track & sport=cycling http://www.openstreetmap.org/browse/way/41176449
BTW, there is a highway=service, too. Think that's not right. -- PGP Schlüssel: 311D1055 http://keyserver.pgp.com

Josef wrote:
BTW, there is a highway=service, too. Think that's not right.
I agree its not completely correct (don't map for the renderer) but leisure=track was not rendered on Mapnik maps otherwise. With these tags it shows anyhow more information that this is a circuit for bike racing rather than just a highway=cycleway as other will map these roads. Anyway, even without the highway=service tag the same problem occurs so I'm happy with the suggestion that Torsten made, it works for me :-)
participants (8)
-
Felix Hartmann
-
Greg Troxel
-
harri
-
Josef Latt
-
Minko
-
Steve Ratcliffe
-
Torsten Leistikow
-
WanMil