[PATCH v2] modify road speed and class from a POI

v2 - you can now have mkgmap:road-class-min and mkgmap:road-class-max tags (and the same for the road speed) that will limit the final value used. These can either be added to the POI (from whence they will be transferred to the way by mkgmap) or directly to the way. --------------------- This is something that was briefly discussed not too long ago and the idea is that a road's speed or class can be modified by the presence of a POI that defines new values for either/both of them. This, hopefully, will make ways that have stuff like traffic signals and crossings, etc. less attractive to route over. The values are specified using mkgmap:road-speed and mkgmap:road-class tags added to the POI. These tags expect an integer value, optionally preceded by a + or - which make the adjustment relative to the original value. For example, mkgmap:road-speed=3 sets the speed to 3 and mkgmap:road-speed=-1 reduces the speed by 1 from whatever value it had before. Here's some possible rules for the points file: highway=traffic_signals { add mkgmap:road-speed = '-1' } highway=crossing { add mkgmap:road-speed = '-1' } highway=mini_roundabout { add mkgmap:road-speed = '1' } The region of the way that has its speed/class modified is limited to the closest points either side of the POI. Not sure if that's the right thing to do yet. Needs playing with. You need to specify the --link-pois-to-ways option to enable this functionality. All feedback welcome. Mark

Mark Burton wrote:
v2 - you can now have mkgmap:road-class-min and mkgmap:road-class-max tags (and the same for the road speed) that will limit the final value used. These can either be added to the POI (from whence they will be transferred to the way by mkgmap) or directly to the way.
Hi Mark, Just a small question. If I add to a poi { add road_speed_min='-1'; add road_speed_min='1' } what happens if the original road had road_speed=0 will it be increased or stay at 0? (I assume and hope for the latter). BTW I just updated Gpsmapedit and noticed that it has really really really good autorouting with the test "routing graph" function in its newest version. I managed to route 800km while Mapsource rarely does better than 100km. I contacted Konstantin to ask whether he will add a proper export function of the route. At least for my maps the routing with mapedit is really fantastic. Also it can now show the road_class and road_speed for any road correctly (did not do so in 1.0.56.2 that I used previously). Felix
---------------------
This is something that was briefly discussed not too long ago and the idea is that a road's speed or class can be modified by the presence of a POI that defines new values for either/both of them. This, hopefully, will make ways that have stuff like traffic signals and crossings, etc. less attractive to route over.
The values are specified using mkgmap:road-speed and mkgmap:road-class tags added to the POI.
These tags expect an integer value, optionally preceded by a + or - which make the adjustment relative to the original value.
For example, mkgmap:road-speed=3 sets the speed to 3 and mkgmap:road-speed=-1 reduces the speed by 1 from whatever value it had before.
Here's some possible rules for the points file:
highway=traffic_signals { add mkgmap:road-speed = '-1' } highway=crossing { add mkgmap:road-speed = '-1' } highway=mini_roundabout { add mkgmap:road-speed = '1' }
The region of the way that has its speed/class modified is limited to the closest points either side of the POI. Not sure if that's the right thing to do yet. Needs playing with.
You need to specify the --link-pois-to-ways option to enable this functionality.
All feedback welcome.
Mark
------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Felix,
Just a small question. If I add to a poi { add road_speed_min='-1'; add road_speed_min='1' } what happens if the original road had road_speed=0 will it be increased or stay at 0? (I assume and hope for the latter).
Yes, the min/max tags only have an effect if mkgmap:road-speed or mkgmap:road-class are in use for the way in question. BTW - the syntax is mkgmap:road-speed-min and not road_speed_min as in your example (I think you knew that, really) Mark

Mark Burton wrote:
Felix,
Just a small question. If I add to a poi { add road_speed_min='-1'; add road_speed_min='1' } what happens if the original road had road_speed=0 will it be increased or stay at 0? (I assume and hope for the latter).
Yes, the min/max tags only have an effect if mkgmap:road-speed or mkgmap:road-class are in use for the way in question.
BTW - the syntax is mkgmap:road-speed-min and not road_speed_min as in your example (I think you knew that, really)
Hmm no, I find this confusing as in the lines file I have always been using road_speed and road_class... Or is road-speed working everywhere? okay so now I use this: highway=traffic_signals { add mkgmap:road_speed = '-1'; add mkgmap:road_class = '-1'; add mkgmap:road-speed-min = '1' } I noticed that setting only road_speed or road_class was not significant enough. with the min values we have no I will try whether maybe highway=traffic_signals { add mkgmap:road_speed = '-2'; add mkgmap:road-speed-min = '1' } is more appropriate.
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Felix, Last email for today - i'm fried.
Just a small question. If I add to a poi { add road_speed_min='-1'; add road_speed_min='1' } what happens if the original road had road_speed=0 will it be increased or stay at 0? (I assume and hope for the latter).
Yes, the min/max tags only have an effect if mkgmap:road-speed or mkgmap:road-class are in use for the way in question.
BTW - the syntax is mkgmap:road-speed-min and not road_speed_min as in your example (I think you knew that, really)
Hmm no, I find this confusing as in the lines file I have always been using road_speed and road_class... Or is road-speed working everywhere? okay so now I use this: highway=traffic_signals { add mkgmap:road_speed = '-1'; add mkgmap:road_class = '-1'; add mkgmap:road-speed-min = '1' }
I noticed that setting only road_speed or road_class was not significant enough. with the min values we have no I will try whether maybe highway=traffic_signals { add mkgmap:road_speed = '-2'; add mkgmap:road-speed-min = '1' } is more appropriate.
the reason why these new things are using mkgmap:tag syntax is because I think they should be easily distinguishable from any other tag that may appear in the OSM input. i.e. the mkgmap: prefix should achieve that. Things like road_speed and road_class are special 'magic' tokens that the style engine recognises, they are not related to the XML tag/value pairs in the OSM input. So, keep using road_class and road_speed as before but use the mkgmap:tag syntax for the values that are introduced by this new capability. Cheers, Mark
participants (2)
-
Felix Hartmann
-
Mark Burton