public class TLcdKML22Polygon extends TLcdKML22AbstractGeometry implements ILcd3DEditableShape, ILcdSurface
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.
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
ABSTRACT_GEOMETRY_OBJECT_EXTENSION_GROUP_PROPERTY
Data property that maps to the
AbstractGeometryObjectExtensionGroup element. |
static TLcdDataProperty |
ABSTRACT_GEOMETRY_SIMPLE_EXTENSION_GROUP_PROPERTY
Data property that maps to the
AbstractGeometrySimpleExtensionGroup element. |
static TLcdDataProperty |
ALTITUDE_MODE_PROPERTY
Data property that maps to the
altitudeModeGroup element. |
static TLcdDataProperty |
EXTRUDE_PROPERTY
Data property that maps to the
extrude element. |
static TLcdDataProperty |
INNER_BOUNDARIES_PROPERTY
Data property that maps to the
innerBoundaryIs element. |
static TLcdDataProperty |
OUTER_BOUNDARY_PROPERTY
Data property that maps to the
outerBoundaryIs element. |
static TLcdDataProperty |
POLYGON_OBJECT_EXTENSION_GROUP_PROPERTY
Data property that maps to the
PolygonObjectExtensionGroup element. |
static TLcdDataProperty |
POLYGON_SIMPLE_EXTENSION_GROUP_PROPERTY
Data property that maps to the
PolygonSimpleExtensionGroup element. |
static TLcdDataProperty |
TESSELLATE_PROPERTY
Data property that maps to the
tessellate element. |
ID_PROPERTY, OBJECT_SIMPLE_EXTENSION_GROUP_PROPERTY, TARGET_ID_PROPERTY
Constructor and Description |
---|
TLcdKML22Polygon(TLcdDataType aType)
Creates a new
TLcdKML22Polygon with a custom TLcdDataType . |
Modifier and Type | Method and Description |
---|---|
TLcdKML22Polygon |
clone()
Returns a deep clone of this object.
|
TLcdDataObject |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
boolean |
contains2D(double aX,
double aY)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains2D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 2D space. |
boolean |
contains3D(double aX,
double aY,
double aZ)
Checks whether this
ILcdShape contains the given point in
the 3D space. |
boolean |
contains3D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
ELcdKML22AltitudeMode |
getAltitudeMode()
Gets the altitude mode of this geometry.
|
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
ILcdRing |
getExteriorRing()
Returns the exterior boundary of this surface.
|
Boolean |
getExtrude()
Returns whether or not this shape should be extruded.
|
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
List<TLcdKML22Boundary> |
getInnerBoundaries()
Returns the value of the property that maps to the
innerBoundaryIs element. |
List<ILcdRing> |
getInteriorRings()
Returns the holes in this surface, as a list of
ILcdRing instances. |
TLcdKML22Boundary |
getOuterBoundary()
Returns the value of the property that maps to the
outerBoundaryIs element. |
Boolean |
getTessellate()
Returns whether or not this should be tessellated.
|
boolean |
isExtruded()
Returns the extrusion state of this shape, keeping into account the altitude mode.
|
boolean |
isTessellated()
Returns the tessellation state of this shape, keeping into account the altitude mode
|
void |
move2D(double aX,
double aY)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move2D(ILcdPoint aPoint)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move3D(double aX,
double aY,
double aZ)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
move3D(ILcdPoint aPoint)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
setAltitudeMode(ELcdKML22AltitudeMode aValue)
Sets the value of the property that maps to the
altitudeModeGroup element. |
void |
setExtrude(Boolean aValue)
Sets the value of the property that maps to the
extrude element. |
void |
setOuterBoundary(TLcdKML22Boundary aValue)
Sets the value of the property that maps to the
outerBoundaryIs element. |
void |
setTessellate(Boolean aValue)
Sets the value of the property that maps to the
tessellate element. |
void |
translate2D(double aDeltaX,
double aDeltaY)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
void |
translate3D(double aDeltaX,
double aDeltaY,
double aDeltaZ)
Translates this
ILcd3DEditableShape from its current position over the given translation
vector in the 3D space. |
clearCache, getCachedObject, insertIntoCache, removeCachedObject
getId, getTargetId, setId, setTargetId
getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue, toString
public static final TLcdDataProperty EXTRUDE_PROPERTY
extrude
element.
The possible values for this property are instances of Boolean
.public static final TLcdDataProperty TESSELLATE_PROPERTY
tessellate
element.
The possible values for this property are instances of Boolean
.public static final TLcdDataProperty ALTITUDE_MODE_PROPERTY
altitudeModeGroup
element.
The possible values for this property are instances of ELcdKML22AltitudeMode
.public static final TLcdDataProperty OUTER_BOUNDARY_PROPERTY
outerBoundaryIs
element.
The possible values for this property are instances of TLcdKML22Boundary
.public static final TLcdDataProperty INNER_BOUNDARIES_PROPERTY
innerBoundaryIs
element.
The possible values for this property are instances of List<TLcdKML22Boundary>
.public static final TLcdDataProperty POLYGON_SIMPLE_EXTENSION_GROUP_PROPERTY
PolygonSimpleExtensionGroup
element.
The possible values for this property are instances of List<String>
.public static final TLcdDataProperty POLYGON_OBJECT_EXTENSION_GROUP_PROPERTY
PolygonObjectExtensionGroup
element.
The possible values for this property are instances of List<TLcdKML22AbstractObject>
.public static final TLcdDataProperty ABSTRACT_GEOMETRY_SIMPLE_EXTENSION_GROUP_PROPERTY
AbstractGeometrySimpleExtensionGroup
element.
The possible values for this property are instances of List<String>
.public static final TLcdDataProperty ABSTRACT_GEOMETRY_OBJECT_EXTENSION_GROUP_PROPERTY
AbstractGeometryObjectExtensionGroup
element.
The possible values for this property are instances of List<TLcdKML22AbstractObject>
.public TLcdKML22Polygon(TLcdDataType aType)
TLcdKML22Polygon
with a custom TLcdDataType
.aType
- a custom TLcdDataType
public Boolean getExtrude()
public Boolean getTessellate()
public ELcdKML22AltitudeMode getAltitudeMode()
ELcdKML22AltitudeMode
public ILcdRing getExteriorRing()
ILcdSurface
getExteriorRing
in interface ILcdSurface
public List<ILcdRing> getInteriorRings()
ILcdSurface
ILcdRing
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
).
getInteriorRings
in interface ILcdSurface
public boolean isExtruded()
Returns the extrusion state of this shape, keeping into account the altitude mode.
public boolean isTessellated()
Returns the tessellation state of this shape, keeping into account the altitude mode
public void move3D(double aX, double aY, double aZ)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
move3D
in class TLcdKML22AbstractGeometry
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public void move3D(ILcdPoint aPoint)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
move3D
in class TLcdKML22AbstractGeometry
aPoint
- the ILcdPoint
to move to.ILcd3DEditableShape.move3D(double, double, double)
public void translate3D(double aDeltaX, double aDeltaY, double aDeltaZ)
ILcd3DEditableShape
ILcd3DEditableShape
from its current position over the given translation
vector in the 3D space.translate3D
in interface ILcd3DEditableShape
translate3D
in class TLcdKML22AbstractGeometry
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.aDeltaZ
- the z coordinate of the translation vector.public void move2D(ILcdPoint aPoint)
ILcd2DEditableShape
ILcd2DEditableShape
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 the ILcdShape
and the ILcdPoint
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
move2D
in class TLcdKML22AbstractGeometry
aPoint
- the ILcdPoint
to move to.ILcd2DEditableShape.move2D(double, double)
public void move2D(double aX, double aY)
ILcd2DEditableShape
ILcd2DEditableShape
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 the ILcdShape
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
move2D
in class TLcdKML22AbstractGeometry
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public void translate2D(double aDeltaX, double aDeltaY)
ILcd2DEditableShape
ILcd2DEditableShape
from its current position over the given translation
vector in the 2D space. Only the first two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.translate2D
in interface ILcd2DEditableShape
translate2D
in class TLcdKML22AbstractGeometry
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.public boolean contains2D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 2D space.
Only the first two dimensions of the ILcdShape
and the ILcdPoint
are considered.contains2D
in interface ILcdShape
contains2D
in class TLcdKML22AbstractGeometry
aPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains2D(double aX, double aY)
ILcdShape
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
contains2D
in class TLcdKML22AbstractGeometry
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains3D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdKML22AbstractGeometry
aPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public boolean contains3D(double aX, double aY, double aZ)
ILcdShape
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdKML22AbstractGeometry
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
getFocusPoint
in class TLcdKML22AbstractGeometry
ILcdShape
.public TLcdKML22Polygon clone()
TLcdDataObject
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdDataObject
Object.clone()
public TLcdDataObject clone(Map aObjectDictionary)
TLcdDataObject
ILcdDataObject
, the value is cloned by first creating a new instance via
the value.getDataType().newInstance()
method, and then cloning its properties one by one.ILcdDeepCloneable
or
ILcdCloneable
then this interface is used to clone the value.clone
in interface ILcdDeepCloneable
clone
in class TLcdKML22AbstractGeometry
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made,
and their corresponding clone Object.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
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
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
getBounds
in class TLcdKML22AbstractGeometry
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public void setExtrude(Boolean aValue)
extrude
element.aValue
- the value to set for the EXTRUDE_PROPERTY
property.public void setTessellate(Boolean aValue)
tessellate
element.aValue
- the value to set for the TESSELLATE_PROPERTY
property.public void setAltitudeMode(ELcdKML22AltitudeMode aValue)
altitudeModeGroup
element.aValue
- the value to set for the ALTITUDE_MODE_PROPERTY
property.public TLcdKML22Boundary getOuterBoundary()
outerBoundaryIs
element.OUTER_BOUNDARY_PROPERTY
property.public void setOuterBoundary(TLcdKML22Boundary aValue)
outerBoundaryIs
element.aValue
- the value to set for the OUTER_BOUNDARY_PROPERTY
property.public List<TLcdKML22Boundary> getInnerBoundaries()
innerBoundaryIs
element.INNER_BOUNDARIES_PROPERTY
property.