|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vividsolutions.jts.index.strtree.AbstractSTRtree
public abstract class AbstractSTRtree
Base class for STRtree and SIRtree. 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 implementation is based on Boundables rather than just AbstractNodes, because the STR algorithm operates on both nodes and data, both of which are treated here as Boundables.
STRtree
,
SIRtree
Nested Class Summary | |
---|---|
protected static interface |
AbstractSTRtree.IntersectsOp
A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds. |
Field Summary | |
---|---|
protected AbstractNode |
root
|
Constructor Summary | |
---|---|
AbstractSTRtree(int nodeCapacity)
Constructs an AbstractSTRtree with the specified maximum number of child nodes that a node may have |
Method Summary | |
---|---|
protected java.util.List |
boundablesAtLevel(int level)
|
void |
build()
Creates parent nodes, grandparent nodes, and so forth up to the root node, for the data that has been inserted into the tree. |
protected int |
compareDoubles(double a,
double b)
|
protected abstract AbstractNode |
createNode(int level)
|
protected java.util.List |
createParentBoundables(java.util.List childBoundables,
int newLevel)
Sorts the childBoundables then divides them into groups of size M, where M is the node capacity. |
protected int |
depth()
|
protected int |
depth(AbstractNode node)
|
protected abstract java.util.Comparator |
getComparator()
|
protected abstract AbstractSTRtree.IntersectsOp |
getIntersectsOp()
|
int |
getNodeCapacity()
Returns the maximum number of child nodes that a node may have |
AbstractNode |
getRoot()
|
protected void |
insert(java.lang.Object bounds,
java.lang.Object item)
|
java.util.List |
itemsTree()
Gets a tree structure (as a nested list) corresponding to the structure of the items and nodes in this tree. |
protected AbstractNode |
lastNode(java.util.List nodes)
|
protected java.util.List |
query(java.lang.Object searchBounds)
Also builds the tree, if necessary. |
protected void |
query(java.lang.Object searchBounds,
ItemVisitor visitor)
Also builds the tree, if necessary. |
protected boolean |
remove(java.lang.Object searchBounds,
java.lang.Object item)
Removes an item from the tree. |
protected int |
size()
|
protected int |
size(AbstractNode node)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AbstractNode root
Constructor Detail |
---|
public AbstractSTRtree(int nodeCapacity)
Method Detail |
---|
public void build()
protected abstract AbstractNode createNode(int level)
protected java.util.List createParentBoundables(java.util.List childBoundables, int newLevel)
protected AbstractNode lastNode(java.util.List nodes)
protected int compareDoubles(double a, double b)
public AbstractNode getRoot()
public int getNodeCapacity()
protected int size()
protected int size(AbstractNode node)
protected int depth()
protected int depth(AbstractNode node)
protected void insert(java.lang.Object bounds, java.lang.Object item)
protected java.util.List query(java.lang.Object searchBounds)
protected void query(java.lang.Object searchBounds, ItemVisitor visitor)
protected abstract AbstractSTRtree.IntersectsOp getIntersectsOp()
AbstractSTRtree.IntersectsOp
public java.util.List itemsTree()
The returned List
s contain either Object
items,
or Lists which correspond to subtrees of the tree
Subtrees which do not contain any items are not included.
Builds the tree if necessary.
protected boolean remove(java.lang.Object searchBounds, java.lang.Object item)
protected java.util.List boundablesAtLevel(int level)
protected abstract java.util.Comparator getComparator()
|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |