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
Even if we already include areas/places in the routing there is still some work to do as we need to cross the polygon and the way along the lines might be suboptimal.
Both involve routing over a car-park area; the first from a road to a foot way, both nodes on the area boundary, the second as the assumption would be that steps would be a preferred route down into car-park area to get to shops (simplified to simply getting 'down steps', which it doesn't do).
Happy to split this up into different issues, but I'm not sure what GH does and doesn't cope with in this regard.
I regard this as an important and fundamental gap in GraphHopper’s functionality (but also appreciate that it must be hard to implement a solution). I come across it fairly repeatedly and would expect cases to increase as the map is refined. A typical example are foot routes through pedestrian areas such as this one in Osnabrück, part of a walk that I needed to research recently. There is a specific and particularly puzzling phenomenon here because in addition to the areas, the streets have also been mapped as highway:pedestrian lines that go roughly through the middle of the areas. GH uses this highway:pedestrian section but then decides to take a short highway:footway to the edge of the area and continue going around it, forming an almost closed loop, while in fact there are further highway:pedestrian sections all the way through the two streets (Bierstraße, Heger Straße) between the start and destination. I tried to move the destination away from the edge of the area to the center where the highway objects are, but to no avail – but at some point this does make GH suddenly use the more direct route through Große Gildewart, which has the same kind of highway going through the middle of the area. Whether the middle highway objects are used or not seems quite unpredictable. They are all tagged with bicycle:yes so it is worth looking at the behaviour of bicycle routes across the whole pedestrian area too. Routes can jump quite suddenly, sometimes using the middle sections and sometimes not, often depending on whether the destination is closer to the edge of an area or to a middle highway (try varying this here).
In general I would expect a path through the middle of areas regardless of the presence of “guiding sections” or the exact location of the route’s points. And I would not restrict this issue to pedestrian/bike routing, there might well be areas that motorised vehicles can use.
All is possible but needs time and I know people that made it working with GraphHopper, but currently no one contributed it back and for us this is no high priority. But would love to have a solution for this :)
Sounds really nice and would be appreciated! Currently there is no real architecture for adding plugins. The reason mainly is that we didn't have a common case where to add stuff, but also as we plugged custom stuff via method overloading or just by configuration. But you can just add it in the OSMReader for now and introduce a parameter like prepare.area_routing=no|yes. The only important thing for now IMO is that there should be some unit and integration tests showing the improved routing.
Are you doing this as a pre-processing step or some combination of pre-processing and "splines calculation"? Did you do some tests on e.g. country sized scale and have an rough value of the overhead for the graph size? (Sorry do not remember the numbers from your talk :))
Okay, I will try to do it with this parameter prepare.area_routing=no|yes.
I preprocessed all edges in advance. Hence, the new edges within the open space are a "normal" part of the routing graph.
The overhead for the graph size depends on the algorithm. Using a Visibility algorithm that connects all nodes with each other, the overhead can be up to 15%. The routing result is very good then.
I also tried to connect only the Tower Nodes with each other. Then the overhead is less than 1%. However, it sometimes produces bad results on concave open spaces, because then very often the direct line-of-sight between some Tower Nodes is not possible anymore.
So far I worked only with open spaces stored as closed ways. The next step is to also integrate open spaces that are modeled as relation (multipolygon).
This definition explains how to convert them into "normal" polygons.
I guess it is necessary to store all relations during the parsing process. Maybe at this point in the OSMReader class.
How would you store these multipolygons (relations) during the parsing process?
So far I worked only with open spaces stored as closed ways. The next step is to also integrate open spaces that are modeled as relation (multipolygon).
Let us first integrate and improve the simpler version. This way we have something that works already without other trouble.
What is the reason that this issue about pedestrian routing through areas has such low priority?
I'm asking because mappers obviously continue to add "virtual" ways over areas in OSM. This is unncessary and like "tagging for the router". In addition it looks weird in renderers, because such pedestrian ways can't be distinguished from "real" ones without guessing...
I'll ask the question another way around: is there a way the community can support this? Even if it's just having six flower bouquets or pizzas delivered to the graphhopper team :)
There was something from @bufferclip but do not know its state.
Even if it's just having six flower bouquets or pizzas delivered to the graphhopper team :)
That would be supportive, sure. At the end we all have only limited time and there are so many things that we could improve. Coding pushes things further, even if you do not have good Java skills. Or money to contract someone etc
@JakobMiksch Did you ever publish your code mentioned above (#82 (comment)), I have look for it but with out success. I'd be interested in looking at using it as a starting point if it's still available.
@sfkeller interesting approach, thanks for the link. I had a brief look at the project. If I understand this correctly, you transform areas to ways in a preprocessing step, which allows you to use a unmodified GraphHopper version to import the graph?
Correct.
I had a look at the cited papers. So the idea of PlazaRoute was to create a "SpiderWebGraph" for areas? If yes, did you measure the impact of the change, in regards of number of ways and routing performance? How are the results?
I did some work towards this and summarized some of the difficulties here: #2805
Note that I considered both highway=footway+area=yes and highway=pedestrian+area=yes. Maybe we could focus on highway=pedestrian first (maybe these are more 'plaza-like'(?)).
There is also an open pull request at OSRM with the same goal Project-OSRM/osrm-backend#7161
It's great that “area routing” is getting some attention again. The algorithms and implementations are available (see, for example, this comment and the follow-up posts seven years(!) ago)...
I was recently made aware of this missing feature when I was testing my “vampire mode” - an OSRM profile for pedestrians that prefers shady streets...
Activity
vincentdephily commentedon Feb 18, 2015
This example was reported on the osm-website issues.
neiljp commentedon Apr 24, 2015
What routing over areas does GH do? The bug I filed (now closed) on the osm website repo linked to one example, here is another:
http://www.openstreetmap.org/directions?engine=graphhopper_foot&route=57.16063%2C-2.11108%3B57.16071%2C-2.11137#map=19/57.16083/-2.11150
or in GH:
https://graphhopper.com/maps/?point=57.160614%2C-2.111076&point=57.160698%2C-2.111397&vehicle=foot&locale=en-US&elevation=true&layer=Lyrk
Both involve routing over a car-park area; the first from a road to a foot way, both nodes on the area boundary, the second as the assumption would be that steps would be a preferred route down into car-park area to get to shops (simplified to simply getting 'down steps', which it doesn't do).
Happy to split this up into different issues, but I'm not sure what GH does and doesn't cope with in this regard.
sebalis commentedon Nov 22, 2016
I regard this as an important and fundamental gap in GraphHopper’s functionality (but also appreciate that it must be hard to implement a solution). I come across it fairly repeatedly and would expect cases to increase as the map is refined. A typical example are foot routes through pedestrian areas such as this one in Osnabrück, part of a walk that I needed to research recently. There is a specific and particularly puzzling phenomenon here because in addition to the areas, the streets have also been mapped as highway:pedestrian lines that go roughly through the middle of the areas. GH uses this highway:pedestrian section but then decides to take a short highway:footway to the edge of the area and continue going around it, forming an almost closed loop, while in fact there are further highway:pedestrian sections all the way through the two streets (Bierstraße, Heger Straße) between the start and destination. I tried to move the destination away from the edge of the area to the center where the highway objects are, but to no avail – but at some point this does make GH suddenly use the more direct route through Große Gildewart, which has the same kind of highway going through the middle of the area. Whether the middle highway objects are used or not seems quite unpredictable. They are all tagged with bicycle:yes so it is worth looking at the behaviour of bicycle routes across the whole pedestrian area too. Routes can jump quite suddenly, sometimes using the middle sections and sometimes not, often depending on whether the destination is closer to the edge of an area or to a middle highway (try varying this here).
In general I would expect a path through the middle of areas regardless of the presence of “guiding sections” or the exact location of the route’s points. And I would not restrict this issue to pedestrian/bike routing, there might well be areas that motorised vehicles can use.
perliedman commentedon Nov 22, 2016
Maybe old news, and not related to GraphHopper, but this talk shows some of the difficulties (and maybe possible solutions) in routing over areas: https://www.youtube.com/watch?v=chGlRnYGvDg
karussell commentedon Nov 22, 2016
All is possible but needs time and I know people that made it working with GraphHopper, but currently no one contributed it back and for us this is no high priority. But would love to have a solution for this :)
JakobMiksch commentedon Dec 15, 2016
I did some experiments with routing through open spaces:

I will try to contribute the code. I did most of the changes in the https://github.com/graphhopper/graphhopper/blob/0.7/core/src/main/java/com/graphhopper/reader/OSMReader.java class.
In which part of GraphHopper would you prefer to have the code?
I guess not everybody needs this "feature". Is it possible to create a plugin for that?
karussell commentedon Dec 15, 2016
Sounds really nice and would be appreciated! Currently there is no real architecture for adding plugins. The reason mainly is that we didn't have a common case where to add stuff, but also as we plugged custom stuff via method overloading or just by configuration. But you can just add it in the OSMReader for now and introduce a parameter like
prepare.area_routing=no|yes. The only important thing for now IMO is that there should be some unit and integration tests showing the improved routing.Are you doing this as a pre-processing step or some combination of pre-processing and "splines calculation"? Did you do some tests on e.g. country sized scale and have an rough value of the overhead for the graph size? (Sorry do not remember the numbers from your talk :))
JakobMiksch commentedon Dec 16, 2016
Okay, I will try to do it with this parameter
prepare.area_routing=no|yes.I preprocessed all edges in advance. Hence, the new edges within the open space are a "normal" part of the routing graph.
The overhead for the graph size depends on the algorithm. Using a Visibility algorithm that connects all nodes with each other, the overhead can be up to 15%. The routing result is very good then.
I also tried to connect only the Tower Nodes with each other. Then the overhead is less than 1%. However, it sometimes produces bad results on concave open spaces, because then very often the direct line-of-sight between some Tower Nodes is not possible anymore.
karussell commentedon Dec 17, 2016
I see. Let us start with the higher precision and if necessary we make it configurable or something (?)
JakobMiksch commentedon Jan 5, 2017
So far I worked only with open spaces stored as closed ways. The next step is to also integrate open spaces that are modeled as relation (multipolygon).
This definition explains how to convert them into "normal" polygons.
I guess it is necessary to store all relations during the parsing process. Maybe at this point in the OSMReader class.
How would you store these multipolygons (relations) during the parsing process?
karussell commentedon Jan 5, 2017
Let us first integrate and improve the simpler version. This way we have something that works already without other trouble.
sfkeller commentedon Oct 8, 2017
What is the reason that this issue about pedestrian routing through areas has such low priority?
I'm asking because mappers obviously continue to add "virtual" ways over areas in OSM. This is unncessary and like "tagging for the router". In addition it looks weird in renderers, because such pedestrian ways can't be distinguished from "real" ones without guessing...
karussell commentedon Oct 9, 2017
Why do you think it has "such low priority"? The community defines the priority, we cannot do everything.
Sorry, but that is not our fault :) . Our stance is clearly: do not map for the router!
grischard commentedon Oct 9, 2017
I'll ask the question another way around: is there a way the community can support this? Even if it's just having six flower bouquets or pizzas delivered to the graphhopper team :)
karussell commentedon Oct 9, 2017
There was something from @bufferclip but do not know its state.
That would be supportive, sure. At the end we all have only limited time and there are so many things that we could improve. Coding pushes things further, even if you do not have good Java skills. Or money to contract someone etc
9 remaining items
Excape commentedon Mar 16, 2018
@boldtrn That's about right, we create new ways with the shortest paths through the areas, and then merge them back together with the original OSM data to use it with GraphHopper
We did analyze the impact on the data size (among others) and compared the two methods "visibility graph" and "SpiderWeb graph". The whole text can be found here (German): https://github.com/PlazaRoute/doc/releases
neilireson commentedon Apr 21, 2020
@JakobMiksch Did you ever publish your code mentioned above (#82 (comment)), I have look for it but with out success. I'd be interested in looking at using it as a starting point if it's still available.
stefanhahmann commentedon Apr 22, 2020
Cf. comment from 16.03.2018: #82 (comment)
stefanhahmann commentedon Apr 22, 2020
https://www.tandfonline.com/doi/full/10.1080/10095020.2017.1399675 Table 1 shows that open spaces are rare case in OSM though.
sfkeller commentedon Apr 22, 2020
FYI: The repo of PlazaRoute (Open Source, mentioned above) is still available.
stefanhahmann commentedon Apr 22, 2020
Just see that the openrouteservice link was broken. This one should work: https://github.com/GIScience/openrouteservice/blob/master/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/graphbuilders/InFieldGraphBuilder.java
neilireson commentedon Apr 22, 2020
Awesome, thank you for the reference and code. If I can do anything useful with them I will report back.
sfkeller commentedon Apr 22, 2020
@stefanhahmann
Correct.
Yes there was some evaluation in the thesis. I can't answer quickly though. Did yo use see the thesis documentation. AFAIK it's also here on a better citable place: https://eprints.hsr.ch/625/
fiee commentedon Oct 7, 2022
And several years later, the issue is still open. It also affects platforms, i.e. GraphHopper (as well as OSRM) can’t find routes through stations.
Is there anything we users can do about that?
Vectorial1024 commentedon Oct 21, 2025
Hi there! I have been redirected to this issue.
This is a really old but open issue.
highway=pedestrianwitharea=yes?)easbar commentedon Oct 21, 2025
I did some work towards this and summarized some of the difficulties here: #2805
Note that I considered both
highway=footway+area=yesandhighway=pedestrian+area=yes. Maybe we could focus onhighway=pedestrianfirst (maybe these are more 'plaza-like'(?)).There is also an open pull request at OSRM with the same goal Project-OSRM/osrm-backend#7161
sfkeller commentedon Nov 1, 2025
It's great that “area routing” is getting some attention again. The algorithms and implementations are available (see, for example, this comment and the follow-up posts seven years(!) ago)...
I was recently made aware of this missing feature when I was testing my “vampire mode” - an OSRM profile for pedestrians that prefers shady streets...
sfkeller commentedon Sep 1, 2026
FYI: OSRM and Valhalla now support routing through pedestrian areas (plaza routing).
twassman commentedon Sep 16, 2026
For easy reference, this is Project-OSRM/osrm-backend#64 & Project-OSRM/osrm-backend#7161 for OSRM; and valhalla/valhalla#3570, valhalla/valhalla#6127, and valhalla/valhalla#6195 for Valhalla.