Class TLcdKML22AbstractGeometry
java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.format.kml22.model.TLcdKML22AbstractObject
com.luciad.format.kml22.model.geometry.TLcdKML22AbstractGeometry
- All Implemented Interfaces:
ILcdDataObject
,ILcdBounded
,ILcdShape
,ILcd2DEditableShape
,ILcd3DEditableShape
,ILcdCache
,ILcdCloneable
,ILcdDeepCloneable
,Serializable
,Cloneable
- Direct Known Subclasses:
TLcdKML223DModel
,TLcdKML22LinearRing
,TLcdKML22LineString
,TLcdKML22MultiGeometry
,TLcdKML22Point
,TLcdKML22Polygon
public class TLcdKML22AbstractGeometry
extends TLcdKML22AbstractObject
implements ILcd3DEditableShape, ILcdCache
Domain class modeling the KML AbstractGeometryType type.
TLcdKML22AbstractGeometry is the super class of all geometries that can be used within KML.
- Since:
- 10.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TLcdDataProperty
Data property that maps to theAbstractGeometryObjectExtensionGroup
element.static final TLcdDataProperty
Data property that maps to theAbstractGeometrySimpleExtensionGroup
element.Fields inherited from class com.luciad.format.kml22.model.TLcdKML22AbstractObject
ID_PROPERTY, OBJECT_SIMPLE_EXTENSION_GROUP_PROPERTY, TARGET_ID_PROPERTY
-
Constructor Summary
ConstructorDescriptionCreates a newTLcdKML22AbstractGeometry
with a customTLcdDataType
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the cache.Returns a deep clone of this object.boolean
contains2D
(double aX, double aY) Checks whether thisILcdShape
contains the given point in the 2D space.boolean
contains2D
(ILcdPoint aPoint) Checks whether thisILcdShape
contains the givenILcdPoint
in the 2D space.boolean
contains3D
(double aX, double aY, double aZ) Checks whether thisILcdShape
contains the given point in the 3D space.boolean
contains3D
(ILcdPoint aPoint) Checks whether thisILcdShape
contains the givenILcdPoint
in the 3D space.Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.getCachedObject
(Object aKey) Looks up and returns the cached Object corresponding to the given key.Returns the focus point of thisILcdShape
.void
insertIntoCache
(Object aKey, Object aValue) Inserts a cache Object corresponding to the given key Object.void
move2D
(double aX, double aY) Moves thisILcd2DEditableShape
to the given point in the 2D space.void
Moves thisILcd2DEditableShape
to the given point in the 2D space.void
move3D
(double aX, double aY, double aZ) Moves thisILcd3DEditableShape
to the given point in the 3D space.void
Moves thisILcd3DEditableShape
to the given point in the 3D space.removeCachedObject
(Object aKey) Looks up and removes the cached Object corresponding to the given key.void
translate2D
(double aDeltaX, double aDeltaY) Translates thisILcd2DEditableShape
from its current position over the given translation vector in the 2D space.void
translate3D
(double aDeltaX, double aDeltaY, double aDeltaZ) Translates thisILcd3DEditableShape
from its current position over the given translation vector in the 3D space.Methods inherited from class com.luciad.format.kml22.model.TLcdKML22AbstractObject
getId, getTargetId, setId, setTargetId
Methods inherited from class com.luciad.datamodel.TLcdDataObject
clone, getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdCloneable
clone
-
Field Details
-
ABSTRACT_GEOMETRY_SIMPLE_EXTENSION_GROUP_PROPERTY
Data property that maps to theAbstractGeometrySimpleExtensionGroup
element. The possible values for this property are instances ofList<String>
. -
ABSTRACT_GEOMETRY_OBJECT_EXTENSION_GROUP_PROPERTY
Data property that maps to theAbstractGeometryObjectExtensionGroup
element. The possible values for this property are instances ofList<TLcdKML22AbstractObject>
.
-
-
Constructor Details
-
TLcdKML22AbstractGeometry
Creates a newTLcdKML22AbstractGeometry
with a customTLcdDataType
.- Parameters:
aType
- a customTLcdDataType
-
-
Method Details
-
move3D
Description copied from interface:ILcd3DEditableShape
Moves thisILcd3DEditableShape
to the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3D
in interfaceILcd3DEditableShape
- Parameters:
aPoint
- theILcdPoint
to move to.- See Also:
-
move3D
public void move3D(double aX, double aY, double aZ) Description copied from interface:ILcd3DEditableShape
Moves thisILcd3DEditableShape
to the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3D
in interfaceILcd3DEditableShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.
-
translate3D
public void translate3D(double aDeltaX, double aDeltaY, double aDeltaZ) Description copied from interface:ILcd3DEditableShape
Translates thisILcd3DEditableShape
from its current position over the given translation vector in the 3D space.- Specified by:
translate3D
in interfaceILcd3DEditableShape
- Parameters:
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.aDeltaZ
- the z coordinate of the translation vector.
-
move2D
Description copied from interface:ILcd2DEditableShape
Moves thisILcd2DEditableShape
to the given point in the 2D space. The focus point is used as the handle by which the shape is moved. Only the first two dimensions of theILcdShape
and theILcdPoint
are considered. The third dimension is left unchanged.- Specified by:
move2D
in interfaceILcd2DEditableShape
- Parameters:
aPoint
- theILcdPoint
to move to.- See Also:
-
move2D
public void move2D(double aX, double aY) Description copied from interface:ILcd2DEditableShape
Moves thisILcd2DEditableShape
to the given point in the 2D space. The focus point is used as the handle by which the shape is moved. Only the first two dimensions of theILcdShape
are considered. The third dimension is left unchanged.- Specified by:
move2D
in interfaceILcd2DEditableShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.
-
translate2D
public void translate2D(double aDeltaX, double aDeltaY) Description copied from interface:ILcd2DEditableShape
Translates thisILcd2DEditableShape
from its current position over the given translation vector in the 2D space. Only the first two dimensions of theILcdShape
are considered. The third dimension is left unchanged.- Specified by:
translate2D
in interfaceILcd2DEditableShape
- Parameters:
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.
-
getFocusPoint
Description copied from interface:ILcdShape
Returns the focus point of thisILcdShape
.- Specified by:
getFocusPoint
in interfaceILcdShape
- Returns:
- the focus point of this
ILcdShape
.
-
contains2D
Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the givenILcdPoint
in the 2D space. Only the first two dimensions of theILcdShape
and theILcdPoint
are considered.- Specified by:
contains2D
in interfaceILcdShape
- Parameters:
aPoint
- theILcdPoint
to test.- Returns:
- the boolean result of the containment test.
- See Also:
-
contains2D
public boolean contains2D(double aX, double aY) Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the given point in the 2D space. Only the first two dimensions of theILcdShape
are considered.- Specified by:
contains2D
in interfaceILcdShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.- Returns:
- the boolean result of the containment test.
-
contains3D
Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the givenILcdPoint
in the 3D space.- Specified by:
contains3D
in interfaceILcdShape
- Parameters:
aPoint
- theILcdPoint
to test.- Returns:
- the boolean result of the containment test.
- See Also:
-
contains3D
public boolean contains3D(double aX, double aY, double aZ) Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the given point in the 3D space.- Specified by:
contains3D
in interfaceILcdShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.- Returns:
- the boolean result of the containment test.
-
getBounds
Description copied from interface:ILcdBounded
Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points) the return value is unspecified. It is highly recommended to return an
undefined
bounds. You can create undefined bounds using the default constructors ofTLcdLonLatBounds
orTLcdXYBounds
.- Specified by:
getBounds
in interfaceILcdBounded
- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded.
-
getCachedObject
Description copied from interface:ILcdCache
Looks up and returns the cached Object corresponding to the given key.- Specified by:
getCachedObject
in interfaceILcdCache
- Parameters:
aKey
- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there is no Object corresponding to the given key.
-
clearCache
public void clearCache()Description copied from interface:ILcdCache
Clears the cache.- Specified by:
clearCache
in interfaceILcdCache
-
removeCachedObject
Description copied from interface:ILcdCache
Looks up and removes the cached Object corresponding to the given key.- Specified by:
removeCachedObject
in interfaceILcdCache
- Parameters:
aKey
- the key Object that was used for storing the cache Object.- Returns:
- the cached Object, or null if there was no Object corresponding to the given key.
-
insertIntoCache
Description copied from interface:ILcdCache
Inserts a cache Object corresponding to the given key Object.- Specified by:
insertIntoCache
in interfaceILcdCache
- Parameters:
aKey
- the key Object that will be used to identify the Object. The key must therefore be a unique identifier, typically the caller itself:insertIntoCache(this, ...)
.aValue
- the Object to be cached.
-
clone
Description copied from class:TLcdDataObject
Returns a deep clone of this object. If the clone is not already present in the dictionary, a new instance if created as follows:- First, a new instance is created using Java's clone() mechanism.
- Then, all properties of this object are cloned and set on the newly created
instance. A property is cloned as follows:
- If the property value is an
ILcdDataObject
, the value is cloned by first creating a new instance via thevalue.getDataType().newInstance()
method, and then cloning its properties one by one. - If the value implements
ILcdDeepCloneable
orILcdCloneable
then this interface is used to clone the value. - Otherwise, the property value is copied by reference.
- If the property value is an
- Specified by:
clone
in interfaceILcdDeepCloneable
- Overrides:
clone
in classTLcdDataObject
- Parameters:
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made, and their corresponding clone Object.- Returns:
- a deep clone of this object
-