|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 AbstractNodes,
because the STR algorithm operates on both nodes and
data, both of which are treated as Boundables.
STRtree,
SIRtree,
Serialized Form| 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()
Constructs an AbstractSTRtree with the default node capacity. |
|
AbstractSTRtree(int nodeCapacity)
Constructs an AbstractSTRtree with the specified maximum number of child nodes that a node may have |
|
| Method Summary | |
|---|---|
protected 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 static int |
compareDoubles(double a,
double b)
|
protected abstract AbstractNode |
createNode(int level)
|
protected List |
createParentBoundables(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 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(Object bounds,
Object item)
|
boolean |
isEmpty()
Tests whether the index contains any items. |
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(List nodes)
|
protected List |
query(Object searchBounds)
Also builds the tree, if necessary. |
protected void |
query(Object searchBounds,
ItemVisitor visitor)
Also builds the tree, if necessary. |
protected boolean |
remove(Object searchBounds,
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()
public AbstractSTRtree(int nodeCapacity)
nodeCapacity - the maximum number of child nodes in a node| Method Detail |
|---|
public void build()
protected abstract AbstractNode createNode(int level)
protected List createParentBoundables(List childBoundables,
int newLevel)
protected AbstractNode lastNode(List nodes)
protected static int compareDoubles(double a,
double b)
public AbstractNode getRoot()
public int getNodeCapacity()
public boolean isEmpty()
protected int size()
protected int size(AbstractNode node)
protected int depth()
protected int depth(AbstractNode node)
protected void insert(Object bounds,
Object item)
protected List query(Object searchBounds)
protected void query(Object searchBounds,
ItemVisitor visitor)
protected abstract AbstractSTRtree.IntersectsOp getIntersectsOp()
AbstractSTRtree.IntersectsOppublic List itemsTree()
The returned Lists 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(Object searchBounds,
Object item)
protected List boundablesAtLevel(int level)
protected abstract Comparator getComparator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||