deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.io.quadtree
Class MemPointQuadtree

java.lang.Object
  extended by org.deegree.io.quadtree.MemPointQuadtree
All Implemented Interfaces:
Quadtree

public class MemPointQuadtree
extends Object
implements Quadtree

MemPointQuadtree is a memory based quadtree implementation for points.

Since:
2.0
Version:
2.0, $Revision: 6812 $, $Date: 2007-05-04 15:35:27 +0200 (Fr, 04 Mai 2007) $
Author:
Andreas Schmitz, last edited by: $Author: apoth $

Field Summary
(package private)  int maxDepth
           
 
Constructor Summary
MemPointQuadtree(Envelope region)
          Creates a new instance with the specified region.
MemPointQuadtree(Envelope region, double accuracyX, double accuracyY)
          Creates a new instance with the specified region.
 
Method Summary
 void deleteItem(Object item)
          Deletes the item from the quadtree.
 void deleteRange(Envelope envelope)
          Deletes all items intersecting the envelope.
 int getDepth()
           
 Envelope getRootBoundingBox()
          returns the bounding box covered by the quadtrees root node
 void insert(Object item, Envelope envelope)
          Inserts the item with the envelope into the quadtree.
 void insert(Object item, Point point)
          Inserts the item with the given point as envelope.
 List query(Envelope envelope)
          Searches for all items intersecting with the envelope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxDepth

int maxDepth
Constructor Detail

MemPointQuadtree

public MemPointQuadtree(Envelope region)
Creates a new instance with the specified region. This envelope cannot be changed.

Parameters:
region -

MemPointQuadtree

public MemPointQuadtree(Envelope region,
                        double accuracyX,
                        double accuracyY)
Creates a new instance with the specified region. This envelope cannot be changed.

Parameters:
region -
accuracyX -
accuracyY -
Method Detail

insert

public void insert(Object item,
                   Envelope envelope)
            throws IndexException
Inserts the item with the envelope into the quadtree.

Specified by:
insert in interface Quadtree
Parameters:
item -
envelope -
Throws:
IndexException

insert

public void insert(Object item,
                   Point point)
            throws IndexException
Inserts the item with the given point as envelope.

Specified by:
insert in interface Quadtree
Parameters:
item -
point -
Throws:
IndexException

query

public List query(Envelope envelope)
           throws IndexException
Searches for all items intersecting with the envelope.

Specified by:
query in interface Quadtree
Parameters:
envelope -
Returns:
a list with the resulting items
Throws:
IndexException

deleteItem

public void deleteItem(Object item)
Deletes the item from the quadtree. Untested method!

Specified by:
deleteItem in interface Quadtree
Parameters:
item - the item to be deleted

deleteRange

public void deleteRange(Envelope envelope)
Deletes all items intersecting the envelope. Untested method!

Specified by:
deleteRange in interface Quadtree
Parameters:
envelope -
See Also:
)

getDepth

public int getDepth()
Specified by:
getDepth in interface Quadtree
Returns:
the deepest level of this subtree

getRootBoundingBox

public Envelope getRootBoundingBox()
                            throws IndexException
Description copied from interface: Quadtree
returns the bounding box covered by the quadtrees root node

Specified by:
getRootBoundingBox in interface Quadtree
Returns:
the root bounding box
Throws:
IndexException

deegree 2.1 (2007/11/08 09:57 build-328-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net