V - The type of elements in the set. Any subclass of NFEGeoObjectpublic class RTreeIndexedSpatialSet<V extends NFEGeoObject> extends java.lang.Object implements IndexedSpatialSet<V>
| Constructor and Description |
|---|
RTreeIndexedSpatialSet() |
RTreeIndexedSpatialSet(int[] expectedGeometryTypes)
Creates an instance of RTreeIndexedSpatialSet
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(V geoObj) |
boolean |
addAll(java.util.Collection<? extends V> geoObjects) |
void |
clear() |
boolean |
contains(java.lang.Object obj) |
boolean |
containsAll(java.util.Collection<?> geoObjects) |
V |
get(java.lang.Object key)
Gets the object identified by the given key
|
V |
get(java.awt.geom.Point2D point, double tolerance)
Gets the element which is closer to the given point but within the tolerance.
|
java.util.Collection<V> |
getAll(java.awt.geom.Point2D point, double tolerance)
Gets all the elements which distance to the given point is within the tolerance
|
java.util.Collection<V> |
getAnyInteract(java.awt.geom.Area area)
Gets all the elements interacting in some way with the given area
|
java.util.Collection<V> |
getAnyInteract(java.awt.geom.Rectangle2D mbr)
Gets all the elements interacting in some way with the given rectangle
|
AbstractSpatialIndex |
getSpatialindex()
Gets the underlying implementation used to perform spatial-indexing
|
boolean |
isEmpty() |
boolean |
isGeometryTypeExpected(int geometryType)
Tells whether the set is expecting the specified geometry type (from JGeometry).
|
java.util.Iterator<V> |
iterator() |
boolean |
refreshIndex(java.lang.Object key)
Rebuilds the index associated to an object identified by the given key
|
boolean |
remove(java.lang.Object obj) |
boolean |
removeAll(java.util.Collection<?> geoObjects) |
boolean |
retainAll(java.util.Collection<?> arg0) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
public RTreeIndexedSpatialSet()
public RTreeIndexedSpatialSet(int[] expectedGeometryTypes)
geometryTypes - A list of geometry types (from JGeometry) which will be expected to be contained in the set. By providing this values, spatial searches may be optimized since only geometries of the expected types will be looked.public AbstractSpatialIndex getSpatialindex()
IndexedSpatialSetgetSpatialindex in interface IndexedSpatialSet<V extends NFEGeoObject>public boolean add(V geoObj)
add in interface java.util.Collection<V extends NFEGeoObject>add in interface java.util.Set<V extends NFEGeoObject>public int size()
size in interface java.util.Collection<V extends NFEGeoObject>size in interface java.util.Set<V extends NFEGeoObject>public boolean isEmpty()
isEmpty in interface java.util.Collection<V extends NFEGeoObject>isEmpty in interface java.util.Set<V extends NFEGeoObject>public void clear()
clear in interface java.util.Collection<V extends NFEGeoObject>clear in interface java.util.Set<V extends NFEGeoObject>public boolean refreshIndex(java.lang.Object key)
IndexedSpatialSetrefreshIndex in interface IndexedSpatialSet<V extends NFEGeoObject>key - an object's keypublic V get(java.lang.Object key)
IndexedSpatialSetget in interface IndexedSpatialSet<V extends NFEGeoObject>key - an object's keypublic V get(java.awt.geom.Point2D point, double tolerance)
IndexedSpatialSetget in interface IndexedSpatialSet<V extends NFEGeoObject>point - a spatial pointtolerance - the maximum distance an element can be from the point to be selectedpublic java.util.Collection<V> getAll(java.awt.geom.Point2D point, double tolerance)
IndexedSpatialSetgetAll in interface IndexedSpatialSet<V extends NFEGeoObject>point - a spatial pointtolerance - tolerance the maximum distance an element can be from the point to be selectedpublic java.util.Collection<V> getAnyInteract(java.awt.geom.Rectangle2D mbr)
IndexedSpatialSetgetAnyInteract in interface IndexedSpatialSet<V extends NFEGeoObject>mbr - a rectanglepublic java.util.Collection<V> getAnyInteract(java.awt.geom.Area area)
IndexedSpatialSetgetAnyInteract in interface IndexedSpatialSet<V extends NFEGeoObject>area - a java areapublic boolean addAll(java.util.Collection<? extends V> geoObjects)
addAll in interface java.util.Collection<V extends NFEGeoObject>addAll in interface java.util.Set<V extends NFEGeoObject>public boolean contains(java.lang.Object obj)
contains in interface java.util.Collection<V extends NFEGeoObject>contains in interface java.util.Set<V extends NFEGeoObject>public boolean containsAll(java.util.Collection<?> geoObjects)
containsAll in interface java.util.Collection<V extends NFEGeoObject>containsAll in interface java.util.Set<V extends NFEGeoObject>public java.util.Iterator<V> iterator()
iterator in interface java.lang.Iterable<V extends NFEGeoObject>iterator in interface java.util.Collection<V extends NFEGeoObject>iterator in interface java.util.Set<V extends NFEGeoObject>public boolean remove(java.lang.Object obj)
remove in interface java.util.Collection<V extends NFEGeoObject>remove in interface java.util.Set<V extends NFEGeoObject>public boolean removeAll(java.util.Collection<?> geoObjects)
removeAll in interface java.util.Collection<V extends NFEGeoObject>removeAll in interface java.util.Set<V extends NFEGeoObject>public boolean retainAll(java.util.Collection<?> arg0)
retainAll in interface java.util.Collection<V extends NFEGeoObject>retainAll in interface java.util.Set<V extends NFEGeoObject>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<V extends NFEGeoObject>toArray in interface java.util.Set<V extends NFEGeoObject>public <T> T[] toArray(T[] array)
toArray in interface java.util.Collection<V extends NFEGeoObject>toArray in interface java.util.Set<V extends NFEGeoObject>public boolean isGeometryTypeExpected(int geometryType)
geometryType -