surface, tracktype, smoothness tags in car profile#1208
Conversation
profiles/car.lua
Outdated
There was a problem hiding this comment.
it's a max speed. these value will never increase the resulting speed
There was a problem hiding this comment.
it could be set to 150, 200 or 250. but you can in fact go very fast on an asphalt surface.
There was a problem hiding this comment.
Then it should be set to a value like +infinity. 400 is somewhat arbitrary and hides the intent of the value.
There was a problem hiding this comment.
yes it could be removed altogether if we don't think it will ever limit the speed
|
not sure i get the logic behind that. Can you elaborate? |
|
all the profile values for highway, surface, tracktype and smoothness tags are effectively max speeds. for example, the profile currently specifies: speed_profile['trunk'] = 85 highway=trunk, surface=unpaved: highway=service, surface=unpaved: (the resulting speed is later scaled down by 0.8 to get from max to average speed, but this is unrelated to the current PR.) |
|
OK, got it. But still using |
|
|
|
check the latest commit. nil (or removing the line) means no limit |
|
updated the comments in the code to make it a bit clearer |
|
cool, we can get this merged after lunch. |
|
one other thing this PR does is to not route on ways with smoothness=impassable. see the tests |
|
ah, yet another impassable tag ;) |
|
And we are live, thanks again @emiltin. |
|
It's in production as of now. |
thanks to @ftrebien for providing an initial PR at #955.
the current PR uses a simpler way to handle multiple tags: it simply picks the slowest speed mandated by the tags present as well as the road type.
actual speeds have been estimated from the photos at the relevant osm wiki pages, but could be discussed.