Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to set speed in the osrmIsochrone function #35

Closed
annnvv opened this issue Oct 19, 2018 · 5 comments
Closed

Option to set speed in the osrmIsochrone function #35

annnvv opened this issue Oct 19, 2018 · 5 comments

Comments

@annnvv
Copy link

annnvv commented Oct 19, 2018

Would it be possible to include an option for users to set the speed in the osrmIsochrone function (to not be limited to using the defaults)?

The reason I ask is that when I ran the code for a 10 minute walk time and plotted the result (see below), the resulting Isochrone extends to the edges of the grid, which makes me question whether the grid is capturing the whole 10 minute walk time area or just what fits in the grid. I hypothesize that the walk speed is too slow and therefore the resulting grid is too small to capture the whole walk time.

A related question, are the units for speed in feet per minute? If so, for walk time that equates to about 1.9 mph, whereas (from the quick internet search I did) an average walk speed is about 3 mph.

options(osrm.profile = "walk")
iso <- osrmIsochrone(loc = c(28.307913, -15.396259), breaks = seq(from = 0, to = 10, by = 10), res = 100)

fig

@rCarto
Copy link
Member

rCarto commented Oct 20, 2018

Hello,
Ok, I will investigate the question of the default walking speed to obtain a grid large enough to contain the full isochrones.

The units for speed are in kilometers per hour.

@rCarto
Copy link
Member

rCarto commented Nov 22, 2018

I may have find the problem.
Do you use the OSRM demo server (the default one used with osrm R package) or your own?
The OSRM demo server only serve driving distances. The use of driving distances for time calculation and walk profile for isochrone computation would explain your output.

If you use your own server you have to set the correct profile (foot.lua instead of car.lua) in the first step of the OSRM server build...

see also #37

@annnvv
Copy link
Author

annnvv commented Nov 26, 2018

I am using the demo server. I didn't realize that the demo server only allows for driving distances.

I appreciate you taking the time to look into this, thank you.

@MeganBeckett
Copy link

Hi there, I have also been investigating this and from what I can see where speed is calculated in the function (https://github.com/rCarto/osrm/blob/39906d3ce00592bc622a6e2091c4c878b1f1f743/R/osrmIsochrone.R#L79), are the units really in km/hr?

Or meters/minute? Even so, the speed for "walking" then equates to 166 m/min - is that correct? That's nearly 10km/hr which is faster than most people can run?

Also, is it possible to set your own speeds for walking and driving?

Thanks!

@rCarto
Copy link
Member

rCarto commented Feb 27, 2019

Hi,
This speed is only used to create a grid to query travel times. So I used over-estimated speeds to have a grid large enough. The walking, driving and cycling speeds are defined at the OSRM server level through different profile files: https://github.com/Project-OSRM/osrm-backend/wiki/Profiles.
The original issue has been replied above, the problem came from the use of the demo server.

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

No branches or pull requests

3 participants