[GraphHopper] Creating QueryResult from node?
Peter
graphhopper at gmx.de
Wed Aug 6 08:03:24 UTC 2014
Of course, you could create a stub QueryResult fill with lat,lon and the
closest node you like. You'll have to make sure that wayIndex=0 and edge
position is TOWER
like
res.setClosestNode(edge.getBaseNode());
res.setClosestEdge(edge);
res.setWayIndex(0);
res.setSnappedPosition(QueryResult.Position.TOWER);
res.calcSnappedPoint(distCalc);
On 06.08.2014 09:53, Jan Torben Heuer wrote:
> Am 06.08.2014 um 09:33 schrieb Peter <graphhopper at gmx.de>:
>
>> Hey Jan,
>>
>> for what purpose do you need a QueryResult of a tower node? Another query?
> Yes.
>
>> Then it would be indeed more efficient if you do
>> algo.calcPath(fromEdgeState.getAdjNode/getBaseNode,
>> toIter.EdgeState.getAdj/BaseNode)
> Can I also create a QueryNode from it? It would better fit to my existing method signatures where I use QueryResult for all via locations.
>
> Jan
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper
More information about the GraphHopper
mailing list