Skip to content

surface, tracktype, smoothness tags in car profile#1208

Merged
DennisOSRM merged 2 commits intodevelopfrom
feature/surfaces
Oct 7, 2014
Merged

surface, tracktype, smoothness tags in car profile#1208
DennisOSRM merged 2 commits intodevelopfrom
feature/surfaces

Conversation

@emiltin
Copy link
Copy Markdown
Contributor

@emiltin emiltin commented Oct 7, 2014

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.

@DennisOSRM
Copy link
Copy Markdown
Collaborator

Thanks @emiltin. This will close #955, #1208, #389.

profiles/car.lua Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

400 km/h?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a max speed. these value will never increase the resulting speed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could be set to 150, 200 or 250. but you can in fact go very fast on an asphalt surface.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it should be set to a value like +infinity. 400 is somewhat arbitrary and hides the intent of the value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it could be removed altogether if we don't think it will ever limit the speed

@DennisOSRM
Copy link
Copy Markdown
Collaborator

not sure i get the logic behind that. Can you elaborate?

@emiltin
Copy link
Copy Markdown
Contributor Author

emiltin commented Oct 7, 2014

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
speed_profile['service'] = 15
surface_speeds['unpaved'] = 40 # if surface=unpaved, never go faster than 40

highway=trunk, surface=unpaved:
the initial speed is 85, since it's a trunk road. since surface=unpaved, this is lowered to 40.

highway=service, surface=unpaved:
the initial speed is 15, since it's a service. surface=unpaved check has no further effect, since you're already going slower than 40.

(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.)

@emiltin emiltin closed this Oct 7, 2014
@emiltin emiltin reopened this Oct 7, 2014
@DennisOSRM
Copy link
Copy Markdown
Collaborator

OK, got it. But still using math.huge is better than an arbitrary value if you want an upper value that is never reached.

@DennisOSRM
Copy link
Copy Markdown
Collaborator

nil is equally fine.

@emiltin
Copy link
Copy Markdown
Contributor Author

emiltin commented Oct 7, 2014

check the latest commit. nil (or removing the line) means no limit

@emiltin
Copy link
Copy Markdown
Contributor Author

emiltin commented Oct 7, 2014

updated the comments in the code to make it a bit clearer

@DennisOSRM
Copy link
Copy Markdown
Collaborator

cool, we can get this merged after lunch.

@emiltin
Copy link
Copy Markdown
Contributor Author

emiltin commented Oct 7, 2014

one other thing this PR does is to not route on ways with smoothness=impassable. see the tests

@DennisOSRM
Copy link
Copy Markdown
Collaborator

ah, yet another impassable tag ;)

DennisOSRM added a commit that referenced this pull request Oct 7, 2014
surface, tracktype, smoothness tags in car profile, closes #955, #1208, #389.
@DennisOSRM DennisOSRM merged commit 46e9377 into develop Oct 7, 2014
@DennisOSRM DennisOSRM deleted the feature/surfaces branch October 7, 2014 13:11
@DennisOSRM
Copy link
Copy Markdown
Collaborator

And we are live, thanks again @emiltin.

@DennisOSRM
Copy link
Copy Markdown
Collaborator

It's in production as of now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants