Class 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 Details

    • EXTRUDE_PROPERTY

      public static final TLcdDataProperty EXTRUDE_PROPERTY
      Data property that maps to the extrude element. The possible values for this property are instances of Boolean.
    • TESSELLATE_PROPERTY

      public static final TLcdDataProperty TESSELLATE_PROPERTY
      Data property that maps to the tessellate element. The possible values for this property are instances of Boolean.
    • ALTITUDE_MODE_PROPERTY

      public static final TLcdDataProperty ALTITUDE_MODE_PROPERTY
      Data property that maps to the altitudeModeGroup element. The possible values for this property are instances of ELcdKML22AltitudeMode.
    • OUTER_BOUNDARY_PROPERTY

      public static final TLcdDataProperty OUTER_BOUNDARY_PROPERTY
      Data property that maps to the outerBoundaryIs element. The possible values for this property are instances of TLcdKML22Boundary.
    • INNER_BOUNDARIES_PROPERTY

      public static final TLcdDataProperty INNER_BOUNDARIES_PROPERTY
      Data property that maps to the innerBoundaryIs element. The possible values for this property are instances of List<TLcdKML22Boundary>.
    • POLYGON_SIMPLE_EXTENSION_GROUP_PROPERTY

      public static final TLcdDataProperty POLYGON_SIMPLE_EXTENSION_GROUP_PROPERTY
      Data property that maps to the PolygonSimpleExtensionGroup element. The possible values for this property are instances of List<String>.
    • POLYGON_OBJECT_EXTENSION_GROUP_PROPERTY

      public static final TLcdDataProperty POLYGON_OBJECT_EXTENSION_GROUP_PROPERTY
      Data property that maps to the PolygonObjectExtensionGroup element. The possible values for this property are instances of List<TLcdKML22AbstractObject>.
    • ABSTRACT_GEOMETRY_SIMPLE_EXTENSION_GROUP_PROPERTY

      public static final TLcdDataProperty ABSTRACT_GEOMETRY_SIMPLE_EXTENSION_GROUP_PROPERTY
      Data property that maps to the AbstractGeometrySimpleExtensionGroup element. The possible values for this property are instances of List<String>.
    • ABSTRACT_GEOMETRY_OBJECT_EXTENSION_GROUP_PROPERTY

      public static final TLcdDataProperty ABSTRACT_GEOMETRY_OBJECT_EXTENSION_GROUP_PROPERTY
      Data property that maps to the AbstractGeometryObjectExtensionGroup element. The possible values for this property are instances of List<TLcdKML22AbstractObject>.
  • Constructor Details

    • TLcdKML22Polygon

      public TLcdKML22Polygon(TLcdDataType aType)
      Creates a new TLcdKML22Polygon with a custom TLcdDataType.
      Parameters:
      aType - a custom TLcdDataType
  • Method Details

    • getExtrude

      public Boolean 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

      public Boolean 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

      public ELcdKML22AltitudeMode 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

      public ILcdRing getExteriorRing()
      Description copied from interface: ILcdSurface
      Returns the exterior boundary of this surface.
      Specified by:
      getExteriorRing in interface ILcdSurface
      Returns:
      the exterior boundary of this surface.
    • getInteriorRings

      public List<ILcdRing> getInteriorRings()
      Description copied from interface: ILcdSurface
      Returns the holes in this surface, as a list of 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).

      Specified by:
      getInteriorRings in interface ILcdSurface
      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 this ILcd3DEditableShape 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 interface ILcd3DEditableShape
      Overrides:
      move3D in class TLcdKML22AbstractGeometry
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      aZ - the z coordinate of the point.
    • move3D

      public void move3D(ILcdPoint aPoint)
      Description copied from interface: ILcd3DEditableShape
      Moves this ILcd3DEditableShape 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 interface ILcd3DEditableShape
      Overrides:
      move3D in class TLcdKML22AbstractGeometry
      Parameters:
      aPoint - the ILcdPoint to move to.
      See Also:
    • translate3D

      public void translate3D(double aDeltaX, double aDeltaY, double aDeltaZ)
      Description copied from interface: ILcd3DEditableShape
      Translates this ILcd3DEditableShape from its current position over the given translation vector in the 3D space.
      Specified by:
      translate3D in interface ILcd3DEditableShape
      Overrides:
      translate3D in class TLcdKML22AbstractGeometry
      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

      public void move2D(ILcdPoint aPoint)
      Description copied from interface: ILcd2DEditableShape
      Moves this 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.
      Specified by:
      move2D in interface ILcd2DEditableShape
      Overrides:
      move2D in class TLcdKML22AbstractGeometry
      Parameters:
      aPoint - the ILcdPoint to move to.
      See Also:
    • move2D

      public void move2D(double aX, double aY)
      Description copied from interface: ILcd2DEditableShape
      Moves this 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.
      Specified by:
      move2D in interface ILcd2DEditableShape
      Overrides:
      move2D in class TLcdKML22AbstractGeometry
      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 this 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.
      Specified by:
      translate2D in interface ILcd2DEditableShape
      Overrides:
      translate2D in class TLcdKML22AbstractGeometry
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
    • contains2D

      public boolean contains2D(ILcdPoint aPoint)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given ILcdPoint in the 2D space. Only the first two dimensions of the ILcdShape and the ILcdPoint are considered.
      Specified by:
      contains2D in interface ILcdShape
      Overrides:
      contains2D in class TLcdKML22AbstractGeometry
      Parameters:
      aPoint - the ILcdPoint 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 this ILcdShape contains the given point in the 2D space. Only the first two dimensions of the ILcdShape are considered.
      Specified by:
      contains2D in interface ILcdShape
      Overrides:
      contains2D in class TLcdKML22AbstractGeometry
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      Returns:
      the boolean result of the containment test.
    • contains3D

      public boolean contains3D(ILcdPoint aPoint)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given ILcdPoint in the 3D space.
      Specified by:
      contains3D in interface ILcdShape
      Overrides:
      contains3D in class TLcdKML22AbstractGeometry
      Parameters:
      aPoint - the ILcdPoint 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 this ILcdShape contains the given point in the 3D space.
      Specified by:
      contains3D in interface ILcdShape
      Overrides:
      contains3D in class TLcdKML22AbstractGeometry
      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

      public ILcdPoint getFocusPoint()
      Description copied from interface: ILcdShape
      Returns the focus point of this ILcdShape.
      Specified by:
      getFocusPoint in interface ILcdShape
      Overrides:
      getFocusPoint in class TLcdKML22AbstractGeometry
      Returns:
      the focus point of this ILcdShape.
    • clone

      public TLcdKML22Polygon clone()
      Description copied from class: TLcdDataObject
      Returns a deep clone of this object. This method delegates to TLcdDataObject.clone(Map).
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class TLcdDataObject
      Returns:
      a deep clone of this object
      See Also:
    • clone

      public TLcdDataObject clone(Map aObjectDictionary)
      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 the value.getDataType().newInstance() method, and then cloning its properties one by one.
        • If the value implements ILcdDeepCloneable or ILcdCloneable then this interface is used to clone the value.
        • Otherwise, the property value is copied by reference.
      Specified by:
      clone in interface ILcdDeepCloneable
      Overrides:
      clone in class TLcdKML22AbstractGeometry
      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

      public ILcdBounds getBounds()
      Description copied from interface: ILcdBounded
      Returns the 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.

      Specified by:
      getBounds in interface ILcdBounded
      Overrides:
      getBounds in class TLcdKML22AbstractGeometry
      Returns:
      the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
    • setExtrude

      public void setExtrude(Boolean aValue)
      Sets the value of the property that maps to the extrude element.
      Parameters:
      aValue - the value to set for the EXTRUDE_PROPERTY property.
    • setTessellate

      public void setTessellate(Boolean aValue)
      Sets the value of the property that maps to the tessellate element.
      Parameters:
      aValue - the value to set for the TESSELLATE_PROPERTY property.
    • setAltitudeMode

      public void setAltitudeMode(ELcdKML22AltitudeMode aValue)
      Sets the value of the property that maps to the altitudeModeGroup element.
      Parameters:
      aValue - the value to set for the ALTITUDE_MODE_PROPERTY property.
    • getOuterBoundary

      public TLcdKML22Boundary getOuterBoundary()
      Returns the value of the property that maps to the outerBoundaryIs element.
      Returns:
      the value of the OUTER_BOUNDARY_PROPERTY property.
    • setOuterBoundary

      public void setOuterBoundary(TLcdKML22Boundary aValue)
      Sets the value of the property that maps to the outerBoundaryIs element.
      Parameters:
      aValue - the value to set for the OUTER_BOUNDARY_PROPERTY property.
    • getInnerBoundaries

      public List<TLcdKML22Boundary> getInnerBoundaries()
      Returns the value of the property that maps to the innerBoundaryIs element.
      Returns:
      the value of the INNER_BOUNDARIES_PROPERTY property.