public interface INeighborhoodPointsCollector extends IProcessUsingTin
Modifier and Type | Method and Description |
---|---|
List<Vertex> |
collectNeighboringVertices(double x,
double y,
int searchDepth,
int targetMinVertexCount)
Gets the points in the neighborhood of a pair of query coordinates.
|
int |
getMaxDepthSearched()
Gets the max depth searched.
|
boolean |
wasTargetExteriorToTin()
Indicates that the most recent target coordinates were
exterior to the TIN.
|
resetForChangeToTin
List<Vertex> collectNeighboringVertices(double x, double y, int searchDepth, int targetMinVertexCount)
By design, the first three points in the result are always the vertices of the triangle that contains the query coordinates. While these vertices are not necessarily ordered by distance, they are guaranteed to be the nearest three vertices to the query point. This requirement is also supported in the special case where the query point lies exactly on the edge of a triangle. In the special case that (x,y) is within the TIN distance tolerance for treating points as non-unique, the matching vertex will be the first vertex in the list.
When the search is performed on the interior of a very large TIN, the number of points found is roughly equivalent to the square of depth of the search. When a search crosses the exterior edge of the TIN , fewer points may be available. The following table indicates the number of points expected in a search. Note that a depth of zero returns the three vertices of the triangle containing the search coordinates
depth count 0 3 1 6 2 11 3 19 4 25 5 38 6 47 7 63 8 78 9 97 10 116The application can also specify a minimum number of vertices to be found. If the minimum value is non-zero, this method will attempt to find at least the number of vertices specified. If it cannot do so by apply the specified search depth, it will extend to search further out from the initial triangle. This process is expensive because in order to extend the search further out, the method must first traverse the part of the TIN already covered.
x
- x coordinate of point of interest for vertex collectiony
- y coordinate of point of interest for vertex collectionsearchDepth
- target depth of traversal for the recursive
transition to neighbor triangles.targetMinVertexCount
- specifies a target value for the minimum
number of vertices to be collected, if available in TIN.int getMaxDepthSearched()
boolean wasTargetExteriorToTin()
Copyright © 2021. All rights reserved.