mkgmap-mergeroads

Hi, I've noticed the bicycle routing in the mkgmap-mergeroads branch completely ignores bicycle=no, routing takes motorways and other roads tagged with bicycle=no. Tested it with mkgmap-mergeroads-r2750 with the built in style and in Mapsource: bicycle mode, way selection in the middle, shorter distance. Wanmil, I have no clue how to fix this in the styles, can you have a look at this? My Mkgmap args are: name-tag-list: name,int_name,name:en,name:nl,name:de,name:fr,place_name generate-sea: land-tag=natural=background precomp-sea: G:\mkgmap\Sea\sea_20130814.zip bounds: G:\mkgmap\Boundaries\bounds_20130814.zip location-autofill: is-in,nearest housenumbers tdbfile latin1 code-page: 1252 show-profiles: 1 #ignore-maxspeeds remove-short-arcs min-size-polygon: 4 polygon-size-limits=17:2, 15:0 merge-lines add-pois-to-areas add-pois-to-lines preserve-element-order keep-going net route index nsis

there should be a line in inc/access bicycle=no {set mkgmap:bicycle=no}.... are you sure you use 100% default style??? On 11.10.2013 15:27, Minko wrote:
Hi,
I've noticed the bicycle routing in the mkgmap-mergeroads branch completely ignores bicycle=no, routing takes motorways and other roads tagged with bicycle=no.
Tested it with mkgmap-mergeroads-r2750 with the built in style and in Mapsource: bicycle mode, way selection in the middle, shorter distance.
Wanmil, I have no clue how to fix this in the styles, can you have a look at this?
My Mkgmap args are:
name-tag-list: name,int_name,name:en,name:nl,name:de,name:fr,place_name generate-sea: land-tag=natural=background precomp-sea: G:\mkgmap\Sea\sea_20130814.zip bounds: G:\mkgmap\Boundaries\bounds_20130814.zip location-autofill: is-in,nearest housenumbers tdbfile latin1 code-page: 1252 show-profiles: 1 #ignore-maxspeeds remove-short-arcs min-size-polygon: 4 polygon-size-limits=17:2, 15:0 merge-lines add-pois-to-areas add-pois-to-lines preserve-element-order keep-going net route index nsis _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Felix wrote:
there should be a line in inc/access bicycle=no {set mkgmap:bicycle=no}....
are you sure you use 100% default style???
No, I'm not 100% sure. First I tried to unzip mkgmap-mergeroads-r2750.jar and put the jar file in that directory but mkgmap refused to run. Then I copied mkgmap-mergeroads-r2750.jar into another mkgmap directory (mkgmap-r2736). Guess it uses the built in styles from the mkgmap-mergeroads-r2750.jar file isn't it? Or does it take the styles from mkgmap-r2736\examples\styles\default if I dont use --style-file in my commands?

well based on your result - I would guess it uses the default trunk style.... copy the full directory over (else there would be a bug in mkgmap itself - not in the style as far as I can see). On 11.10.2013 15:50, Minko wrote:
Felix wrote:
there should be a line in inc/access bicycle=no {set mkgmap:bicycle=no}....
are you sure you use 100% default style??? No, I'm not 100% sure. First I tried to unzip mkgmap-mergeroads-r2750.jar and put the jar file in that directory but mkgmap refused to run. Then I copied mkgmap-mergeroads-r2750.jar into another mkgmap directory (mkgmap-r2736). Guess it uses the built in styles from the mkgmap-mergeroads-r2750.jar file isn't it? Or does it take the styles from mkgmap-r2736\examples\styles\default if I dont use --style-file in my commands?

Felix wrote:
well based on your result - I would guess it uses the default trunk style....
copy the full directory over (else there would be a bug in mkgmap itself - not in the style as far as I can see).
I have now extracted the styles from the jar file to make sure that it was processed. (added style-file: mergeroads in my mkgmap.args file and this folder was also visible in the process window). The results didnt differ, the bicycle routing from the mergeroads branch was much worse in comparison with the osm generic map from 8/10 compiled with mkgmap-r2704. The last one was with a long detour but at least didnt take the A1 motorway. I also included the routing from the Openfietsmap (mkgmap-r2736) which obviously produced the best result, because it's a bicycle map. See attached files, a bike route between the city centers of Amersfoort and Apeldoorn. Bicycle, shortest distance, unpaved roads avoidance selected.

One more thing I noticed in the access style file: bicycle=* { set mkgmap:bike='${bicycle}' } Is that correct, mkgmap:bike? or should it be mkgmap:bicycle?

I have now changed the rule into bicycle=* { set mkgmap:bicycle='${bicycle}' } and the route now avoids the motorway (but still doesn't care about other bicycle=no's). More rendering problems: https://www.dropbox.com/s/tbrznfemtbpl0hf/mergeroads.jpg https://www.dropbox.com/s/5pq65leu4ljkf0y/osm%20generic.jpg OSM map: http://www.openstreetmap.org/#map=19/52.17382/5.44545 The osm generic map is more realistic, mergeroads throws away too much.
One more thing I noticed in the access style file:
bicycle=* { set mkgmap:bike='${bicycle}' }
Is that correct, mkgmap:bike? or should it be mkgmap:bicycle?

Hi Minko, these problems are probably caused by the remove-short-arc option which now uses default value 5. Please try remove-short-arc=0. Gerd Minko-2 wrote
I have now changed the rule into bicycle=* { set mkgmap:bicycle='${bicycle}' } and the route now avoids the motorway (but still doesn't care about other bicycle=no's).
More rendering problems: https://www.dropbox.com/s/tbrznfemtbpl0hf/mergeroads.jpg https://www.dropbox.com/s/5pq65leu4ljkf0y/osm%20generic.jpg OSM map: http://www.openstreetmap.org/#map=19/52.17382/5.44545
The osm generic map is more realistic, mergeroads throws away too much.
One more thing I noticed in the access style file:
bicycle=* { set mkgmap:bike='${bicycle}' }
Is that correct, mkgmap:bike? or should it be mkgmap:bicycle?
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/mkgmap-mergeroads-tp5781131p5781161.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

Minko-2 wrote
I have now changed the rule into bicycle=* { set mkgmap:bicycle='${bicycle}' } and the route now avoids the motorway (but still doesn't care about other bicycle=no's).
In the source code, I see mkgmap:bike, never mkgmap:bicycle. Gerd -- View this message in context: http://gis.19327.n5.nabble.com/mkgmap-mergeroads-tp5781131p5781163.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hmm very weird, I get better results if I use mkgmap:bicycle. remove-short-arcs=0 solved the other issue, thanks Gerd. In Basecamp the routing results are better, because you can play with avoid motorways, major highways etc. so the results are much better (but still not optimal).
In the source code, I see mkgmap:bike, never mkgmap:bicycle.
Gerd

Steve, is it possible to provide a full mkgmap.zip file for branches also like it is done with the trunk? This matters if the style or other files in the resources folder is changed. WanMil
Hi,
I've noticed the bicycle routing in the mkgmap-mergeroads branch completely ignores bicycle=no, routing takes motorways and other roads tagged with bicycle=no.
Tested it with mkgmap-mergeroads-r2750 with the built in style and in Mapsource: bicycle mode, way selection in the middle, shorter distance.
Wanmil, I have no clue how to fix this in the styles, can you have a look at this?
My Mkgmap args are:
name-tag-list: name,int_name,name:en,name:nl,name:de,name:fr,place_name generate-sea: land-tag=natural=background precomp-sea: G:\mkgmap\Sea\sea_20130814.zip bounds: G:\mkgmap\Boundaries\bounds_20130814.zip location-autofill: is-in,nearest housenumbers tdbfile latin1 code-page: 1252 show-profiles: 1 #ignore-maxspeeds remove-short-arcs min-size-polygon: 4 polygon-size-limits=17:2, 15:0 merge-lines add-pois-to-areas add-pois-to-lines preserve-element-order keep-going net route index nsis _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On 11/10/13 20:40, WanMil wrote:
Steve, is it possible to provide a full mkgmap.zip file for branches also like it is done with the trunk? This matters if the style or other files in the resources folder is changed.
Ha! Yes as of about yesterday there are branch builds existing in all formats. mkgmap-mergeroads-rXXXX.zip mkgmap-mergeroads-rXXXX.tar.gz mkgmap-mergeroads-rXXXX.jar mkgmap-mergeroads-rXXXX-src.zip mkgmap-mergeroads-rXXXX-src.tar.gz They exist already if you just try to download them, although they are not linked from the download page just yet. http://www.mkgmap.org.uk/download/mkgmap-mergeroads-r2752.zip ..Steve

Hi Minko, I'll check that. I also noticed some strange behaviour with the branch (routing always say to leave roundabouts at the first exit although it is the 2nd exit). It is definitely mkgmap:bike and not mkgmap:bicycle. WanMil
Hi,
I've noticed the bicycle routing in the mkgmap-mergeroads branch completely ignores bicycle=no, routing takes motorways and other roads tagged with bicycle=no.
Tested it with mkgmap-mergeroads-r2750 with the built in style and in Mapsource: bicycle mode, way selection in the middle, shorter distance.
Wanmil, I have no clue how to fix this in the styles, can you have a look at this?
My Mkgmap args are:
name-tag-list: name,int_name,name:en,name:nl,name:de,name:fr,place_name generate-sea: land-tag=natural=background precomp-sea: G:\mkgmap\Sea\sea_20130814.zip bounds: G:\mkgmap\Boundaries\bounds_20130814.zip location-autofill: is-in,nearest housenumbers tdbfile latin1 code-page: 1252 show-profiles: 1 #ignore-maxspeeds remove-short-arcs min-size-polygon: 4 polygon-size-limits=17:2, 15:0 merge-lines add-pois-to-areas add-pois-to-lines preserve-element-order keep-going net route index nsis _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Minko, I tested the latest branch version (r2753) and some tests with Mapsource worked fine as expected. Please test the full build http://www.mkgmap.org.uk/download/mkgmap-mergeroads-r2753.zip which includes the default style. WanMil
Hi Minko,
I'll check that. I also noticed some strange behaviour with the branch (routing always say to leave roundabouts at the first exit although it is the 2nd exit).
It is definitely mkgmap:bike and not mkgmap:bicycle.
WanMil
Hi,
I've noticed the bicycle routing in the mkgmap-mergeroads branch completely ignores bicycle=no, routing takes motorways and other roads tagged with bicycle=no.
Tested it with mkgmap-mergeroads-r2750 with the built in style and in Mapsource: bicycle mode, way selection in the middle, shorter distance.
Wanmil, I have no clue how to fix this in the styles, can you have a look at this?
My Mkgmap args are:
name-tag-list: name,int_name,name:en,name:nl,name:de,name:fr,place_name generate-sea: land-tag=natural=background precomp-sea: G:\mkgmap\Sea\sea_20130814.zip bounds: G:\mkgmap\Boundaries\bounds_20130814.zip location-autofill: is-in,nearest housenumbers tdbfile latin1 code-page: 1252 show-profiles: 1 #ignore-maxspeeds remove-short-arcs min-size-polygon: 4 polygon-size-limits=17:2, 15:0 merge-lines add-pois-to-areas add-pois-to-lines preserve-element-order keep-going net route index nsis _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

I still see no improvements with mkgmap-mergeroads-r2753, the routing still seeks the motorways as the shortest option for bicycles. Anyway, also the trunk version takes motorways now and then so maybe it has always been the case. Next question: I use --ignore-maxspeeds, but then mkgmap-mergeroads doesn't run. Is this intended? Better ignore this option or print a warning rather then simply stop processing? I suppose to ignore this processing, placing a # before include 'inc/roadspeed'; ? Another more severe bug is that all cycleways by default get a non routable flag for pedestrians See the img file in gpsmapedit: https://www.dropbox.com/s/g4iskev2w7p78x7/mergeroads_cycleway.jpg http://www.openstreetmap.org/browse/way/38618699 This behaviour is consistent for every cycleway I checked and the result is that pedestrians avoid cycleways. So there might be a bug in the style converter altough it adds foot=yes: highway=cycleway {add access = no; add bicycle = yes; add foot = yes} I also see in the routing window of gpsmapedit that motorways (Road class 4/major HW) get a selection flag for "no bicycle" (as expected), but not for "no pedestrian". If I check the img files of Lambertus' OSM maps it shows as expected, no bicycles and no pedestrian routing flag on motorways, and on cycleways all vehicles not routable except bicycles AND pedestrians.

I still see no improvements with mkgmap-mergeroads-r2753, the routing still seeks the motorways as the shortest option for bicycles. Anyway, also the trunk version takes motorways now and then so maybe it has always been the case.
I have retried using exactly the same options you use but same behaviour. Bicycle routing avoids motorways (in Mapsource).
Next question: I use --ignore-maxspeeds, but then mkgmap-mergeroads doesn't run. Is this intended?
Yes, the ignore-maxspeeds is removed in the mergeroads branch.
Better ignore this option or print a warning rather then simply stop processing?
Maybe, I will think about it.
I suppose to ignore this processing, placing a # before include 'inc/roadspeed'; ?
Correct.
Another more severe bug is that all cycleways by default get a non routable flag for pedestrians
See the img file in gpsmapedit: https://www.dropbox.com/s/g4iskev2w7p78x7/mergeroads_cycleway.jpg http://www.openstreetmap.org/browse/way/38618699
This behaviour is consistent for every cycleway I checked and the result is that pedestrians avoid cycleways.
So there might be a bug in the style converter altough it adds foot=yes:
highway=cycleway {add access = no; add bicycle = yes; add foot = yes}
I cannot find this rule in the mergeroads branch only in the trunk. But you are right. This rule seems to be removed in the branch. I will check that.
I also see in the routing window of gpsmapedit that motorways (Road class 4/major HW) get a selection flag for "no bicycle" (as expected), but not for "no pedestrian".
Yes, I will check that too.
If I check the img files of Lambertus' OSM maps it shows as expected, no bicycles and no pedestrian routing flag on motorways, and on cycleways all vehicles not routable except bicycles AND pedestrians. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Wanmil
highway=cycleway {add access = no; add bicycle = yes; add foot = yes}
I cannot find this rule in the mergeroads branch only in the trunk. But you are right. This rule seems to be removed in the branch. I will check that.
I dont understand it anymore. What do you mean by trunk? I downloaded it from http://www.mkgmap.org.uk/download/mkgmap-mergeroads-r2753.jar Inside I see examples\styles\default folder, these are the styles that the branch uses, correct? line 11 in the inc\access: highway=cycleway {add access = no; add bicycle = yes; add foot = yes} I also copied this default folder and renamed it mergeroads and pointed the styles to it style-file: mergeroads It didnt make any difference.

line 11 in the inc\access:
highway=cycleway {add access = no; add bicycle = yes; add foot = yes}
Oh, I overlooked that. You are right. It seems to be the same bug I discussed with Steve: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2013q3/018820.html I will fix that. Thanks for reporting! WanMil

line 11 in the inc\access:
highway=cycleway {add access = no; add bicycle = yes; add foot = yes}
Oh, I overlooked that. You are right. It seems to be the same bug I discussed with Steve: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2013q3/018820.html
I will fix that.
Thanks for reporting! WanMil
Ok, I should be fixed now. The problem is when having the following rules: highway=motorway { add foot=no } foot=* { set mkgmap:foot='${foot}' } The style processor skips the 2nd rule because the tag foot was initially not set. Therefore the 2nd rule needs to be changed to highway=* & foot=* { set mkgmap:foot='${foot}' } This seems to work. Please test again. Thanks for pointing to GPSMapEdit. I didn't use it before but for such cases it's a great tool to check what's in the img files! WanMil

Could there be a fix for this problem that keys also work without highway=* or other keys from original osm data when they are set via the style-file itself - or will this bug likely be left unfixed? On 13.10.2013 11:11, WanMil wrote:
line 11 in the inc\access:
highway=cycleway {add access = no; add bicycle = yes; add foot = yes} Oh, I overlooked that. You are right. It seems to be the same bug I discussed with Steve: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2013q3/018820.html
I will fix that.
Thanks for reporting! WanMil Ok, I should be fixed now. The problem is when having the following rules: highway=motorway { add foot=no } foot=* { set mkgmap:foot='${foot}' }
The style processor skips the 2nd rule because the tag foot was initially not set. Therefore the 2nd rule needs to be changed to highway=* & foot=* { set mkgmap:foot='${foot}' }
This seems to work.
Please test again.
Thanks for pointing to GPSMapEdit. I didn't use it before but for such cases it's a great tool to check what's in the img files! WanMil _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

Here are more examples that are missing in the access rules public_transport=platform railway=platform

Yep, I have to think about a different workaround for the bug. I also noticed that the compile time for a map seems to be increased quite a lot. This is not the case when the access file is not included from the points file. Some more work to do... :-)
Here are more examples that are missing in the access rules
public_transport=platform railway=platform

I have commited changes to the default style so that it should work now. Of course I couldn't test all combinations but the access file is much more straight forward (I think so... ;-) WanMil
Yep, I have to think about a different workaround for the bug.
I also noticed that the compile time for a map seems to be increased quite a lot. This is not the case when the access file is not included from the points file.
Some more work to do... :-)
Here are more examples that are missing in the access rules
public_transport=platform railway=platform
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Thanks Wanmil, Access flags look ok now in gpsmapedit. Bicycle routing still takes the motorway Tested it from city nodes Amersfoort-Apeldoorn The OSM generic routable (osm data 8/10) calculates a route not over motorways or for cyclists forbidden roads. However, if I calculate a route between Amsterdam and Amersfoort, it takes the A1 motorway too :( So regarding bicycle routing it seems random whether it accepts the mkgmap access rules or not. Car routing looks ok. I have to rework my bicycle styles completely to test the mkgmap-mergeroads further.

over long distances avoid motorways is not working - it has always been this way. It shouldn't happen over relatively short distances On 13.10.2013 13:55, Minko wrote:
Thanks Wanmil, Access flags look ok now in gpsmapedit.
Bicycle routing still takes the motorway Tested it from city nodes Amersfoort-Apeldoorn The OSM generic routable (osm data 8/10) calculates a route not over motorways or for cyclists forbidden roads. However, if I calculate a route between Amsterdam and Amersfoort, it takes the A1 motorway too :(
So regarding bicycle routing it seems random whether it accepts the mkgmap access rules or not. Car routing looks ok.
I have to rework my bicycle styles completely to test the mkgmap-mergeroads further. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

Thanks Wanmil, Access flags look ok now in gpsmapedit.
Bicycle routing still takes the motorway Tested it from city nodes Amersfoort-Apeldoorn
Did you (or if not can you) check the motorways with GPSMapEdit? Is the flag set that prevents bicycle routing on motorways? In such a case it must be a MapSource (or GPS) bug. Or it is an undisclosed map feature...
The OSM generic routable (osm data 8/10) calculates a route not over motorways or for cyclists forbidden roads. However, if I calculate a route between Amsterdam and Amersfoort, it takes the A1 motorway too :(
So regarding bicycle routing it seems random whether it accepts the mkgmap access rules or not. Car routing looks ok.
I have to rework my bicycle styles completely to test the mkgmap-mergeroads further.

Yep the access flags are ok. I guess like Felix says it always have been like this. The only solution is making the motorways not routable in a bike specific map. Too bad we still dont know how the activity routing works in BC and the newer generation GPS.
Did you (or if not can you) check the motorways with GPSMapEdit? Is the flag set that prevents bicycle routing on motorways? In such a case it must be a MapSource (or GPS) bug. Or it is an undisclosed map feature...
participants (5)
-
Felix Hartmann
-
GerdP
-
Minko
-
Steve Ratcliffe
-
WanMil