com.vividsolutions.jts.index.strtree

Class 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.
Version:
1.7
See Also:
STRtree

Nested Class Summary

Nested classes/interfaces inherited from class com.vividsolutions.jts.index.strtree.AbstractSTRtree

AbstractSTRtree.IntersectsOp

Field Summary

Fields inherited from class com.vividsolutions.jts.index.strtree.AbstractSTRtree

root

Constructor Summary

SIRtree()
Constructs an SIRtree with the default node capacity.
SIRtree(int nodeCapacity)
Constructs an SIRtree with the given maximum number of child nodes that a node may have

Method Summary

protected AbstractNode
createNode(int level)
protected Comparator
getComparator()
protected AbstractSTRtree.IntersectsOp
getIntersectsOp()
void
insert(double x1, double x2, Object item)
Inserts an item having the given bounds into the tree.
List
query(double x)
Returns items whose bounds intersect the given value.
List
query(double x1, double x2)
Returns items whose bounds intersect the given bounds.

Methods inherited from class com.vividsolutions.jts.index.strtree.AbstractSTRtree

boundablesAtLevel, build, compareDoubles, createNode, createParentBoundables, depth, depth, getComparator, getIntersectsOp, getNodeCapacity, getRoot, insert, lastNode, query, query, remove, size, size

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

protected AbstractNode createNode(int level)
Overrides:
createNode in interface AbstractSTRtree

getComparator

protected Comparator getComparator()
Overrides:
getComparator in interface AbstractSTRtree

getIntersectsOp

protected AbstractSTRtree.IntersectsOp getIntersectsOp()
Overrides:
getIntersectsOp in interface AbstractSTRtree
Returns:
a test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds.

insert

public void insert(double x1,
                   double x2,
                   Object item)
Inserts an item having the given bounds into the tree.

query

public List query(double x)
Returns items whose bounds intersect the given value.

query

public List query(double x1,
                  double x2)
Returns items whose bounds intersect the given bounds.
Parameters:
x1 - possibly equal to x2