|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.commons.index.SpatialIndex<T>
T
- the type returned by the querypublic abstract class SpatialIndex<T>
The SpatialIndex
defines basic methods for the adding, removing and querying of a spatial index.
Constructor Summary | |
---|---|
SpatialIndex()
|
Method Summary | |
---|---|
abstract void |
clear()
Removes all objects from this spatial index. |
abstract boolean |
insert(float[] envelope,
T object)
Add the given object to the spatial index using the given boundingbox |
abstract void |
insertBulk(List<Pair<float[],T>> listOfObjects)
Create the spatial index from the given list of envelope, objects tuples. |
protected boolean |
intersects(float[] box1,
float[] box2,
int maxOffset)
Test if two envelopes intersect, bbox must be defined as float[4]=min[0],min[1];max[0],max[1] |
abstract Collection<T> |
query(float[] envelope)
Query the spatial index with the given envelope and return all objects which intersect with the given boundingbox. |
abstract boolean |
remove(T object)
Removes the given object from this spatial index, using the objects' equals method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpatialIndex()
Method Detail |
---|
public abstract Collection<T> query(float[] envelope)
envelope
- to intersect
public abstract void insertBulk(List<Pair<float[],T>> listOfObjects)
listOfObjects
- to be inserted into the spatial index.public abstract void clear()
public abstract boolean insert(float[] envelope, T object)
envelope
- of the objectobject
- to insert
UnsupportedOperationException
- if the implementation does not support inserting single objectspublic abstract boolean remove(T object)
object
- to be removed
UnsupportedOperationException
- if the implementation does not support removal of objectsprotected boolean intersects(float[] box1, float[] box2, int maxOffset)
box1
- the first envelopebox2
- the second envelopemaxOffset
- the offset within the bbox where the max point starts.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |