As announced yesterday - here is a patch against the default-style-file
to heavily improve Autorouting for cars/motorcycles.
Attached is a patch that should increase Autorouting distance without
errors in Mapsource by 30-100% (distance as in number of turns). I am
not sure how the maxspeed is currently handled in mkgmap code. In case
that maxspeed can actually increase the road_speed, then it has to be
used with --ignore maxspeed
- Best would be if maxspeed (in case it is tagged) can only decrease
road_speed, but not increase it - I am not sure whether this is current
behaviour.
This patch does blows up mapsize by up to 10% - depending how well
mapped a country is (the better it is mapped, the smaller the increase).
For Germany it is around 4% size increase. (only 3% if zipped by 7-zip).
Using it I had no problems routing from South Spain to Northern Poland
in Mapsource and several other as long distances, Map rendering time
does not significantly increase.
I additionally put add bicycle=no; add foot=no for trunk roads, as in
99% of cases you are not allowed to use them as a cyclist/foot (nor
would you like to) - at least in Europe.
Index: resources/styles/default/lines
===================================================================
--- resources/styles/default/lines (revision 1413)
+++ resources/styles/default/lines (working copy)
@@ -20,40 +20,57 @@
highway=primary {name '${ref|highway-symbol:box} ${name}' | '${ref|highway-symbol:box}' | '${name}' }
highway=secondary {name '${ref|highway-symbol:oval} ${name}' | '${ref|highway-symbol:oval}' | '${name}' }
highway=* {name '${ref} ${name}' | '${ref}' | '${name}' }
+# Convert generic path to most specific
+highway=path & bicycle=designated {set highway=cycleway }
+highway=path & horse=designated {set highway=bridleway }
+highway=path & foot=designated {set highway=footway }
-junction=roundabout & highway=trunk [0x0c road_class=3 road_speed=5 resolution 16]
-junction=roundabout & highway=primary [0x0c road_class=3 road_speed=4 resolution 19]
+# Allow for curvy roads and tight turns
+junction=roundabout & highway=trunk [0x0c road_class=3 road_speed=2 resolution 24 continue]
+junction=roundabout & highway=primary [0x0c road_class=3 road_speed=1 resolution 24 continue]
+junction=roundabout & highway=secondary [0x0c road_class=2 road_speed=1 resolution 24 continue]
+junction=roundabout & highway=tertiary [0x0c road_class=1 road_speed=1 resolution 24 continue]
+highway=motorway {add oneway = yes; add bicycle = no; add foot = no } [0x01 road_class=4 road_speed=3 resolution 24 continue]
+highway=motorway_link {add oneway = yes; add bicycle = no; add foot = no } [0x09 road_class=3 road_speed=1 resolution 24 continue]
+highway=trunk {add bicycle = no; add foot = no} [0x02 road_class=4 road_speed=2 resolution 24 continue]
+highway=trunk_link {add bicycle = no; add foot = no} [0x09 road_class=3 road_speed=1 resolution 24 continue]
+highway=* & motorroad=yes {add bicycle = no; add foot = no} [0x02 road_class=4 road_speed=2 resolution 16]
+highway=primary [0x03 road_class=4 road_speed=2 resolution 24 continue]
+highway=primary_link [0x08 road_class=3 road_speed=1 resolution 24 continue]
+highway=secondary [0x04 road_class=2 road_speed=1 resolution 24 continue]
+
+
+
+junction=roundabout & highway=trunk [0x0c road_class=3 road_speed=4 resolution 16]
+junction=roundabout & highway=primary [0x0c road_class=3 road_speed=3 resolution 19]
junction=roundabout & highway=secondary [0x0c road_class=2 road_speed=3 resolution 20]
junction=roundabout & highway=tertiary [0x0c road_class=1 road_speed=3 resolution 20]
junction=roundabout & highway=unclassified [0x0c road_class=1 road_speed=2 resolution 21]
junction=roundabout [0x0c road_class=0 road_speed=1 resolution 21]
-# Convert generic path to most specific
-highway=path & bicycle=designated {set highway=cycleway }
-highway=path & horse=designated {set highway=bridleway }
-highway=path & foot=designated {set highway=footway }
-
highway=bridleway {add access = no; add bicycle = yes; add foot = yes} [0x16 road_class=0 road_speed=0 resolution 23]
highway=byway [0x16 road_class=0 road_speed=0 resolution 23]
highway=cycleway {add access = no; add bicycle = yes; add foot = yes} [0x16 road_class=0 road_speed=1 resolution 23]
highway=footway {add access = no; add foot = yes} [0x16 road_class=0 road_speed=0 resolution 23]
highway=minor [0x06 road_class=1 road_speed=2 resolution 21]
-highway=motorway {add oneway = yes; add bicycle = no; add foot = no } [0x01 road_class=4 road_speed=6 resolution 12]
-highway=motorway_link {add oneway = yes; add bicycle = no; add foot = no } [0x09 road_class=4 road_speed=3 resolution 16]
+highway=motorway {add oneway = yes; add bicycle = no; add foot = no } [0x01 road_class=4 road_speed=7 resolution 12]
+highway=motorway_link {add oneway = yes; add bicycle = no; add foot = no } [0x09 road_class=3 road_speed=3 resolution 16]
+highway=trunk {add bicycle = no; add foot = no} [0x02 road_class=4 road_speed=5 resolution 16]
+highway=trunk_link {add bicycle = no; add foot = no} [0x09 road_class=3 road_speed=3 resolution 16]
+highway=* & motorroad=yes {add bicycle = no; add foot = no} [0x02 road_class=4 road_speed=4 resolution 16]
highway=pedestrian & area!=yes {add access = no; add foot = yes} [0x06 road_class=0 road_speed=0 resolution 22]
highway=primary [0x03 road_class=3 road_speed=4 resolution 19]
highway=primary_link [0x08 road_class=3 road_speed=3 resolution 19]
highway=residential | highway=living_street [0x06 road_class=0 road_speed=2 resolution 21]
highway=secondary [0x04 road_class=2 road_speed=3 resolution 20]
-highway=secondary_link [0x08 road_class=2 road_speed=2 resolution 20]
+highway=secondary_link [0x08 road_class=2 road_speed=1 resolution 20]
highway=path {add access = no; add bicycle = yes; add foot = yes} [0x16 road_class=0 road_speed=0 resolution 23]
highway=service [0x07 road_class=0 road_speed=1 resolution 22]
highway=steps {add access = no; add foot = yes} [0x16 road_class=0 road_speed=0 resolution 23]
highway=tertiary [0x05 road_class=1 road_speed=3 resolution 20]
-highway=tertiary_link [0x08 road_class=1 road_speed=2 resolution 20]
+highway=tertiary_link [0x08 road_class=1 road_speed=1 resolution 20]
highway=track [0x0a road_class=0 road_speed=1 resolution 21]
-highway=trunk [0x02 road_class=3 road_speed=5 resolution 16]
-highway=trunk_link [0x09 road_class=3 road_speed=3 resolution 16]
+
highway=unclassified | highway=road [0x06 road_class=1 road_speed=2 resolution 21]
highway=unsurfaced [0x0a road_class=0 road_speed=1 resolution 21]_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev