Hi, I want to use graph hopper java library.
Just want to know how:
Does graph hopper java library calculates travel time(given it is not updated with traffic etc.)…how correct these times are
How can I extend graph hopper core library to use my implementation for returning times
Instead of extending, can I tell graph hopper java lib to say, for this edge, use this transit time at this time of day
Basically, updating time estimation for all the edges in the graph by time of day
@karussell, probably I didn’t put the question correctly.
I am using the graph hopper java library only.
My question is for java library. I have updated the question. Please check.
Yes it does. Just run the demo locally and try if you think the times are correct for your area. The directions API has improved ETAs, meaning they are already quite close to the time it would actually take you for the route.
Because you asked: “How can I extend graph hopper core library to use my implementation for returning times”. Changing the weighting is one answer.
You can also change the speed of edges, which will lead to a different time calculation in the Weighting.
The OpenSource version of GraphHopper does not include live traffic data or a plug&play interface to enable this. Also see this question (which was also posted by you).
If I use custom data sources for live traffic and/or history based traffic estimates and use them with graph hopper as mentioned in this blog , how do I take care of:
storing mapping of edge to custom speed (e.g. storing edge id to custom speed)
taking care of OSM Data upgrades, because edge id’s etc. could change since edges can be added/deleted or splitted in new OSM data
How can I take care of saying that speed is not low for the whole section but only for a small portion of the section
As mentioned before, there is no ready made solution. You could have a look at this repo, create your own speed value in the FlagEncoder, use the existing speed values, or create a custom weighting.