Package org.meteoinfo.jts.index.strtree
Class SIRtree
- java.lang.Object
-
- org.meteoinfo.jts.index.strtree.AbstractSTRtree
-
- org.meteoinfo.jts.index.strtree.SIRtree
-
public class SIRtree extends AbstractSTRtree
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.
- See Also:
STRtree, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.meteoinfo.jts.index.strtree.AbstractSTRtree
AbstractSTRtree.IntersectsOp
-
-
Field Summary
-
Fields inherited from class org.meteoinfo.jts.index.strtree.AbstractSTRtree
root
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractNodecreateNode(int level)protected java.util.ComparatorgetComparator()protected AbstractSTRtree.IntersectsOpgetIntersectsOp()voidinsert(double x1, double x2, java.lang.Object item)Inserts an item having the given bounds into the tree.java.util.Listquery(double x)Returns items whose bounds intersect the given value.java.util.Listquery(double x1, double x2)Returns items whose bounds intersect the given bounds.-
Methods inherited from class org.meteoinfo.jts.index.strtree.AbstractSTRtree
boundablesAtLevel, build, compareDoubles, createParentBoundables, depth, depth, getNodeCapacity, getRoot, insert, isEmpty, itemsTree, lastNode, query, query, remove, size, size
-
-
-
-
Method Detail
-
createNode
protected AbstractNode createNode(int level)
- Specified by:
createNodein classAbstractSTRtree
-
insert
public void insert(double x1, double x2, java.lang.Object item)Inserts an item having the given bounds into the tree.
-
query
public java.util.List query(double x)
Returns items whose bounds intersect the given value.
-
query
public java.util.List query(double x1, double x2)Returns items whose bounds intersect the given bounds.- Parameters:
x1- possibly equal to x2
-
getIntersectsOp
protected AbstractSTRtree.IntersectsOp getIntersectsOp()
- Specified by:
getIntersectsOpin classAbstractSTRtree- Returns:
- a test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds.
- See Also:
AbstractSTRtree.IntersectsOp
-
getComparator
protected java.util.Comparator getComparator()
- Specified by:
getComparatorin classAbstractSTRtree
-
-