[GraphHopper] Graphhopper using dijkstra's algo directly with graph

Peter K peathal at yahoo.de
Thu May 9 10:49:15 UTC 2013


[forwarded to mailing list]

Hi Zongjie,

have a look into the low level API:
https://github.com/graphhopper/graphhopper/wiki/Low-Level-API

and the relative efficient one-to-many dijkstra:
https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/routing/DijkstraOneToMany.java
where the distance limit is already implemented ('limit')

In the near future one will be able to search for points of interests in
a certain radius, which will be probably similar to what you want.

Regards,
Peter.

> Hi Peter,
>  
> I have been using your graphhopper api for my final year project and
> it has been great! However, I need to make some changes to my project
> which I would like to request for your help.
>  
> I know that graphhopper is providing routing capabilities through
> reading of the graph of a map and using the various algorithms to
> return an array of geopoints of the calculated path.
>  
> What I would need your help on is may I know if i can directly access
> the graph and apply the dijkstra's algorithm on it? Because what I
> actually need is geopoints that are of a certain distance away from
> the current location.
>  
> For example: I am at point A, and I request for the road distance of
> 5KM away from point A.
>  
> I was thinking that by using the dijkstra's algo I would be able to
> traverse through the nodes of the graph till I find all the 5KM nodes
> that are away from the current location's node.
>
> Currently I am using your graphhopper API to get the distance and
> geopoints that are of fixed angles from the current location. Let's
> say 0 degrees, 90 degrees, 180 degrees and 270 degrees. So I will get
> 4 routes using your API which I will then access the individual route
> to find the 5KM geopoints I required to get my 5KM points away from
> the current location.
>  
> Is there any way I can use your dijkstra's algo and access the graph
> directly which then can provide me with the distance and geopoints of
> each node it traversed using the algo. I believe with this, I would be
> able to get all the geopoints that are of certain distance away from
> the current location more effectively and efficiently!
>  
> Thank you for taking your time to read this and I hope to receive your
> kind response soon!
>  
> Best Regards,
> Zongjie Ng





More information about the GraphHopper mailing list