Class 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 {@link LineString} or {@link Polygon} ring.
The index is constructed in a batch fashion on a given sequence of coordinates. Coordinates can be removed via the {@link #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.
Inherited Members
Namespace: NetTopologySuite.Index
Assembly: NetTopologySuite.dll
Syntax
public class VertexSequencePackedRtree
Constructors
| Improve this Doc View SourceVertexSequencePackedRtree(Coordinate[])
Creates a new tree over the given sequence of coordinates. The sequence should be spatially coherent to provide query performance.
Declaration
public VertexSequencePackedRtree(Coordinate[] pts)
Parameters
Type | Name | Description |
---|---|---|
Coordinate[] | pts | A sequence of points |
Methods
| Improve this Doc View SourceGetBounds()
Declaration
public Envelope[] GetBounds()
Returns
Type | Description |
---|---|
Envelope[] |
Query(Envelope)
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.
Declaration
public int[] Query(Envelope queryEnv)
Parameters
Type | Name | Description |
---|---|---|
Envelope | queryEnv | The query extent |
Returns
Type | Description |
---|---|
Int32[] | An array of the indices of the input coordinates |
RemoveAt(Int32)
Removes the input item at the given index from the spatial index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index the index of the item in the input |
Remarks
This does not change the underlying coordinate array.