is mkgmap:road-speed-max still processed?

Hi, sorry for multiple reports, but nothing seems to work for me today. I'm trying to apply speed restriction as mkgmap:road-speed-max, something like this: maxspeed=* & maxspeedkmh() <= 60 { set mkgmap:road-speed-max = 3 } I can verify with echotest, that this tag is correctly applied, but then way is merged and default speed value taken. Probably mkgmap:road-speed-max tag is ignored by merge algorithm. no-merge-lines doesn't work (r2977) and I can't test what would happen without merging. -- Best regards, Andrzej

Hi Andrzej, the tag mkgmap:road-speed-max is evaluated like this: if(roadSpeed > roadSpeedMax) roadSpeed = roadSpeedMax; else if(roadSpeed < roadSpeedMin) roadSpeed = roadSpeedMin; You can use the switch --x-no-mergeroads to switch off merging of roads. Gerd popej wrote
Hi,
sorry for multiple reports, but nothing seems to work for me today.
I'm trying to apply speed restriction as mkgmap:road-speed-max, something like this: maxspeed=* & maxspeedkmh() <= 60 { set mkgmap:road-speed-max = 3 }
I can verify with echotest, that this tag is correctly applied, but then way is merged and default speed value taken. Probably mkgmap:road-speed-max tag is ignored by merge algorithm.
no-merge-lines doesn't work (r2977) and I can't test what would happen without merging.
-- Best regards, Andrzej
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/is-mkgmap-road-speed-max-still-processed-tp57... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Andrzej, okay, that should be explained. The tag is evaluated after(!) style processing: If the way has a mkgmap:road-speed tag, the value is evaluated. The evaluated value is checked against the mkgmap:road-speed-max (default 7) and mkgmap:road-speed-min (default 0) values. Besides that you probably tested with an mkgmap version that contained the road-speed bug. Hope that helps? Gerd
Date: Mon, 20 Jan 2014 00:08:43 +0100 From: popej@poczta.onet.pl To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] is mkgmap:road-speed-max still processed?
Hi Gerd,
You can use the switch --x-no-mergeroads
Thanks, this switch works, i get separated ways.
mkgmap:road-speed-max doesn't work.
Echotag shows mkgmap:road-speed-max=3 but in img I get value 4 as defined with road_speed=4.
-- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd,
If the way has a mkgmap:road-speed tag, the value is evaluated.
I'm not sure what you mean by mkgmap:road-speed, I was referring to roads_speed=N form object definition. I have attached here simple source data with 3 primary ways. When compiling with r2979, default style and --x-no-mergeroads option, I get 3 roads, one with speed 4 and 2 roads with speed 3. With merging roads ways are merged correctly, this is improvement compared to previous mkgmap. Next I have added following statement at the end of "lines" file: highway=* {set mkgmap:road-speed-max=2; echotags "end"} Resulting img is the same, mkgmap:road-speed-max=2 is ignored. Next test, my statement changed to: highway=* {delete mkgmap:road-speed-class; set mkgmap:road-speed-max=2; echotags "end"} All, roads in img have gotten default speed 4, mkgmap:road-speed-max=2 is ignored. Last test: highway=* {set mkgmap:road-speed-class=3; set mkgmap:road-speed-max=2; echotags "end"} All roads get speed 3, mkgmap:road-speed-max=2 is ignored. All tags displayed by echotags are as expected. I execute mkgmap with following command: java -jar mkgmap.jar --route --x-no-mergeroads --style-file=styles\default maxspeed.osm -- Best regards, Andrzej

Hi Andrzej, I wanted to make clear the the min and max values are only evaluated when your style uses e.g. mkgmap:road-speed=+1 to modify the road speed class. Please check also the corresponding docu. Gerd popej wrote
Hi Gerd,
If the way has a mkgmap:road-speed tag, the value is evaluated.
I'm not sure what you mean by mkgmap:road-speed, I was referring to roads_speed=N form object definition.
I have attached here simple source data with 3 primary ways. When compiling with r2979, default style and --x-no-mergeroads option, I get 3 roads, one with speed 4 and 2 roads with speed 3. With merging roads ways are merged correctly, this is improvement compared to previous mkgmap.
Next I have added following statement at the end of "lines" file: highway=* {set mkgmap:road-speed-max=2; echotags "end"}
Resulting img is the same, mkgmap:road-speed-max=2 is ignored.
Next test, my statement changed to: highway=* {delete mkgmap:road-speed-class; set mkgmap:road-speed-max=2; echotags "end"}
All, roads in img have gotten default speed 4, mkgmap:road-speed-max=2 is ignored.
Last test: highway=* {set mkgmap:road-speed-class=3; set mkgmap:road-speed-max=2; echotags "end"}
All roads get speed 3, mkgmap:road-speed-max=2 is ignored.
All tags displayed by echotags are as expected.
I execute mkgmap with following command: java -jar mkgmap.jar --route --x-no-mergeroads --style-file=styles\default maxspeed.osm
-- Best regards, Andrzej
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
maxspeed.osm (5K) <http://gis.19327.n5.nabble.com/attachment/5793737/0/maxspeed.osm>
-- View this message in context: http://gis.19327.n5.nabble.com/is-mkgmap-road-speed-max-still-processed-tp57... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Gerd,
Please check also the corresponding docu.
Ok, my fault, thanks. I finally got it working, using statement "set mkgmap:road-speed=-0". Will this trick work in future? Manual says: mkgmap:road-speed, example: +1 Actually if I use "set mkgmap:road-speed=+1", mkgmap crashes. Example probably should include quotation marks: '+1' -- Best regards, Andrzej

Hi, we could also easily allow mkgmap:road-speed-max/min if mkgmap:road-speed is not set. I think the original intent of mkgmap:road-speed-min/max was that the mkgmap:road-speed modifier does not exceed some special limits. But we should not stick to it if the other handling is also useful. WanMil
Hi Andrzej,
I wanted to make clear the the min and max values are only evaluated when your style uses e.g. mkgmap:road-speed=+1 to modify the road speed class. Please check also the corresponding docu.
Gerd
popej wrote
Hi Gerd,
If the way has a mkgmap:road-speed tag, the value is evaluated.
I'm not sure what you mean by mkgmap:road-speed, I was referring to roads_speed=N form object definition.
I have attached here simple source data with 3 primary ways. When compiling with r2979, default style and --x-no-mergeroads option, I get 3 roads, one with speed 4 and 2 roads with speed 3. With merging roads ways are merged correctly, this is improvement compared to previous mkgmap.
Next I have added following statement at the end of "lines" file: highway=* {set mkgmap:road-speed-max=2; echotags "end"}
Resulting img is the same, mkgmap:road-speed-max=2 is ignored.
Next test, my statement changed to: highway=* {delete mkgmap:road-speed-class; set mkgmap:road-speed-max=2; echotags "end"}
All, roads in img have gotten default speed 4, mkgmap:road-speed-max=2 is ignored.
Last test: highway=* {set mkgmap:road-speed-class=3; set mkgmap:road-speed-max=2; echotags "end"}
All roads get speed 3, mkgmap:road-speed-max=2 is ignored.
All tags displayed by echotags are as expected.
I execute mkgmap with following command: java -jar mkgmap.jar --route --x-no-mergeroads --style-file=styles\default maxspeed.osm
-- Best regards, Andrzej
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
maxspeed.osm (5K) <http://gis.19327.n5.nabble.com/attachment/5793737/0/maxspeed.osm>
-- View this message in context: http://gis.19327.n5.nabble.com/is-mkgmap-road-speed-max-still-processed-tp57... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (4)
-
Andrzej Popowski
-
Gerd Petermann
-
GerdP
-
WanMil