Class TLcdKML22Polygon
java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.format.kml22.model.TLcdKML22AbstractObject
com.luciad.format.kml22.model.geometry.TLcdKML22AbstractGeometry
com.luciad.format.kml22.model.geometry.TLcdKML22Polygon
- All Implemented Interfaces:
ILcdDataObject
,ILcdBounded
,ILcdShape
,ILcdSurface
,ILcd2DEditableShape
,ILcd3DEditableShape
,ILcdCache
,ILcdCloneable
,ILcdDeepCloneable
,Serializable
,Cloneable
public class TLcdKML22Polygon
extends TLcdKML22AbstractGeometry
implements ILcd3DEditableShape, ILcdSurface
Domain class modeling the KML PolygonType type.
OGC KML Specification description:
This element can be used wherever the following element is referenced: -kml:AbstractGeometryGroup A kml:Polygon shall have an outer boundary ring outside of an update context, that is when not a descendant of kml:Update. It may have 0 or more inner boundary rings. Each ring is defined by a kml:LinearRing. It is advised that the rings not cross each other.
- 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.static final TLcdDataProperty
Data property that maps to thealtitudeModeGroup
element.static final TLcdDataProperty
Data property that maps to theextrude
element.static final TLcdDataProperty
Data property that maps to theinnerBoundaryIs
element.static final TLcdDataProperty
Data property that maps to theouterBoundaryIs
element.static final TLcdDataProperty
Data property that maps to thePolygonObjectExtensionGroup
element.static final TLcdDataProperty
Data property that maps to thePolygonSimpleExtensionGroup
element.static final TLcdDataProperty
Data property that maps to thetessellate
element.Fields inherited from class com.luciad.format.kml22.model.TLcdKML22AbstractObject
ID_PROPERTY, OBJECT_SIMPLE_EXTENSION_GROUP_PROPERTY, TARGET_ID_PROPERTY
-
Constructor Summary
ConstructorDescriptionTLcdKML22Polygon
(TLcdDataType aType) Creates a newTLcdKML22Polygon
with a customTLcdDataType
. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a deep clone of this object.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.Gets the altitude mode of this geometry.Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.Returns the exterior boundary of this surface.Returns whether or not this shape should be extruded.Returns the focus point of thisILcdShape
.Returns the value of the property that maps to theinnerBoundaryIs
element.Returns the holes in this surface, as a list ofILcdRing
instances.Returns the value of the property that maps to theouterBoundaryIs
element.Returns whether or not this should be tessellated.boolean
Returns the extrusion state of this shape, keeping into account the altitude mode.boolean
Returns the tessellation state of this shape, keeping into account the altitude modevoid
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.void
setAltitudeMode
(ELcdKML22AltitudeMode aValue) Sets the value of the property that maps to thealtitudeModeGroup
element.void
setExtrude
(Boolean aValue) Sets the value of the property that maps to theextrude
element.void
setOuterBoundary
(TLcdKML22Boundary aValue) Sets the value of the property that maps to theouterBoundaryIs
element.void
setTessellate
(Boolean aValue) Sets the value of the property that maps to thetessellate
element.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.geometry.TLcdKML22AbstractGeometry
clearCache, getCachedObject, insertIntoCache, removeCachedObject
Methods inherited from class com.luciad.format.kml22.model.TLcdKML22AbstractObject
getId, getTargetId, setId, setTargetId
Methods inherited from class com.luciad.datamodel.TLcdDataObject
getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue, toString
-
Field Details
-
EXTRUDE_PROPERTY
Data property that maps to theextrude
element. The possible values for this property are instances ofBoolean
. -
TESSELLATE_PROPERTY
Data property that maps to thetessellate
element. The possible values for this property are instances ofBoolean
. -
ALTITUDE_MODE_PROPERTY
Data property that maps to thealtitudeModeGroup
element. The possible values for this property are instances ofELcdKML22AltitudeMode
. -
OUTER_BOUNDARY_PROPERTY
Data property that maps to theouterBoundaryIs
element. The possible values for this property are instances ofTLcdKML22Boundary
. -
INNER_BOUNDARIES_PROPERTY
Data property that maps to theinnerBoundaryIs
element. The possible values for this property are instances ofList<TLcdKML22Boundary>
. -
POLYGON_SIMPLE_EXTENSION_GROUP_PROPERTY
Data property that maps to thePolygonSimpleExtensionGroup
element. The possible values for this property are instances ofList<String>
. -
POLYGON_OBJECT_EXTENSION_GROUP_PROPERTY
Data property that maps to thePolygonObjectExtensionGroup
element. The possible values for this property are instances ofList<TLcdKML22AbstractObject>
. -
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
-
TLcdKML22Polygon
Creates a newTLcdKML22Polygon
with a customTLcdDataType
.- Parameters:
aType
- a customTLcdDataType
-
-
Method Details
-
getExtrude
Returns whether or not this shape should be extruded. Returns false if it was undefined.- Returns:
- true if this shape should be extruded; false otherwise.
-
getTessellate
Returns whether or not this should be tessellated. Returns false if it was undefined.- Returns:
- true if this shape should be tessellated; false otherwise.
-
getAltitudeMode
Gets the altitude mode of this geometry. Returns ELcdKML22AltitudeMode.CLAMP_TO_GROUND if it was undefined. * @return true if this shape should be tessellated; false otherwise.- Returns:
- An
ELcdKML22AltitudeMode
-
getExteriorRing
Description copied from interface:ILcdSurface
Returns the exterior boundary of this surface.- Specified by:
getExteriorRing
in interfaceILcdSurface
- Returns:
- the exterior boundary of this surface.
-
getInteriorRings
Description copied from interface:ILcdSurface
Returns the holes in this surface, as a list ofILcdRing
instances. If there are no holes, an empty list is returned.Note that the returned list is immutable unless specified by specific subclasses (see for example
ILcdEditableSurface
).- Specified by:
getInteriorRings
in interfaceILcdSurface
- Returns:
- a list containing zero or more rings, representing the holes in this surface.
-
isExtruded
public boolean isExtruded()Returns the extrusion state of this shape, keeping into account the altitude mode.
- Returns:
- true if this geometry is extruded, and its altitude mode is absolute or relative to ground.
-
isTessellated
public boolean isTessellated()Returns the tessellation state of this shape, keeping into account the altitude mode
- Returns:
- true if this geometry is tessellated, and its altitude mode is clam to ground.
-
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
- Overrides:
move3D
in classTLcdKML22AbstractGeometry
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.
-
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
- Overrides:
move3D
in classTLcdKML22AbstractGeometry
- Parameters:
aPoint
- theILcdPoint
to move to.- See Also:
-
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
- Overrides:
translate3D
in classTLcdKML22AbstractGeometry
- 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
- Overrides:
move2D
in classTLcdKML22AbstractGeometry
- 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
- Overrides:
move2D
in classTLcdKML22AbstractGeometry
- 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
- Overrides:
translate2D
in classTLcdKML22AbstractGeometry
- Parameters:
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.
-
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
- Overrides:
contains2D
in classTLcdKML22AbstractGeometry
- 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
- Overrides:
contains2D
in classTLcdKML22AbstractGeometry
- 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
- Overrides:
contains3D
in classTLcdKML22AbstractGeometry
- 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
- Overrides:
contains3D
in classTLcdKML22AbstractGeometry
- 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.
-
getFocusPoint
Description copied from interface:ILcdShape
Returns the focus point of thisILcdShape
.- Specified by:
getFocusPoint
in interfaceILcdShape
- Overrides:
getFocusPoint
in classTLcdKML22AbstractGeometry
- Returns:
- the focus point of this
ILcdShape
.
-
clone
Description copied from class:TLcdDataObject
Returns a deep clone of this object. This method delegates toTLcdDataObject.clone(Map)
.- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classTLcdDataObject
- Returns:
- a deep clone of this object
- See Also:
-
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 classTLcdKML22AbstractGeometry
- 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
-
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
- Overrides:
getBounds
in classTLcdKML22AbstractGeometry
- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded.
-
setExtrude
Sets the value of the property that maps to theextrude
element.- Parameters:
aValue
- the value to set for theEXTRUDE_PROPERTY
property.
-
setTessellate
Sets the value of the property that maps to thetessellate
element.- Parameters:
aValue
- the value to set for theTESSELLATE_PROPERTY
property.
-
setAltitudeMode
Sets the value of the property that maps to thealtitudeModeGroup
element.- Parameters:
aValue
- the value to set for theALTITUDE_MODE_PROPERTY
property.
-
getOuterBoundary
Returns the value of the property that maps to theouterBoundaryIs
element.- Returns:
- the value of the
OUTER_BOUNDARY_PROPERTY
property.
-
setOuterBoundary
Sets the value of the property that maps to theouterBoundaryIs
element.- Parameters:
aValue
- the value to set for theOUTER_BOUNDARY_PROPERTY
property.
-
getInnerBoundaries
Returns the value of the property that maps to theinnerBoundaryIs
element.- Returns:
- the value of the
INNER_BOUNDARIES_PROPERTY
property.
-