class STRtree extends AbstractSTRtree with SpatialIndex[Any] with Serializable
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- STRtree
- SpatialIndex
- AbstractSTRtree
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def boundablesAtLevel(level: Int): ArrayList[Boundable]
- Attributes
- protected
- Definition Classes
- AbstractSTRtree
- def build(): Unit
Creates parent nodes, grandparent nodes, and so forth up to the root node, for the data that has been inserted into the tree.
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.
- Definition Classes
- AbstractSTRtree
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createNode(level: Int): STRtreeNode
- Attributes
- protected
- Definition Classes
- STRtree → AbstractSTRtree
- def createParentBoundables(childBoundables: List[Boundable], newLevel: Int): ArrayList[AbstractNode]
Creates the parent level for the given child level.
Creates the parent level for the given child level. First, orders the items by the x-values of the midpoints, and groups them into vertical slices. For each slice, orders the items by the y-values of the midpoints, and group them into runs of size M (the node capacity). For each run, creates a new (parent) node.
- Attributes
- protected
- Definition Classes
- STRtree → AbstractSTRtree
- def createParentBoundablesFromVerticalSlice(childBoundables: List[Boundable], newLevel: Int): ArrayList[AbstractNode]
- Attributes
- protected
- def depth: Int
- Definition Classes
- STRtree → AbstractSTRtree
- def depth(node: AbstractNode): Int
- Attributes
- protected
- Definition Classes
- AbstractSTRtree
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getComparator: Comparator[Boundable]
- Attributes
- protected
- Definition Classes
- STRtree → AbstractSTRtree
- def getIntersectsOp: IntersectsOp
return a test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds.
return a test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds.
- Attributes
- protected
- Definition Classes
- STRtree → AbstractSTRtree
- See also
IntersectsOp
- def getNodeCapacity: Int
Returns the maximum number of child nodes that a node may have.
Returns the maximum number of child nodes that a node may have.
return the node capacity
- Definition Classes
- AbstractSTRtree
- def getRoot: AbstractNode
Gets the root node of the tree.
Gets the root node of the tree.
return the root node
- Definition Classes
- AbstractSTRtree
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def insert(itemEnv: Envelope, item: Any): Unit
Inserts an item having the given bounds into the tree.
Inserts an item having the given bounds into the tree.
- Definition Classes
- STRtree → SpatialIndex
- def insert(bounds: AnyRef, item: Any): Boolean
- Attributes
- protected
- Definition Classes
- AbstractSTRtree
- def isEmpty: Boolean
Tests whether the index contains any items.
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.
return true if the index does not contain any items
- Definition Classes
- AbstractSTRtree
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isWithinDistance(tree: STRtree, itemDist: ItemDistance, maxDistance: Double): Boolean
Tests whether some two items from this tree and another tree lie within a given distance.
Tests whether some two items from this tree and another tree lie within a given distance. {link ItemDistance} is used as the distance metric. A Branch-and-Bound tree traversal algorithm is used to provide an efficient search.
- tree
another tree
- itemDist
a distance metric applicable to the items in the trees
- maxDistance
the distance limit for the search return true if there are items within the distance
- def itemsTree: List[Any]
Gets a tree structure (as a nested list) corresponding to the structure of the items and nodes in this tree.
Gets a tree structure (as a nested list) corresponding to the structure of the items and nodes in this tree.
The returned {link List}s contain either {link 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.
return a List of items and/or Lists
- Definition Classes
- AbstractSTRtree
- def lastNode(nodes: List[AbstractNode]): AbstractNode
- Attributes
- protected
- Definition Classes
- AbstractSTRtree
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nearestNeighbour(env: Envelope, item: Any, itemDist: ItemDistance, k: Int): Array[Any]
Finds k items in this tree which are the top k nearest neighbors to the given
item, usingitemDistas the distance metric.Finds k items in this tree which are the top k nearest neighbors to the given
item, usingitemDistas the distance metric. A Branch-and-Bound tree traversal algorithm is used to provide an efficient search. This method implements the KNN algorithm described in the following paper:Roussopoulos, Nick, Stephen Kelley, and Frédéric Vincent. "Nearest neighbor queries." ACM sigmod record. Vol. 24. No. 2. ACM, 1995.
The query
itemdoes not have to be contained in the tree, but it does have to be compatible with theitemDistdistance metric.- env
the envelope of the query item
- item
the item to find the nearest neighbour of
- itemDist
a distance metric applicable to the items in this tree and the query item
- k
the K nearest items in kNearestNeighbour return the K nearest items in this tree
- def nearestNeighbour(tree: STRtree, itemDist: ItemDistance): Array[Any]
Finds the two nearest items from this tree and another tree, using {link ItemDistance} as the distance metric.
Finds the two nearest items from this tree and another tree, using {link ItemDistance} as the distance metric. A Branch-and-Bound tree traversal algorithm is used to provide an efficient search. The result value is a pair of items, the first from this tree and the second from the argument tree.
- tree
another tree
- itemDist
a distance metric applicable to the items in the trees return the pair of the nearest items, one from each tree or
nullif no pair of distinct items can be found
- def nearestNeighbour(env: Envelope, item: Any, itemDist: ItemDistance): Any
Finds the item in this tree which is nearest to the given {link Object}, using {link ItemDistance} as the distance metric.
Finds the item in this tree which is nearest to the given {link Object}, using {link ItemDistance} as the distance metric. A Branch-and-Bound tree traversal algorithm is used to provide an efficient search.
The query object does not have to be contained in the tree, but it does have to be compatible with the itemDist distance metric.
- env
the envelope of the query item
- item
the item to find the nearest neighbour of
- itemDist
a distance metric applicable to the items in this tree and the query item return the nearest item in this tree or
nullif the tree is empty
- def nearestNeighbour(itemDist: ItemDistance): Array[Any]
Finds the two nearest items in the tree, using {link ItemDistance} as the distance metric.
Finds the two nearest items in the tree, using {link ItemDistance} as the distance metric. A Branch-and-Bound tree traversal algorithm is used to provide an efficient search.
If the tree is empty, the return value is
null If it is required to find only pairs of distinct items, the {link ItemDistance} function must be anti-reflexive.- itemDist
a distance metric applicable to the items in this tree return the pair of the nearest items or
nullif the tree is empty
- var nodeCapacity: Int
- Definition Classes
- AbstractSTRtree
- val nodeCapacityArg: Int
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def query(searchEnv: Envelope, visitor: ItemVisitor): Unit
Queries the index for all items whose extents intersect the given search {link Envelope}, and applies an {link ItemVisitor} to them.
Queries the index for all items whose extents intersect the given search {link Envelope}, and applies an {link ItemVisitor} to them. Note that some kinds of indexes may also return objects which do not in fact intersect the query envelope.
- searchEnv
the envelope to query for
- visitor
a visitor object to apply to the items found
- Definition Classes
- STRtree → SpatialIndex
- def query(searchEnv: Envelope): List[Any]
Returns items whose bounds intersect the given envelope.
Returns items whose bounds intersect the given envelope.
- searchEnv
the envelope to query for return a list of the items found by the query
- Definition Classes
- STRtree → SpatialIndex
- def query(searchBounds: Any, visitor: ItemVisitor): Unit
- Attributes
- protected
- Definition Classes
- AbstractSTRtree
- def query(searchBounds: Any): List[Any]
Also builds the tree, if necessary.
Also builds the tree, if necessary.
- Attributes
- protected
- Definition Classes
- AbstractSTRtree
- def remove(itemEnv: Envelope, item: Any): Unit
Removes a single item from the tree.
Removes a single item from the tree.
- itemEnv
the Envelope of the item to remove
- item
the item to remove return
trueif the item was found
- Definition Classes
- STRtree → SpatialIndex
- def remove(searchBounds: Any, item: Any): Boolean
Removes an item from the tree.
Removes an item from the tree. (Builds the tree, if necessary.)
- Attributes
- protected
- Definition Classes
- AbstractSTRtree
- var root: AbstractNode
- Attributes
- protected
- Definition Classes
- AbstractSTRtree
- def size: Int
Returns the number of items in the tree.
Returns the number of items in the tree.
return the number of items in the tree
- Definition Classes
- STRtree → AbstractSTRtree
- def size(node: AbstractNode): Int
- Attributes
- protected
- Definition Classes
- AbstractSTRtree
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def verticalSlices(childBoundables: List[Boundable], sliceCount: Int): Array[List[Boundable]]
- childBoundables
Must be sorted by the x-value of the envelope midpoints
- Attributes
- protected
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()