Skip to content

Area routing for pedestrian/bike #82

Open

Description

@karussell

Activity

  1. vincentdephily commented on Feb 18, 2015

    @vincentdephily

    This example was reported on the osm-website issues.

  2. neiljp commented on Apr 24, 2015

    @neiljp

    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.

  3. sebalis commented on Nov 22, 2016

    @sebalis

    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.

  4. perliedman commented on Nov 22, 2016

    @perliedman

    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

  5. karussell commented on Nov 22, 2016

    @karussell
    MemberAuthor

    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 :)

  6. JakobMiksch commented on Dec 15, 2016

    @JakobMiksch
    Contributor

    I did some experiments with routing through open spaces:
    output

    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?

  7. karussell commented on Dec 15, 2016

    @karussell
    MemberAuthor

    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 :))

  8. JakobMiksch commented on Dec 16, 2016

    @JakobMiksch
    Contributor

    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.

  9. karussell commented on Dec 17, 2016

    @karussell
    MemberAuthor

    I see. Let us start with the higher precision and if necessary we make it configurable or something (?)

  10. JakobMiksch commented on Jan 5, 2017

    @JakobMiksch
    Contributor

    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?

  11. karussell commented on Jan 5, 2017

    @karussell
    MemberAuthor

    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.

  12. sfkeller commented on Oct 8, 2017

    @sfkeller

    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...

  13. karussell commented on Oct 9, 2017

    @karussell
    MemberAuthor

    Why do you think it has "such low priority"? The community defines the priority, we cannot do everything.

    I'm asking because mappers obviously continue to add "virtual" ways over areas in OSM.

    Sorry, but that is not our fault :) . Our stance is clearly: do not map for the router!

  14. grischard commented on Oct 9, 2017

    @grischard

    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 :)

  15. karussell commented on Oct 9, 2017

    @karussell
    MemberAuthor

    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

  16. 9 remaining items

  17. Excape commented on Mar 16, 2018

    @Excape

    @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

  18. deleted a comment from wherbawi on Mar 16, 2018
  19. neilireson commented on Apr 21, 2020

    @neilireson

    @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.

  20. stefanhahmann commented on Apr 22, 2020

    @stefanhahmann

    Cf. comment from 16.03.2018: #82 (comment)

  21. stefanhahmann commented on Apr 22, 2020

    @stefanhahmann
  22. sfkeller commented on Apr 22, 2020

    @sfkeller

    FYI: The repo of PlazaRoute (Open Source, mentioned above) is still available.

  23. neilireson commented on Apr 22, 2020

    @neilireson

    Awesome, thank you for the reference and code. If I can do anything useful with them I will report back.

  24. sfkeller commented on Apr 22, 2020

    @sfkeller

    @stefanhahmann

    @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?

    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/

  25. fiee commented on Oct 7, 2022

    @fiee

    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?

  26. Vectorial1024 commented on Oct 21, 2025

    @Vectorial1024
    Contributor

    Hi there! I have been redirected to this issue.

    This is a really old but open issue.

    • What kind of OSM paths are we looking at? (I think only highway=pedestrian with area=yes?)
    • What are the progress for using fabricated/autogenerated paths?
    • What are the concerns for that (if exists)?
  27. easbar commented on Oct 21, 2025

    @easbar
    Member

    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

  28. sfkeller commented on Nov 1, 2025

    @sfkeller

    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...

  29. sfkeller commented on Sep 1, 2026

    @sfkeller

    FYI: OSRM and Valhalla now support routing through pedestrian areas (plaza routing).

  30. twassman commented on Sep 16, 2026

    @twassman

    FYI: OSRM and Valhalla now support routing through pedestrian areas (plaza routing).

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions