Class SIRtree
java.lang.Object
org.locationtech.jts.index.strtree.AbstractSTRtree
org.locationtech.jts.index.strtree.SIRtree
- All Implemented Interfaces:
Serializable
One-dimensional version of an STR-packed R-tree. SIR stands for
"Sort-Interval-Recursive". STR-packed R-trees are described in:
P. Rigaux, Michel Scholl and Agnes Voisard. Spatial Databases With
Application To GIS. Morgan Kaufmann, San Francisco, 2002.
This class is thread-safe. Building the tree is synchronized, and querying is stateless.
- Version:
- 1.7
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.locationtech.jts.index.strtree.AbstractSTRtree
AbstractSTRtree.IntersectsOp
-
Field Summary
FieldsFields inherited from class org.locationtech.jts.index.strtree.AbstractSTRtree
root
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractNode
createNode
(int level) protected Comparator
protected AbstractSTRtree.IntersectsOp
void
Inserts an item having the given bounds into the tree.query
(double x) Returns items whose bounds intersect the given value.query
(double x1, double x2) Returns items whose bounds intersect the given bounds.Methods inherited from class org.locationtech.jts.index.strtree.AbstractSTRtree
boundablesAtLevel, build, compareDoubles, createParentBoundables, depth, depth, getNodeCapacity, getRoot, insert, isEmpty, itemsTree, lastNode, query, query, remove, size, size
-
Field Details
-
comparator
-
intersectsOp
-
-
Constructor Details
-
SIRtree
public SIRtree()Constructs an SIRtree with the default node capacity. -
SIRtree
public SIRtree(int nodeCapacity) Constructs an SIRtree with the given maximum number of child nodes that a node may have
-
-
Method Details
-
createNode
- Specified by:
createNode
in classAbstractSTRtree
-
insert
Inserts an item having the given bounds into the tree. -
query
Returns items whose bounds intersect the given value. -
query
Returns items whose bounds intersect the given bounds.- Parameters:
x1
- possibly equal to x2
-
getIntersectsOp
- Specified by:
getIntersectsOp
in classAbstractSTRtree
- Returns:
- a test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds.
- See Also:
-
getComparator
- Specified by:
getComparator
in classAbstractSTRtree
-