You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pedestrian street with vehicles allowed not routable by car profile #2888
Describe the bug
A small island in Denmark is only accessible by car via a very short pedestrian street that allows vehicles. All routes to most of the island is blocked because graphhopper does not allow vehicle routes through this pedestrian street,
It would be nice to see a few more real-world examples where accepting the pedestrian roads is necessary. I know the overpass query returns lots of ways with this tag combination, but looking for some actual examples where this is an issue would make it clear that we really need to change this and we do not break more cases than we fix.
Once this is clear it should be a matter of leaving out pedestrian from import.osm.ignored_highways (it is currently included in config-example.yml and also in the hosted car profile) (this will impact the performance of the OSM import as well as the resulting graph size) and adding pedestrian to highwayValues in CarAccessParser.java (and possibly a few other access parsers).
I can dig up some more examples from Denmark. It is a pretty common thing here to have pedestrian areas that allows vehicles - also for drive throughs.
Normally it isn't an issue I guess, because driving around is often more optimal because of the low max speed.
But for deliveries in the pedestrian zone and drive throughs to reach an "island", it is difficult to do without.
It would be nice to see a few more real-world examples where accepting the pedestrian roads is necessary.
Here's an example from the OSM wiki:
"Gågade" Pedestrian street with "Kørsel tilladt" vehicles allowed. Driving is allowed here, but (tourist)pedestrians are prioritized higher, so motorists basically can't expect to move faster than the pedestrian in front of them.
this will impact the performance of the OSM import as well as the resulting graph size
Would it make any sense to introduce a tag filter (if none exists already), allowing fx. the car profile to include pedestrian only if it also has specific tags?
Yes, we need to allow highway=pedestrian for car only if it is explicitly allowed by other tags. The import performance is probably not too critical since there aren't so many ways tagged as highway=pedestrian overall.
So as I understand it, only about a tenth is applicable to a car profile (for Denmark at least - but maybe somewhere in the samme ballpark for other parts o the world)
So as I understand it, only about a tenth is applicable to a car profile
Yes, this way the number of additional edges would be reduced, but really the overall number of pedestrian edges will be small compared to the rest either way (less than 1% of all OSM highways are pedestrian).
The first place where OSM ways are filtered is in OSMParsers.java#acceptWay. Everything that passes here will produces some edges. If we wanted to apply the optimization you have in mind it would be here, but like I said maybe that's not even necessary.
We then need to make sure that in CarAccessParser.java#handleWayTags the access of these edges is false unless there is some tag like vehicle=car.
@easbar I am gonna take a look at the issue with routing to/through pedestrian streets.
But... Isn't it gonna cause issues in big city centers where routing through pedestrian streets will often be the shortest route?
It is quite common (in Denmark at least) for pedestrian streets to not have a tag for max speed, although common knowledge here is that pedestrians streets have a low advised max speed (15kmh). Some pedestrian streets are =destination which would hinder route through, but not all pedestrian streets has that and it requires correct tagging.
I am afraid that allowing routing through pedestrian streets will cause unwanted routes in many city centers with poor tagging. 🤔
Edit
I see that destination and conditionals for opening-hours are open issues. Together with specific legal_default_speeds for pedestrian I think it will work fine.
I have added a PR for my current progress on this. #2940
Hi there, I see there are already 2 PRs that try to solve this issue, so should we review this?
I just discovered this topic, and hopefully I have something helpful to add.
Is it possible for GraphHopper to look at whether e.g. vehicle=yes exists in the pedestrian street and then allow cars to pass through them? Right now GraphHopper is following the OSM wiki interpretation of pedestrian streets where cars are not expected to go through them, and indeed, blanket-yes accepting highway=pedestrian can cause problems.
There are some paths in Hong Kong that are tagged as highway=pedestrian but the street itself IRL does allow vehicular traffic (i.e., it has e.g. vehicle=yes). Just that in practice, the street is simply usually packed full of pedestrians, and does not reject vehicular traffic. I personally don't quite agree to this tagging, but it do be like this right now.
If GraphHopper can look at vehicle=yes and the related tags, then mappers can simply provide vehicle=yes on an case-by-case basis to unlock specific pedestrian streets. This also opens up opportunity to make this behavior country-based.
Activity
easbar commentedon Oct 10, 2023
Shouldn't this rather be tagged as
living_street?otbutz commentedon Oct 10, 2023
The translation of
Gågade zoneis literallypedestrian zone: https://www.deepl.com/translator#da/en/g%C3%A5gade%20zoneIt's even listed in the OSM tagging examples(last one): https://wiki.openstreetmap.org/wiki/Tag:highway=pedestrian?uselang=en
otbutz commentedon Oct 10, 2023
Seems to be pretty common: https://overpass-turbo.eu/s/1BFa
easbar commentedon Oct 10, 2023
Maybe exclude
area=yes, but it's true there seem to be quite a few pedestrian highways usingvehicle=yes(https://overpass-turbo.eu/s/1BFq)otbutz commentedon Oct 10, 2023
And a bit more if we also take different values like
destinationinto account: https://overpass-turbo.eu/s/1BFrotbutz commentedon Oct 10, 2023
This has also implications for bike routing. If cyclists are explicitly allowed to enter, we shouldn't treat it as a pushing section.
michaelkrog commentedon Oct 10, 2023
I wouldn't mind giving this a shot as my first contribution.
Any pointers for me where to start?
Leaving a links here with info about the specific tags:
easbar commentedon Oct 10, 2023
It would be nice to see a few more real-world examples where accepting the pedestrian roads is necessary. I know the overpass query returns lots of ways with this tag combination, but looking for some actual examples where this is an issue would make it clear that we really need to change this and we do not break more cases than we fix.
Once this is clear it should be a matter of leaving out
pedestrianfromimport.osm.ignored_highways(it is currently included inconfig-example.ymland also in the hosted car profile) (this will impact the performance of the OSM import as well as the resulting graph size) and addingpedestriantohighwayValuesinCarAccessParser.java(and possibly a few other access parsers).michaelkrog commentedon Oct 10, 2023
Ok.
I can dig up some more examples from Denmark. It is a pretty common thing here to have pedestrian areas that allows vehicles - also for drive throughs.
Normally it isn't an issue I guess, because driving around is often more optimal because of the low max speed.
But for deliveries in the pedestrian zone and drive throughs to reach an "island", it is difficult to do without.
easbar commentedon Oct 11, 2023
Are they allowed to drive through for anyone or only for delivery vehicles and such?
Yes, of course excluding an entire island because of such a pedestrian road is bad.
otbutz commentedon Oct 11, 2023
Here's an example from the OSM wiki:
michaelkrog commentedon Oct 12, 2023
Adding a few examples here.
1: Korsør, Denmark
Ground truth (signs says "driving allowed" and "one way")

Graphhopper maps route
2: Korsør, Denmark
Ground truth (signs says "driving allowed")

Destination is parking spots in Pedestrian zone

Graphhopper maps route

3: Slagelse, Denmark (bicycles allowed)
This was remove as it was an issue with a missing tag on the node. (Fixed in open street map data now)
4: Slagelse, Denmark (tricky one, this one)
Ground truth
Signs say (in order):
Graphhopper maps (by van)

michaelkrog commentedon Oct 12, 2023
What do you mean by "pushing section"? To me it seems that it works for bikes when they are allowed in pedestrian zones.
otbutz commentedon Oct 12, 2023
Seems like we handle this case already properly for bike routing:
https://graphhopper.com/maps/?point=55.403963%2C11.35298&point=55.402384%2C11.354302&profile=bike&layer=OpenStreetMap
highway=pedestrian+bicycle=yes: https://www.openstreetmap.org/way/333794059 -> driving allowedhighway=pedestrian: https://www.openstreetmap.org/way/10710648#map=19/55.40315/11.35446 -> pushing sectionmichaelkrog commentedon Oct 12, 2023
Oh. Literally a section for pushing bicycles. 😀 I thought pushing section was a technical term in Gaphhopper I didn't know of. I get it now.
michaelkrog commentedon Oct 12, 2023
@easbar
Would it make any sense to introduce a tag filter (if none exists already), allowing fx. the car profile to include pedestrian only if it also has specific tags?
easbar commentedon Oct 17, 2023
Yes, we need to allow highway=pedestrian for car only if it is explicitly allowed by other tags. The import performance is probably not too critical since there aren't so many ways tagged as
highway=pedestrianoverall.michaelkrog commentedon Oct 18, 2023
Okay. What I meant was filtering by tags already during the import process to only process a minimum
highway=pedestrian.I tried to se the difference in nodes/ways for with and without a filter on tags with a bbox just for Denmark.
way["highway"="pedestrian"][~"^(vehicle|motor_vehicle|motorcar)$"~"^(yes|destination)$"]["area"!~"yes"]({{bbox}});Nodes: 1424
Ways: 371
way["highway"="pedestrian"]({{bbox}})Nodes: 20236
Ways: 2898
So as I understand it, only about a tenth is applicable to a car profile (for Denmark at least - but maybe somewhere in the samme ballpark for other parts o the world)
easbar commentedon Oct 18, 2023
Yes, this way the number of additional edges would be reduced, but really the overall number of pedestrian edges will be small compared to the rest either way (less than 1% of all OSM highways are pedestrian).
The first place where OSM ways are filtered is in OSMParsers.java#acceptWay. Everything that passes here will produces some edges. If we wanted to apply the optimization you have in mind it would be here, but like I said maybe that's not even necessary.
We then need to make sure that in CarAccessParser.java#handleWayTags the access of these edges is false unless there is some tag like vehicle=car.
michaelkrog commentedon Feb 12, 2024
@easbar I am gonna take a look at the issue with routing to/through pedestrian streets.
But... Isn't it gonna cause issues in big city centers where routing through pedestrian streets will often be the shortest route?
It is quite common (in Denmark at least) for pedestrian streets to not have a tag for max speed, although common knowledge here is that pedestrians streets have a low advised max speed (15kmh). Some pedestrian streets are =destination which would hinder route through, but not all pedestrian streets has that and it requires correct tagging.
I am afraid that allowing routing through pedestrian streets will cause unwanted routes in many city centers with poor tagging. 🤔
Edit
I see that destination and conditionals for opening-hours are open issues. Together with specific legal_default_speeds for pedestrian I think it will work fine.
I have added a PR for my current progress on this.
#2940
Vectorial1024 commentedon Sep 12, 2025
Hi there, I see there are already 2 PRs that try to solve this issue, so should we review this?
I just discovered this topic, and hopefully I have something helpful to add.
Is it possible for GraphHopper to look at whether e.g.
vehicle=yesexists in the pedestrian street and then allow cars to pass through them? Right now GraphHopper is following the OSM wiki interpretation of pedestrian streets where cars are not expected to go through them, and indeed, blanket-yes acceptinghighway=pedestriancan cause problems.There are some paths in Hong Kong that are tagged as
highway=pedestrianbut the street itself IRL does allow vehicular traffic (i.e., it has e.g.vehicle=yes). Just that in practice, the street is simply usually packed full of pedestrians, and does not reject vehicular traffic. I personally don't quite agree to this tagging, but it do be like this right now.If GraphHopper can look at
vehicle=yesand the related tags, then mappers can simply providevehicle=yeson an case-by-case basis to unlock specific pedestrian streets. This also opens up opportunity to make this behavior country-based.karussell commentedon Oct 8, 2025
This was implemented in #3203 (i.e. only accessible for cars where explicitly allowed)