[GraphHopper] Extract a single edge?
Andreas Fischer
fischer.andreas.atf at googlemail.com
Thu Dec 19 07:18:18 UTC 2013
New screenshot:
2013/12/19 Andreas Fischer <fischer.andreas.atf at googlemail.com>
> 1000x Thanks!!!
>
> This solved the problem as you said:
>
> EdgeExplorer ee = graph.createEdgeExplorer(edgeFilter);
> ee.setBaseNode(nodeID);
>
> while(ee.next()){
> resultSet.add(graph.getEdgeProps(ee.getEdge(), ee.getAdjNode()));
> }
>
>
> The only thing is that i still have no street names on all roads. I would
> have checked the OSM ways for a streetname, but in my screenshot you can
> see, that some edges are purple which means that it has a name and doesn't
> has a name at the same time!
>
>
> > what are you trying to solve? I'm not sure I can follow you as this all
> is already implemented in GraphHopper ...
> I simply try to get all edges that are in my direct environment.
>
> > Using the latest version would give you GPS exact results and we make
> sure no other (already solved) problems are involved.
> It is not easy to update to the latest version, since i changed essential
> things to achieve my goals.
>
> Regards,
> Andreas
>
>
> 2013/12/16 Peter K <peathal at yahoo.de>
>
>>
>> > Maybe i understand the problem... Could it be that an edge explorer
>> > only iterates over edges of which the base node is the base node?
>> > Makes sense somehow.
>> > Now is the problem: How can i find an edge to which a given node is
>> > the adjacent node?
>>
>> Not sure if I understand completely. Maybe the problem you are having is
>> that with CH a node is only connected to nodes with a higher level but
>> still you should get all edges. And since you don't want shortcut edges
>> this cannot be the problem. Hmmh.
>>
>> Or maybe the API is unclear? 'base' and 'adjacent' node is dependent of
>> how you traverse the graph, not e.g. if this direction is accessible for
>> car. E.g. if you have a simple graph '1-2-3' and you do
>>
>> iter = explorer.setBaseNode(1)
>> while(iter.next()) {
>> edgeIds.add(iter.getEdge());
>> }
>> => you'll only get one edge id with adjacent node '2'
>>
>> iter = explorer.setBaseNode(2)
>> while(iter.next()) {
>> edgeIds.add(iter.getEdge());
>> }
>> => you'll get two edge ids with adjacent node '1' and '3' where the
>> order is not defined
>>
>> Regards,
>> Peter.
>>
>> _______________________________________________
>> GraphHopper mailing list
>> GraphHopper at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/graphhopper
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20131219/61b90c0e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2013-12-19-08-16-39.png
Type: image/png
Size: 1077262 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20131219/61b90c0e/attachment.png>
More information about the GraphHopper
mailing list