Interface IndexedSpatialSet<V extends GeoObject>
-
- Type Parameters:
V-
- All Superinterfaces:
java.util.Collection<V>,java.lang.Iterable<V>,java.util.Set<V>
- All Known Implementing Classes:
RTreeIndexedSpatialSet
public interface IndexedSpatialSet<V extends GeoObject> extends java.util.Set<V>A set that is spatially indexed. Additionally to the functionality provided by a Set, it is possible to search items interacting with a geometry.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vget(java.awt.geom.Point2D point, double tolerance)Gets the element which is closer to the given point but within the tolerance.Vget(java.lang.Object key)Gets the object identified by the given keyjava.util.Collection<V>getAll(java.awt.geom.Point2D point, double tolerance)Gets all the elements which distance to the given point is within the tolerancejava.util.Collection<V>getAnyInteract(java.awt.geom.Area area)Gets all the elements interacting in some way with the given areajava.util.Collection<V>getAnyInteract(java.awt.geom.Rectangle2D mbr)Gets all the elements interacting in some way with the given rectangleAbstractSpatialIndexgetSpatialindex()Gets the underlying implementation used to perform spatial-indexingbooleanrefreshIndex(java.lang.Object key)Rebuilds the index associated to an object identified by the given key
-
-
-
Method Detail
-
refreshIndex
boolean refreshIndex(java.lang.Object key)
Rebuilds the index associated to an object identified by the given key- Parameters:
key- an object's key- Returns:
- true if the index could be refreshed
-
getSpatialindex
AbstractSpatialIndex getSpatialindex()
Gets the underlying implementation used to perform spatial-indexing- Returns:
- an AbstractSpatialIndex instance
-
get
V get(java.lang.Object key)
Gets the object identified by the given key- Parameters:
key- an object's key- Returns:
- the object associated to the key or null if no object is related to the key
-
get
V get(java.awt.geom.Point2D point, double tolerance)
Gets the element which is closer to the given point but within the tolerance.- Parameters:
point- a spatial pointtolerance- the maximum distance an element can be from the point to be selected- Returns:
- the element closest to the given point with a distance equal or less to the tolerance
-
getAll
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- Parameters:
point- a spatial pointtolerance- tolerance the maximum distance an element can be from the point to be selected- Returns:
- a collection containing all the elements which distance to the given point is within the tolerance
-
getAnyInteract
java.util.Collection<V> getAnyInteract(java.awt.geom.Rectangle2D mbr)
Gets all the elements interacting in some way with the given rectangle- Parameters:
mbr- a rectangle- Returns:
- a collection containing all the elements interacting in some way with the given rectangle
-
getAnyInteract
java.util.Collection<V> getAnyInteract(java.awt.geom.Area area)
Gets all the elements interacting in some way with the given area- Parameters:
area- a java area- Returns:
- a collection containing all the elements interacting in some way with the given area
-
-