Package org.oscim.utils
Class QuadTree<T>
- All Implemented Interfaces:
SpatialIndex<T>
Quad-tree with fixed extents.
This implementation uses int bounding-boxes internally,
so items extents should be greater than 1. FIXME tests this case
-
Nested Class Summary
Nested classes/interfaces inherited from class org.oscim.utils.quadtree.BoxTree
BoxTree.BoxItem<T>, BoxTree.BoxNode<T extends BoxTree.BoxItem<?>>, BoxTree.SearchBoxCb<T extends BoxTree.BoxItem<?>>, BoxTree.SearchNodeCb<E extends BoxTree.BoxNode<?>>, BoxTree.Visitor<T>Nested classes/interfaces inherited from interface org.oscim.utils.SpatialIndex
SpatialIndex.SearchCb<T> -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleansearch(Box bbox, SpatialIndex.SearchCb<T> cb, Object context) searchKNearestNeighbors(Point center, int k, double maxDistance, List<T> results) voidsearchKNearestNeighbors(Point center, int k, double maxDistance, SpatialIndex.SearchCb<T> cb, Object context) Methods inherited from class org.oscim.utils.quadtree.BoxTree
clear, clearToPool, collect, create, create, getNode, insert, remove, removeItem, search, search, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.oscim.utils.SpatialIndex
clear, size
-
Constructor Details
-
QuadTree
public QuadTree(int extents, int maxDepth)
-
-
Method Details
-
insert
- Specified by:
insertin interfaceSpatialIndex<T>
-
remove
- Specified by:
removein interfaceSpatialIndex<T>
-
search
- Specified by:
searchin interfaceSpatialIndex<T>
-
search
- Specified by:
searchin interfaceSpatialIndex<T>
-
searchKNearestNeighbors
- Specified by:
searchKNearestNeighborsin interfaceSpatialIndex<T>
-
searchKNearestNeighbors
public void searchKNearestNeighbors(Point center, int k, double maxDistance, SpatialIndex.SearchCb<T> cb, Object context) - Specified by:
searchKNearestNeighborsin interfaceSpatialIndex<T>
-