Package org.locationtech.jts.index
Class VertexSequencePackedRtree
java.lang.Object
org.locationtech.jts.index.VertexSequencePackedRtree
A semi-static spatial index for points which occur
in a spatially-coherent sequence.
In particular, this is suitable for indexing the vertices
of a
or
ring.
invalid reference
LineString
invalid reference
Polygon
The index is constructed in a batch fashion on a given sequence of coordinates.
Coordinates can be removed via the remove(int)
method.
Note that this index queries only the individual points of the input coordinate sequence, not any line segments which might be lie between them.
The input coordinate array is read-only, and is not changed when vertices are removed.
- Author:
- Martin Davis
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new tree over the given sequence of coordinates. -
Method Summary
-
Constructor Details
-
VertexSequencePackedRtree
Creates a new tree over the given sequence of coordinates. The sequence should be spatially coherent to provide query performance.- Parameters:
pts
- a sequence of points
-
-
Method Details
-
getBounds
-
query
Queries the index to find all items which intersect an extent. The query result is a list of the indices of input coordinates which intersect the extent.- Parameters:
queryEnv
- the query extent- Returns:
- an array of the indices of the input coordinates
-
remove
public void remove(int index) Removes the input item at the given index from the spatial index. This does not change the underlying coordinate array.- Parameters:
index
- the index of the item in the input
-