|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectQuadTree
public class 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...
modules/plugin/shapefile (gt-shapefile.jar)
Constructor Summary | |
---|---|
QuadTree(int numShapes,
Envelope maxBounds,
IndexFile file)
Constructor. |
|
QuadTree(int numShapes,
int maxDepth,
Envelope maxBounds,
IndexFile file)
Constructor. |
|
QuadTree(int numShapes,
int maxDepth,
IndexFile file)
Constructor. |
Method Summary | |
---|---|
void |
close()
|
void |
close(Iterator iter)
Closes this QuadTree after use... |
IndexFile |
getIndexfile()
|
int |
getMaxDepth()
|
int |
getNumShapes()
|
Node |
getRoot()
|
void |
insert(int recno,
Envelope bounds)
Inserts a shape record id in the quadtree |
void |
registerIterator(Iterator object)
|
CloseableCollection<Data> |
search(Envelope bounds)
|
void |
setMaxDepth(int maxDepth)
|
void |
setNumShapes(int numShapes)
|
void |
setRoot(Node root)
|
boolean |
trim()
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuadTree(int numShapes, Envelope maxBounds, IndexFile file)
numShapes
- The total number of shapes to indexmaxBounds
- The bounds of all geometries to be indexedpublic QuadTree(int numShapes, int maxDepth, Envelope maxBounds, IndexFile file)
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, IndexFile file)
numShapes
- The total number of shapes to indexmaxDepth
- The max depth of the index, must be <= 65535Method Detail |
---|
public void insert(int recno, Envelope bounds) throws StoreException
recno
- The record numberbounds
- The bounding box
StoreException
public CloseableCollection<Data> search(Envelope bounds) throws StoreException
bounds
-
StoreException
public void close(Iterator iter) 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.public void close() throws StoreException
StoreException
public void registerIterator(Iterator object)
public IndexFile getIndexfile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |