[GraphHopper] Traversing the graph from a GPS location
Peter
graphhopper at gmx.de
Fri Jun 27 10:19:32 UTC 2014
Hey Bram,
the type of the name is not stored (yet), although you can easily extend
an existing encoder and add a EncodedValue to the edge properties and
get it e.g. via encoder.getLong
Regarding your 2nd q: there is no meaning of a 'way' in GraphHopper. But
you could traverse the graph and append only edges with identical,
none-empty names.
('normal' graph traversal is only available if you disable CH, this will
be fixed in the future though). Or, in the import phase, you store the
osm way id in a bidirectional map where one osm id points to all the
created edge ids, but the memory requirements are probably too high for
this.
Regards,
Peter.
> Hello,
>
> I'm trying to traverse the graph from a known position. I would like to
> display the closest edge in a meaningful way (e.g. name or type of way
> if there is no name). Also I would like to make a list of near by
> intersections.
>
> I use graphHopper.getLocationIndex.findClosest.getClosestEdge and this
> gives me an edge. However, it seems there are edges without a name and
> in that case I would like to interrogate the edge to get any meaningful
> information such as the type of way. I looked through the javadocs, but
> I can't find how to do that.
>
> Then for the second question. What is the best method to get all
> intersections (I think the GraphHopper term is tower nodes?) on a
> specific way? As I understand it now, a way might be build up with
> various edges. Any pointers to code examples, docs or GraphHopper
> sources to study are welcome.
>
> Best,
>
> Bram
>
>
More information about the GraphHopper
mailing list