public class QuadTree extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QuadTree.QuadTreeIterator |
Constructor and Description |
---|
QuadTree(Envelope2D extent,
int height)
Creates a QuadTree with the root having the extent of the input
Envelope2D, and height of the input height, where the root starts at height 0.
|
QuadTree(Envelope2D extent,
int height,
boolean bStoreDuplicates)
Creates a QuadTree with the root having the extent of the input Envelope2D, and height of the input height, where the root starts at height 0.
|
Modifier and Type | Method and Description |
---|---|
int |
getContainedSubTreeElementCount(int quadHandle)
Returns the number of elements contained in the subtree rooted at the given quad_handle.
|
Envelope2D |
getDataExtent()
Returns the extent of all elements in the quad tree.
|
int |
getElement(int elementHandle)
Returns the element at the given element_handle.
|
int |
getElementCount()
Returns the number of elements in the QuadTree.
|
Envelope2D |
getElementExtent(int elementHandle)
Returns the element extent at the given element_handle.
|
Envelope2D |
getExtent(int quadHandle)
Returns the extent of the quad at the given quad_handle.
|
int |
getHeight(int quadHandle)
Returns the height of the quad at the given quad_handle.
|
int |
getIntersectionCount(Envelope2D query,
double tolerance,
int maxCount)
Returns the number of elements in the quad tree that intersect the qiven query.
|
QuadTree.QuadTreeIterator |
getIterator()
Gets an iterator on the QuadTree.
|
QuadTree.QuadTreeIterator |
getIterator(boolean bSorted)
Gets an iterator on the QuadTree.
|
QuadTree.QuadTreeIterator |
getIterator(Envelope2D query,
double tolerance)
Gets an iterator on the QuadTree using the input Envelope2D as the
query.
|
QuadTree.QuadTreeIterator |
getIterator(Envelope2D query,
double tolerance,
boolean bSorted)
Gets an iterator on the QuadTree using the input Envelope2D as the query.
|
QuadTree.QuadTreeIterator |
getIterator(Geometry query,
double tolerance)
Gets an iterator on the QuadTree.
|
QuadTree.QuadTreeIterator |
getIterator(Geometry query,
double tolerance,
boolean bSorted)
Gets an iterator on the QuadTree.
|
int |
getMaxHeight()
Returns the max height the quad tree can grow to.
|
int |
getQuad(int elementHandle)
Returns the Quad_handle of the quad containing the given element_handle.
|
Envelope2D |
getQuadTreeExtent()
Returns the extent of the quad tree.
|
int |
getSubTreeElementCount(int quadHandle)
Returns the number of elements in the subtree rooted at the given quad_handle.
|
boolean |
hasData(Envelope2D query,
double tolerance)
Returns true if the quad tree has data intersecting the given query.
|
int |
insert(int element,
Envelope2D boundingBox)
Inserts the element and bounding_box into the QuadTree.
|
int |
insert(int element,
Envelope2D boundingBox,
int hintIndex)
Inserts the element and bounding_box into the QuadTree at the given
quad_handle.
|
void |
removeElement(int elementHandle)
Removes the element and bounding_box at the given element_handle.
|
public QuadTree(Envelope2D extent, int height)
public QuadTree(Envelope2D extent, int height, boolean bStoreDuplicates)
public int insert(int element, Envelope2D boundingBox)
public int insert(int element, Envelope2D boundingBox, int hintIndex)
public void removeElement(int elementHandle)
public int getElement(int elementHandle)
public Envelope2D getElementExtent(int elementHandle)
public Envelope2D getDataExtent()
public Envelope2D getQuadTreeExtent()
public int getSubTreeElementCount(int quadHandle)
public int getContainedSubTreeElementCount(int quadHandle)
public int getIntersectionCount(Envelope2D query, double tolerance, int maxCount)
public boolean hasData(Envelope2D query, double tolerance)
public int getHeight(int quadHandle)
public int getMaxHeight()
public Envelope2D getExtent(int quadHandle)
public int getQuad(int elementHandle)
public int getElementCount()
public QuadTree.QuadTreeIterator getIterator(Geometry query, double tolerance)
public QuadTree.QuadTreeIterator getIterator(Envelope2D query, double tolerance)
public QuadTree.QuadTreeIterator getIterator()
public QuadTree.QuadTreeIterator getIterator(Geometry query, double tolerance, boolean bSorted)
public QuadTree.QuadTreeIterator getIterator(Envelope2D query, double tolerance, boolean bSorted)
public QuadTree.QuadTreeIterator getIterator(boolean bSorted)
Copyright © 2018. All rights reserved.