AbstractSTRtree class abstract

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 {@link Boundable}s rather than {@link AbstractNode}s, because the STR algorithm operates on both nodes and data, both of which are treated as Boundables.

This class is thread-safe. Building the tree is synchronized, and querying is stateless.

@see STRtree @see SIRtree

@version 1.7

Implementers

Constructors

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

Properties

built bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
itemBoundables List?
Set to null when index is built, to avoid retaining memory.
getter/setter pair
nodeCapacity int
getter/setter pair
root AbstractNode
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

boundablesAtLevel(int level) List
boundablesAtLevelWithNode(int level, AbstractNode top, List boundables) → void
@param level -1 to get items
build() → void
Creates parent nodes, grandparent nodes, and so forth up to the root node, for the data that has been inserted into the tree. Can only be called once, and thus can be called only after all of the data has been inserted into the tree.
createHigherLevels(List boundablesOfALevel, int level) AbstractNode
Creates the levels higher than the given level
createNode(int level) AbstractNode
createParentBoundables(List childBoundables, int newLevel) List
Sorts the childBoundables then divides them into groups of size M, where M is the node capacity.
depth() int
depthWithNode(AbstractNode node) int
getComparator() Comparator
getIntersectsOp() IntersectsOp
@return a test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds. @see IntersectsOp
getNodeCapacity() int
Returns the maximum number of child nodes that a node may have.
getRoot() AbstractNode
Gets the root node of the tree.
insertObj(Object bounds, Object item) → void
isEmpty() bool
Tests whether the index contains any items. This method does not build the index, so items can still be inserted after it has been called.
itemsTree() List
Gets a tree structure (as a nested list) corresponding to the structure of the items and nodes in this tree.
itemsTreeWithNode(AbstractNode node) List?
lastNode(List nodes) AbstractNode
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryInternal(Object searchBounds, AbstractNode node, List matches) → void
queryInternalWithVisitor(Object searchBounds, AbstractNode node, ItemVisitor visitor) → void
queryObj(Object searchBounds) List
Also builds the tree, if necessary.
queryObjWithVisitor(Object searchBounds, ItemVisitor visitor) → void
Also builds the tree, if necessary.
removeItem(AbstractNode node, Object item) bool
removeObj(Object searchBounds, Object item) bool
Removes an item from the tree. (Builds the tree, if necessary.)
removeWithNode(Object searchBounds, AbstractNode node, Object item) bool
size() int
sizeWithNode(AbstractNode node) int
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

DEFAULT_NODE_CAPACITY int
final

Static Methods

compareDoubles(double a, double b) int