|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.index.quadtree.QuadTree
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...
Constructor Summary | |
QuadTree(int numShapes,
com.vividsolutions.jts.geom.Envelope maxBounds)
Constructor. |
|
QuadTree(int numShapes,
int maxDepth)
Constructor. |
|
QuadTree(int numShapes,
int maxDepth,
com.vividsolutions.jts.geom.Envelope maxBounds)
Constructor. |
Method Summary | |
void |
close()
Closes this QuadTree after use... |
int |
getMaxDepth()
|
int |
getNumShapes()
|
Node |
getRoot()
|
void |
insert(int recno,
com.vividsolutions.jts.geom.Envelope bounds)
Inserts a shape record id in the quadtree |
java.util.List |
search(com.vividsolutions.jts.geom.Envelope bounds)
|
void |
setMaxDepth(int maxDepth)
|
void |
setNumShapes(int numShapes)
|
void |
setRoot(Node root)
|
boolean |
trim()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QuadTree(int numShapes, com.vividsolutions.jts.geom.Envelope maxBounds)
numShapes
- The total number of shapes to indexmaxBounds
- The bounds of all geometries to be indexedpublic QuadTree(int numShapes, int maxDepth, com.vividsolutions.jts.geom.Envelope maxBounds)
numShapes
- The total number of shapes to indexmaxDepth
- The max depth of the index, must be <= 65535maxBounds
- The bounds of all geometries to be indexedpublic QuadTree(int numShapes, int maxDepth)
numShapes
- The total number of shapes to indexmaxDepth
- The max depth of the index, must be <= 65535Method Detail |
public void insert(int recno, com.vividsolutions.jts.geom.Envelope bounds) throws StoreException
recno
- The record numberbounds
- The bounding box
StoreException
public java.util.List search(com.vividsolutions.jts.geom.Envelope bounds) throws StoreException
bounds
-
StoreException
public void close() throws StoreException
StoreException
public boolean trim() throws StoreException
StoreException
public int getMaxDepth()
public void setMaxDepth(int maxDepth)
maxDepth
- The maxDepth to set.public int getNumShapes()
public void setNumShapes(int numShapes)
numShapes
- The numShapes to set.public Node getRoot()
public void setRoot(Node root)
root
- The root to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |