public class QueryResult extends Object
X=query coordinates S=snapped coordinates: "snapping" real coords to road N=tower or pillar node T=closest tower node XS=distance X | T--S----N
Modifier and Type | Class and Description |
---|---|
static class |
QueryResult.Position
Whether the query point is projected onto a tower node, pillar node or somewhere within
the closest edge.
|
Modifier and Type | Field and Description |
---|---|
static int |
INVALID_NODE |
Constructor and Description |
---|
QueryResult(double queryLat,
double queryLon) |
Modifier and Type | Method and Description |
---|---|
void |
calcSnappedPoint(DistanceCalc distCalc)
Calculates the closet point on the edge from the query point.
|
EdgeIteratorState |
getClosestEdge() |
int |
getClosestNode()
Returns the closest matching node.
|
double |
getQueryDistance() |
GHPoint |
getQueryPoint() |
GHPoint3D |
getSnappedPoint()
Calculates the position of the query point 'snapped' to a close road segment or node.
|
QueryResult.Position |
getSnappedPosition() |
int |
getWayIndex()
References to a tower node or the index of wayGeometry of the closest edge.
|
boolean |
isValid() |
void |
setClosestEdge(EdgeIteratorState detach) |
void |
setClosestNode(int node) |
void |
setQueryDistance(double dist) |
void |
setSnappedPosition(QueryResult.Position pos) |
void |
setWayIndex(int wayIndex) |
String |
toString() |
public static final int INVALID_NODE
public int getClosestNode()
QueryGraph.create(Graph, List)
).INVALID_NODE
if nothing found, this should be avoided via a call of 'isValid'public void setClosestNode(int node)
public double getQueryDistance()
public void setQueryDistance(double dist)
public int getWayIndex()
public void setWayIndex(int wayIndex)
public QueryResult.Position getSnappedPosition()
public void setSnappedPosition(QueryResult.Position pos)
public boolean isValid()
public EdgeIteratorState getClosestEdge()
public void setClosestEdge(EdgeIteratorState detach)
public GHPoint getQueryPoint()
public GHPoint3D getSnappedPoint()
public void calcSnappedPoint(DistanceCalc distCalc)
Copyright © 2012–2020. All rights reserved.