In the above defined way (ski lift), there are two nodes which are situated at the start of the lift (starting lift station) and at the end of the lift (end lift station). The ski lift does not stop in between.
The problem is that as shown in this FIGURE, when I try to get a route from one point on the way (at some distance after the start of way) to another point on the way (at some distance before the end of way), the GraphHopper gives the route exactly from starting point to the ending point. But it is not realistic in the case of ski lift because the lift does not stop anywhere except starting and ending points.
What I want is that GraphHopper should give a route from start of the way (starting point of ski lift) to end of the way (ending point of ski lift) and the users should cover the remaining distance by themselves.
In short, I want to declare a non-stop way. How can I achieve this declaration of non-stop way in GraphHopper?
Thank you but this topic seems different than what I want to do.
In my case, the GraphHopper is selecting the correct way (ski lift), but I want that instead of providing the route from starting point to ending point, the GraphHopper should provide a route from start of the way (starting node) to end of the way (ending node). Then the user should walk to the starting node and ending node by himself/herself.
As show in this figure, the GraphHopper is providing a route from point B to C. But I want that GraphHopper should provide a route from point A to D.
Here is the scenario which I want to achieve: The user should first walk from point B to A. Then it should follow the suggested route by GraphHopper and go from point A to D. Then finally, he/she should walk again from point D to B to reach its desired place.
Thank you Robin for your response and help. I was trying to do as you mentioned but it seems that I am a bit lost.
Can you please inform me more about a specific direction that where and how can I find and change “ViaPointRoutingTemplate” and “LocationIndex”? as well as virtual edges issues?
Can you please inform me that why GraphHopper picks in-between location (non nodes) on a way (i.e., points ‘B’ and ‘C’ in this figure), instead of selecting location which are nodes on a way (i.e., points ‘A’ and ‘D’ in this figure) while recommending a route?
sorry as I said, I never did this. I recommend debugging into either the com.graphhopper.routing.template.ViaRoutingTemplate#lookup and #calcPaths and com.graphhopper.storage.index.LocationIndexTree#findClosest. As I said, I would try to use base and adjacent nodes.
I cannot open your images, please upload them here in the forum, but this sounds like VirtualEdges.
Please see my answers above. GraphHopper usually doesn’t work like this, so you have to build this, it’s not a small config file change.
Many thanks Robin for your response and informing me ViaRoutingTemplate, calcPaths and findClosest. I am now currently exploring them and tyring to change them.
In fact, the most relevant use case related to my scneario is “bus” where we have bus stations and a person must need to go to the nearest bus stop in order to get the bus.
I found a topic of developing a BusFlagEncoder here:
I followed it but could not catch it well. Do you have any idea about it?
Thank you for your directing me.
I was trying to understand EdgeFilter, LocationIndex, EdgeExplorer and how closestMatch is performing but I am unable to understand them properly.
Is there any documentation or something from where I can understand these things (e.g., EdgeFilter, LocationIndex, EdgeExplorere and closestMatch)? so that I can start developing a new NodeFilter?
For creating a NodeFilter, can you please list what should be the required steps to create it? Atleast these steps will give me a direction to go towards, and I will then try to implement NodeFilter in GH.
Please have a look at the official documentation and at the interfaces each of these classes implement (usually the interface contains quite some documentation). If you find classes that miss documentation, where it would be required, please feel free to create a PR adding documentation :).
Mhm, I never did this, so I cannot give you any details here. I would probably look at how the EdgeFilter is used and try to create something similar for Nodes. If possible I would try to create a common interface for both (not sure if this is possible, it might not be possible). I would debug trough the code, look what happens.
Many thanks for your response and providing the documentations link and a starting point of investigation of EdgeFIlter for developing NodeFilter.
Many thanks to you also for debugging the code and looking into this matter.
Perfect, I will create a new topic if any documentation is missing, as well as I am also going to create a new topic for creating NodeFilter.