graphhopper / graphhopper

Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.

Home Page:https://www.graphhopper.com/open-source/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graphhopper snaps nodes while ignoring cliffs

Vectorial1024 opened this issue · comments

Describe the bug
Background: currently, Graphhopper does not check many things when snapping nodes (e.g. snap preventions). It basically snaps to the closest valid node in the map.

Implication; for example, Graphhopper ignores cliffs when snapping nodes, as shown below.

To Reproduce

Consider this: (use the OSM layer to show the cliff lines)

https://graphhopper.com/maps/?point=22.290543%2C114.195096&point=22.286237%2C114.196213&profile=car&layer=OpenStreetMap

image

The end point is a school located in the middle of the hillside, enclosed by a few cliff lines.

image

Currently, Graphhopper suggests to drive the car to a Euclideanly-nearby residential building, which unfortunately is impractical IRL because the residential building is "1 cliff up"; a cliff stands between our car destination and our actual destination intended to be reached by what I call "obvious walking".

Mapping information should be quite complete because there should not be that many roads inside the school.

Expected behavior
According to IRL, the node-snapping should be snapped to the school's access road:

image

As long as Graphhopper can correctly snap to the school's access road, the driving directions should then become correct.

I don't see this as a routing problem and this should be solved on the geocoding side and it should return the entrance instead of the center of the building.