logo separator

[mkgmap-dev] roadspeed in default style

From Bernd Weigelt weigelt.bernd at web.de on Sun Mar 15 13:53:19 GMT 2015

Am Sonntag, 15. März 2015, 06:10:15 schrieb GerdP:

Hi Gerd

I don't think that there is a negative influence, but it can improve the 
troughput a little bit.
I have shortened the file a little bit more and merge the test of highway=* to 
the last lines

output with maxspeed=* & maxspeedkmh() =* { echo ' ${mkgmap:road-speed-max}'}
329442750:  0
329651261:  2
330025588:  null
330025588:  null
330025588:  null
330149281:  3
330183871:  4



Can you test the attached file, please?

Bernd


> I agree that we can remove the extra lines to delete maxspeed.
> I still see no reason to bother about railways.
> Do you think that it has an influence on the img output
> or do you tink that you improve throughput with this extra rule?

-- 
amarok2 now playing:



-------------- next part --------------
#
# Sets the road speed based on the maxspeed tag.
# In case mkgmap:road-speed-class is set the element
# road_speed is overriden.
#
# road_speed classification:
# road_speed | highest speed
#  7         | No speed limit
#  6         | 70 mph / 110 km/h
#  5         | 60 mph /  90 km/h
#  4         | 50 mph /  80 km/h
#  3         | 35 mph /  60 km/h
#  2         | 25 mph /  40 km/h
#  1         | 15 mph /  20 km/h
#  0         |  3 mph /   5 km/h
#


maxspeed=walk                   { set maxspeed=10 }
maxspeed~'.*:living_street'     { set maxspeed=10 }

maxspeed=RU:urban               { set maxspeed=60 }
maxspeed=UA:urban               { set maxspeed=60 }

maxspeed~'.*:urban'             { set maxspeed=50 }

maxspeed=AT:rural               { set maxspeed=100 }
maxspeed=DE:rural               { set maxspeed=100 }

maxspeed~'.*:rural'             { set maxspeed=90 }

maxspeed~'.*:trunk'             { set maxspeed=100 }
maxspeed~'.*:motorway'          { set maxspeed=130 }

maxspeed=* & maxspeedkmh()!=* { delete maxspeed }

highway=* & maxspeedkmh() <= 120 { set mkgmap:road-speed-max = 6 }
highway=* & maxspeedkmh() <= 100 { set mkgmap:road-speed-max = 5 }
highway=* & maxspeedkmh() <=  80 { set mkgmap:road-speed-max = 4 }
highway=* & maxspeedkmh() <=  60 { set mkgmap:road-speed-max = 3 }
highway=* & maxspeedkmh() <=  40 { set mkgmap:road-speed-max = 2 }
highway=* & maxspeedkmh() <=  20 { set mkgmap:road-speed-max = 1 }
highway=* & maxspeedkmh() <=  10 { set mkgmap:road-speed-max = 0 }

# please remove this line after tests
maxspeed=* & maxspeedkmh() =* { echo ' ${mkgmap:road-speed-max}'}


More information about the mkgmap-dev mailing list