GraphHopper.com | Forum | GitHub | Maps | Blog

How to Develop a NodeFilter to find route comprised of nearest node instead of nearest edge


#1

I want to develop a NodeFilter in order to find a route by considering nearest node, instead of nearest edge. Currently, the implemented filter in GraphHopper is EdgeFilter which finds the nearest edge. However, EdgeFilter does not work for some use cases. For example:

i) for buses where the starting point and end point can only be bus stops. If a starting point is set a bit far from the bus stop, the current GraphHopper route navigation provides a route from the starting point instead of from the nearest bus station. This issue is highlighted in here and here, but the proper guidelines to implement are not provided yet.

ii) In ski resorts, ski lifts have also start station and end station. The ski lift cannot stop in middle. However, GraphHopper ignores this fact and assumes that ski lift can stop anywhere, and therefore it provides a route from the start point to end point instead of nearest ski lift station. This issue is highlighted in this here.

The solution proposed by experts is to use NodeFilter instead of EdgeFilter. Currently in GraphHopper, there is only implementation of EdgeFilter. There are no guidelines about how to implement NodeFilter in GraphHopper.
This issue is created for getting the guidelines on implementing a NodeFilter to find a route using nearest node instead of nearest edge.

I am looking forward towards receiving the guidelines on creating a NodeFilter.

Many thanks,
Yasir