-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Trunk road ignored for foot or bike routing - best way to solve #6008
Comments
TBH, OSRM is wrong here. There are some default access rules defined at: https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access_restrictions#United_Kingdom which shows that in the UK, |
A way to to it is using polygons, like driving_side or maxheight. https://github.com/Project-OSRM/osrm-backend/tree/master/data |
Sorry @frodrigo, I'm not sure what you mean? |
What @frodrigo means is that we should probably build up a GeoJSON that captures all these regional access restriction defaults, and make the |
I logged #6701. I looked at https://wiki.openstreetmap.org/wiki/Key:motorroad |
@tombay maybe you wan to contribute a PR to add this features and polygons to OSRM itself ? |
I will look into it (PR thing). I thought someone else might check into if the idea works. By polygons I assume it would be providing the geojson as a file osrm-extract could read. (I.e. the data that comes from the geoson output). I am not sure what impact it does to the extraction process.
What I did (I thought) was just add trunk to the potential result set.
Get BlueMail for Android
…On 18 Sept 2023, 5:56 pm, at 5:56 pm, "Frédéric Rodrigo" ***@***.***> wrote:
@tombay maybe you wan to contribute a PR to add this features and
polygons to OSRM itself ?
--
Reply to this email directly or view it on GitHub:
#6008 (comment)
You are receiving this because you were mentioned.
Message ID:
***@***.***>
|
This issue seems to be stale. It will be closed in 30 days if no further activity occurs. |
The idea is still interesting. |
I created a PR #6703 (Sep 2023) which addressed this issue. A subsequent PR (#6708) seemed to cause an issue with my PR and it is languishing. It does include a 3.6 mb geojson file which outlines the countries affected. I thought having to traverse this file for each way (and node ?) would be a no no so approached it via |
I have written (hacked??) a script to parse the tables in There are 31 countries and using data from The Natural Earth ne_10m_admin_0_countries data, the resulting geojson file is about 7.7meg. According to "https://wiki.openstreetmap.org/wiki/Precision_of_coordinates#Conversion_to_decimal" 10 metre accuracy is covered by dd.dddd. By reducing the ne data to dd.ddddd, and trimming feature data, the size can be reduced to ~4meg. General assumptions for the script was if there is an access type (yes,no,designated...) then drop any notes. To address the 126 empties is it better to say "no" or "yes" - or "maybe". "Cells within cells within cells" (Dekard in Blade Runner_2049). |
I can see no association with access nodes and countries and so have been looking at ways - speed handling. |
I have created a PR in Project OSRM /osrm-backend (#6710) that addresses the issue. It enables the use of --location-dependent-data to create datasets. The PR is awaiting review (if anyone is interested) I created profiles countryfoot.lua and countrybicycle.lua that make use of the feature. |
I still interested to review the PR (but few free time right now). The geojson is available somewhere ? The other geojson in the project are light, but maybe over simplified. One solution maybe to include a simplified geojson and the lua code directly into the profiles. |
I have added .../test/data/nominatimosm.geojson.gz (~13.8meg) |
You need the merge the countries to avoid useless inner borders. Then you need to over simplify the shore border. Finally you can simplify the geometries. Look at the other geojson file already included. Simpler geojson are smaller, but also allows faster point in polygon runtime. |
I created a geojson file based from poly files at download.geofabrik.de. (.../test/data/geofabrikpoly.geojson) |
I merged the countries for you using JOSM. But my file have too much decimals, should be keep to 6 (like you file). |
Came across this tweet: https://twitter.com/thomasforth/status/1381702567126835201
And this example in the replies of how OSRM was seemingly ignoring the A75 trunk road for foot and bike routing from one side of town to the other: https://www.openstreetmap.org/directions?engine=fossgis_osrm_foot&route=54.90570%2C-5.01110%3B54.90420%2C-5.02350#map=16/54.9016/-5.0153 (GraphHopper routes along trunk roads)
I looked at the debug view and found that was indeed the case: http://map.project-osrm.org/debug/foot.html#17.26/54.90434/-5.01646
In case you are wondering what this road looks like: https://www.geograph.org.uk/photo/4929194 (perfectly suitable for foot/bike routing)
So my question is - what is the best way to solve this in OSM? Just add foot/bicycle=yes, sidewalk=both, separately mapped sidewalks or a combination of all three?
The text was updated successfully, but these errors were encountered: