0

I'm designing some Android project that will need to set routes based on several informations. So the user should be enabled to choose how does he want his routes to be calculated, for example by traffic speed, quality of air, ... Now I did take a look at Graphhopper, and I noticed that it is possible to set weights on "streets" like weight of edges in Graphhopper MatrixAPI, but some things made me be confused.

If user enters starting point, and end point, how should app select which streets should it include in matrix calculation?

Also, lets say that my informations (air quality, ...) will be updated dynamicly, how can I update matrix?

Not much about Graphhopper API on StackOverflow.

I will appreciate any kind help.

Karussell
  • 17,085
  • 16
  • 97
  • 197
Mato_Vilac
  • 77
  • 1
  • 8
  • Not sure about your exact problem. You can customize GraphHopper and fill specific edges with your information and use that information while routing. For the closed source Matrix API one can use any customized 'GH core' using the same version. (disclaimer: I'm one of the founders) – Karussell Jan 18 '16 at 21:50
  • Thank you, I managed to figure that out. But now I'm having another problem. Is there any way to get id of edge. I know I can access edge by giving lat,long data, but is there any way to get id of accessed edge? I'm asking because I will have multiple data based on the same edge, and again on multiple edges.Then I will have to calculate that data before setting final speed on that edge, and it would be much simpler to iterate by edge id's in array of accessed edges. Is there any way to work that around? No more characters left to write in this comment, I will example my problem in next one. – Mato_Vilac Jan 22 '16 at 18:47
  • For example , I have multiple users, lets say user "a", and user "b", nodes "x". Users generate data on same edge, I collect them, and periodically calculate collected data and set speed on edge. Now I don't want to set speed user by user, but collect and set avarage of all users on that edge. Let's say collected data looks like this on edge: x-------a-------b---------------------a------------b-------x I hope you will get the point. – Mato_Vilac Jan 22 '16 at 18:53
  • You can get the edgeID via `edgeIteratorBase.getEdge` (get it including the direction via the so called traversal key). For discussion please use our forum: https://discuss.graphhopper.com/ – Karussell Jan 23 '16 at 09:40

0 Answers0