Interface GeoObject
-
- All Superinterfaces:
java.lang.Cloneable
- All Known Implementing Classes:
AbstractFeature,GeometryFeature,ImageObject,NFEFeatureElementGeoObject,NFEGeoObject,NFENetworkElementGeoObject
public interface GeoObject extends java.lang.CloneableAn interface representing a piece of geo-spatial object. It can be a vector shape, a raster imagery, or any other geo-spatial entity, even an entire data set. A GeoObject must always have a key, which can be obtained using the getKey() method. It is also typically associated with a Layer instance, although this is optional.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)DrawablegetDrawable(java.awt.geom.AffineTransform viewportTransform)This method returns a drawable Java2D shape or point that can be directly rendered onto a device.java.lang.ObjectgetKey()Gets the key of the selected object.LayergetLayer()Gets the associated layer for this object.java.awt.geom.Rectangle2DgetMBR()Gets the minimum bounding rectangle of this geo-object.inthashCode()booleanisSubElementOf(GeoObject obj)Returns true if this GeoObject is a sub element of the provided GeoObjectjava.lang.ObjectsetKey(java.lang.Object key)Sets a new key on the object.voidsetLayer(Layer layer)Sets the layer to be associated with this object.java.util.List<GeoObject>substract(java.util.List<? extends GeoObject> objs)Returns a set of GeoObjects that represent the substraction of the provided GeoObjects from this GeoObject
-
-
-
Method Detail
-
equals
boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getKey
java.lang.Object getKey()
Gets the key of the selected object.- Returns:
- the key
-
setKey
java.lang.Object setKey(java.lang.Object key)
Sets a new key on the object.- Parameters:
key- the new key to be set.- Returns:
- previously set key
-
getLayer
Layer getLayer()
Gets the associated layer for this object.- Returns:
- typically an Layer instance that owns this object.
-
setLayer
void setLayer(Layer layer)
Sets the layer to be associated with this object.- Parameters:
layer- the Layer instance to be associated.
-
getDrawable
Drawable getDrawable(java.awt.geom.AffineTransform viewportTransform)
This method returns a drawable Java2D shape or point that can be directly rendered onto a device. If a non-null viewportTransform is supplied, then it is applied and result returned.- Parameters:
viewportTransform-- Returns:
- a Drawable instance that references either a Shape or a Point2D
-
getMBR
java.awt.geom.Rectangle2D getMBR()
Gets the minimum bounding rectangle of this geo-object. The rectangle is in the same coordinate system as the object value.
-
isSubElementOf
boolean isSubElementOf(GeoObject obj)
Returns true if this GeoObject is a sub element of the provided GeoObject- Parameters:
obj-- Returns:
-
-