| java.lang.Object org.geotools.index.quadtree.QuadTree
QuadTree | public class QuadTree (Code) | | Java porting of mapserver quadtree implementation.
Note that this implementation is not thread safe, so don't share the
same instance across two or more threads.
TODO: example of typical use...
author: Tommaso Nolli |
Constructor Summary | |
public | QuadTree(int numShapes, Envelope maxBounds, IndexFile file) Constructor. | public | QuadTree(int numShapes, int maxDepth, Envelope maxBounds, IndexFile file) Constructor. | public | QuadTree(int numShapes, int maxDepth, IndexFile file) Constructor. |
QuadTree | public QuadTree(int numShapes, Envelope maxBounds, IndexFile file)(Code) | | Constructor.
The maxDepth will be calculated.
Parameters: numShapes - The total number of shapes to index Parameters: maxBounds - The bounds of all geometries to be indexed |
QuadTree | public QuadTree(int numShapes, int maxDepth, Envelope maxBounds, IndexFile file)(Code) | | Constructor.
Parameters: numShapes - The total number of shapes to index Parameters: maxDepth - The max depth of the index, must be <= 65535 Parameters: maxBounds - The bounds of all geometries to be indexed |
QuadTree | public QuadTree(int numShapes, int maxDepth, IndexFile file)(Code) | | Constructor.
WARNING: using this constructor, you have to manually set the root
Parameters: numShapes - The total number of shapes to index Parameters: maxDepth - The max depth of the index, must be <= 65535 |
getMaxDepth | public int getMaxDepth()(Code) | | Returns the maxDepth. |
getNumShapes | public int getNumShapes()(Code) | | Returns the numShapes. |
getRoot | public Node getRoot()(Code) | | Returns the root. |
insert | public void insert(int recno, Envelope bounds) throws StoreException(Code) | | Inserts a shape record id in the quadtree
Parameters: recno - The record number Parameters: bounds - The bounding box |
setMaxDepth | public void setMaxDepth(int maxDepth)(Code) | | Parameters: maxDepth - The maxDepth to set. |
setNumShapes | public void setNumShapes(int numShapes)(Code) | | Parameters: numShapes - The numShapes to set. |
setRoot | public void setRoot(Node root)(Code) | | Parameters: root - The root to set. |
|
|