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

org.deegree.io.quadtree
Class MemPointNode

java.lang.Object
  extended by org.deegree.io.quadtree.MemPointNode
All Implemented Interfaces:
Node

public class MemPointNode
extends Object
implements Node

MemPointNode is the node class of a memory based implementation of a quadtree.

Since:
2.0
Version:
2.0, $Revision: 7845 $, $Date: 2007-07-25 09:45:35 +0200 (Mi, 25 Jul 2007) $
Author:
Andreas Schmitz, last edited by: $Author: apoth $

Constructor Summary
MemPointNode(Quadtree owner, Envelope env, int lvl)
          Constructs a new node with the given envelope, object, location and level.
 
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 getEnvelope()
           
 String getId()
          This method does not make sense for the memory implementation.
 void insert(Object item, Envelope itemEnv)
          Inserts the item into the quadtree.
 List<Object> query(Envelope searchEnv, List<Object> visitor, int level)
          Searches for all items intersecting the search envelope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemPointNode

public MemPointNode(Quadtree owner,
                    Envelope env,
                    int lvl)
Constructs a new node with the given envelope, object, location and level.

Parameters:
owner -
env - the envelope
lvl - the level
Method Detail

getDepth

public int getDepth()
Returns:
the deepest level of this subtree

getEnvelope

public Envelope getEnvelope()
Returns:
the region of this node

getId

public String getId()
This method does not make sense for the memory implementation.

Specified by:
getId in interface Node
Returns:
null

insert

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

Specified by:
insert in interface Node
Parameters:
item - the item
itemEnv - the envelope of the item
Throws:
IndexException

query

public List<Object> query(Envelope searchEnv,
                          List<Object> visitor,
                          int level)
                   throws IndexException
Searches for all items intersecting the search envelope.

Specified by:
query in interface Node
Parameters:
searchEnv - the search envelope
visitor - the resulting list
level - unused by this implementation
Returns:
a list with all found items
Throws:
IndexException

deleteItem

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

Specified by:
deleteItem in interface Node
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 Node
Parameters:
envelope -
See Also:
)

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