Class TLcdKML22Location

All Implemented Interfaces:
ILcdDataObject, ILcdBounded, ILcdPoint, ILcdShape, ILcd2DEditablePoint, ILcd2DEditableShape, ILcd3DEditablePoint, ILcd3DEditableShape, ILcdCloneable, ILcdDeepCloneable, Serializable, Cloneable

public class TLcdKML22Location extends TLcdKML22AbstractObject implements ILcd3DEditablePoint
Domain class modeling the KML LocationType type.

OGC KML Specification description:

 This element can be used wherever the following element is referenced:

  -kml:AbstractObjectGroup

 Specifies the coordinates of a location.
 A kml:Location element should contain the kml:longitude, kml:latitude child elements
 outside of an update context, that is when not a descendant of kml:Update.
 

Since:
10.0
See Also:
  • Field Details

    • LONGITUDE_PROPERTY

      public static final TLcdDataProperty LONGITUDE_PROPERTY
      Data property that maps to the longitude element. The possible values for this property are instances of Double.
    • LATITUDE_PROPERTY

      public static final TLcdDataProperty LATITUDE_PROPERTY
      Data property that maps to the latitude element. The possible values for this property are instances of Double.
    • ALTITUDE_PROPERTY

      public static final TLcdDataProperty ALTITUDE_PROPERTY
      Data property that maps to the altitude element. The possible values for this property are instances of Double.
    • LOCATION_SIMPLE_EXTENSION_GROUP_PROPERTY

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

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

    • TLcdKML22Location

      public TLcdKML22Location()
      Creates a new TLcdKML22Location with its default TLcdDataType.
    • TLcdKML22Location

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

    • setValue

      public void setValue(TLcdDataProperty aProperty, Object aValue)
      Description copied from interface: ILcdDataObject

      Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.

      The given property must be declared in the data object's type or in one of its super types. In other words, getDataType().getProperties().contains( aProperty ) should always be true. Otherwise, the implementation should throw an IllegalArgumentException.

      Specified by:
      setValue in interface ILcdDataObject
      Overrides:
      setValue in class TLcdDataObject
      Parameters:
      aProperty - the property for which the value is to be set
      aValue - the value to set
      See Also:
    • getX

      public double getX()
      Description copied from interface: ILcdPoint
      Returns the x coordinate of this ILcdPoint.
      Specified by:
      getX in interface ILcdPoint
      Returns:
      the x coordinate of this ILcdPoint.
    • getY

      public double getY()
      Description copied from interface: ILcdPoint
      Returns the y coordinate of this ILcdPoint.
      Specified by:
      getY in interface ILcdPoint
      Returns:
      the y coordinate of this ILcdPoint.
    • getZ

      public double getZ()
      Description copied from interface: ILcdPoint
      Returns the z coordinate of this ILcdPoint.
      Specified by:
      getZ in interface ILcdPoint
      Returns:
      the z coordinate of this ILcdPoint.
    • getCosY

      public double getCosY()
      Description copied from interface: ILcdPoint
      Returns cos( getY() * DEG2RAD ).
      Specified by:
      getCosY in interface ILcdPoint
      Returns:
      cos( getY() * DEG2RAD ).
    • getCosX

      public double getCosX()
      Description copied from interface: ILcdPoint
      Returns cos( getX() * DEG2RAD ).
      Specified by:
      getCosX in interface ILcdPoint
      Returns:
      cos( getX() * DEG2RAD ).
    • getSinY

      public double getSinY()
      Description copied from interface: ILcdPoint
      Returns sin( getY() * DEG2RAD ).
      Specified by:
      getSinY in interface ILcdPoint
      Returns:
      sin( getY() * DEG2RAD ).
    • getSinX

      public double getSinX()
      Description copied from interface: ILcdPoint
      Returns sin( getX() * DEG2RAD ).
      Specified by:
      getSinX in interface ILcdPoint
      Returns:
      sin( getX() * DEG2RAD ).
    • getTanY

      public double getTanY()
      Description copied from interface: ILcdPoint
      Returns tan( getY() * DEG2RAD ).
      Specified by:
      getTanY in interface ILcdPoint
      Returns:
      tan( getY() * DEG2RAD ).
    • getTanX

      public double getTanX()
      Description copied from interface: ILcdPoint
      Returns tan( getX() * DEG2RAD ).
      Specified by:
      getTanX in interface ILcdPoint
      Returns:
      tan( getX() * DEG2RAD ).
    • move3D

      public void move3D(double aLon, double v, double aLat)
      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
      Parameters:
      aLon - the x coordinate of the point.
      v - the y coordinate of the point.
      aLat - the z coordinate of the point.
    • cloneAs2DEditablePoint

      public ILcd2DEditablePoint cloneAs2DEditablePoint()
      Description copied from interface: ILcdPoint
      Returns a copy of this ILcdPoint that is also an ILcd2DEditablePoint. This makes sure that the first two dimensions of the copy are writable,
      Specified by:
      cloneAs2DEditablePoint in interface ILcdPoint
      Returns:
      a copy of this ILcdPoint that is also an ILcd2DEditablePoint. This makes sure that the first two dimensions of the copy are writable, even if the original ILcdPoint object may be read-only.
      See Also:
    • cloneAs3DEditablePoint

      public ILcd3DEditablePoint cloneAs3DEditablePoint()
      Description copied from interface: ILcdPoint
      Returns a copy of this ILcdPoint that is also an ILcd3DEditablePoint. This makes sure that all three dimensions of the copy are writable,
      Specified by:
      cloneAs3DEditablePoint in interface ILcdPoint
      Returns:
      a copy of this ILcdPoint that is also an ILcd3DEditablePoint. This makes sure that all three dimensions of the copy are writable, even if the original ILcdPoint object may be read-only.
      See Also:
    • move2D

      public void move2D(double aX, double v)
      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
      Parameters:
      aX - the x coordinate of the point.
      v - the y 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
      Parameters:
      aPoint - the ILcdPoint to move to.
      See Also:
    • translate3D

      public void translate3D(double aDeltaX, double v, double aDeltaY)
      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
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      v - the y coordinate of the translation vector.
      aDeltaY - the z coordinate of the translation vector.
    • toString

      public String toString()
      Overrides:
      toString in class TLcdDataObject
    • move2D

      public void move2D(ILcdPoint a2DEditablePoint)
      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
      Parameters:
      a2DEditablePoint - the ILcdPoint to move to.
      See Also:
    • translate2D

      public void translate2D(double aDeltaX, double v)
      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
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      v - the y coordinate of the translation vector.
    • getFocusPoint

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

      public boolean contains2D(double aX, double v)
      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
      Parameters:
      aX - the x coordinate of the point.
      v - the y coordinate of the point.
      Returns:
      the boolean result of the containment test.
    • contains3D

      public boolean contains3D(double aX, double v, double aY)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given point in the 3D space.
      Specified by:
      contains3D in interface ILcdShape
      Parameters:
      aX - the x coordinate of the point.
      v - the y coordinate of the point.
      aY - the z coordinate of the point.
      Returns:
      the boolean result of the containment test.
    • 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
      Returns:
      the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
    • equals

      public boolean equals(Object aObject)
      Description copied from interface: ILcdPoint
      Checks whether this ILcdPoint is equal to the given Object.
      Specified by:
      equals in interface ILcdPoint
      Overrides:
      equals in class Object
      Parameters:
      aObject - the Object to compare to.
      Returns:
      false if aObject is an ILcdPoint object with different 3D coordinates or the object is not an ILcdPoint. If the objects do have the same 3D coordinates, the return value is defined by the specific implementations of ILcdPoint and may still be false.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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
      Parameters:
      aPoint - the ILcdPoint to test.
      Returns:
      the boolean result of the containment test.
      See Also:
    • 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
      Parameters:
      aPoint - the ILcdPoint to test.
      Returns:
      the boolean result of the containment test.
      See Also:
    • getLongitude

      public Double getLongitude()
      Returns the value of the property that maps to the longitude element.
      Returns:
      the value of the LONGITUDE_PROPERTY property.
    • setLongitude

      public void setLongitude(Double aValue)
      Sets the value of the property that maps to the longitude element.
      Parameters:
      aValue - the value to set for the LONGITUDE_PROPERTY property.
    • getLatitude

      public Double getLatitude()
      Returns the value of the property that maps to the latitude element.
      Returns:
      the value of the LATITUDE_PROPERTY property.
    • setLatitude

      public void setLatitude(Double aValue)
      Sets the value of the property that maps to the latitude element.
      Parameters:
      aValue - the value to set for the LATITUDE_PROPERTY property.
    • getAltitude

      public Double getAltitude()
      Returns the value of the property that maps to the altitude element.
      Returns:
      the value of the ALTITUDE_PROPERTY property.
    • setAltitude

      public void setAltitude(Double aValue)
      Sets the value of the property that maps to the altitude element.
      Parameters:
      aValue - the value to set for the ALTITUDE_PROPERTY property.