-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
routing profile foot.lua results in spurious trails for New Zealand (suspect SH 6) #6701
Comments
The issue is probably related to default access restrictions. OSM has a wiki page on it here: https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access_restrictions If you look at the tables there, you'll see that different counties have different defaults for different road classes. The OSRM foot profile was written for one set of rules, and it doesn't do country-by-country differences. This is absolutely a bug in OSRM, and patches to fix it would be quite welcome. Honestly, most of the work is probably just in the #6008 is a similar bug report from a couple of years ago. Obviously, nobody has submitted a patch to fix this yet. You could be the one! |
I added trunk into the allowed highway list and now tracks are ok. However I think the solution may not be solvable just through lua files. Looking at the osrm names file (after osrm-extract with the original foot.lua) the trunk entries have been removed. To support multiple polygon areas the data would have to still be there. If polygon areas can be fed Into .lua then it would work, otherwise you need separate extracts per country. Osrm-routed could choose an extract based on polygon. I do have separate extracts for AUS and NZ and choose between them (not in software). As it is now osrm-routed (and the api library) should report no route. |
You misunderstand how the feature works. The trunk roads are removed because OSRM flags them as inaccessible for walking. Check the wiki page here: https://github.com/Project-OSRM/osrm-backend/wiki/Using-location-dependent-data-in-profiles It includes an example showing how to obtain country borders in a GeoJSON format, then how to check the current country code ( For some countries, you would enable trunk roads, for other countries, you would disable them. The emitted routing file would have trunk edges enabled in some places, and disabled in others. The things that are really missing from OSRM are:
|
Thanks for that Danpat. I did not realize all that functionality was there. |
Actually just need the speed |
I think this is probably not the right forum for me to teach myself OSRM programming. |
Issue
I have created a dataset using foot.lua as the profile
This is described in the community forum
https://community.openstreetmap.org/t/issues-with-foot-lua-profile/103765
The profile is from git source.
Downloaded new-zealand-latest.osm.pbf. And set up two osrm data trees
new-zealand/car
new-zealand/foot
cd car
osrm-extract -p /opt/osrm/car.opt new-zealand-latest.osm.pbf
osrm-partition new-zealand-latest.osrm
osrm-customize new-zealand-latest.osrm
cd …/foot
osrm-extract -p /opt/osrm/foot.opt new-zealand-latest.osm.pbf
osrm-partition new-zealand-latest.osrm
osrm-customize new-zealand-latest.osrm
If i run osrm-routed -a MLD car/new-zealand-latest - the trail draws correctly
If i run osrm-routed -a MLD foot/new-zealand-latest - the trail draws garbage
This can be seen here :
https://map.project-osrm.org/?z=14¢er=-41.230508%2C173.377562&loc=-41.212480%2C173.382840&loc=-41.210172%2C173.395951&hl=en&alt=0&srv=2
The text was updated successfully, but these errors were encountered: