Class TLcdLonLatFloatPoint

All Implemented Interfaces:
ILcdBounded, ILcdBounds, ILcdPoint, ILcdPointList, ILcdPolypoint, ILcdShape, ILcd2DEditablePoint, ILcd2DEditableShape, ILcdCloneable, Serializable, Cloneable

public class TLcdLonLatFloatPoint extends ALcd2DEditablePoint implements ILcd2DEditablePoint
This class provides an implementation of ILcd2DEditablePoint in the geodetic space.

All longitude/latitude coordinates are expressed in degrees.

This class is thread-hostile, even for read-only access, since point instances are being reused from an internal pool.

See Also:
  • Constructor Details

    • TLcdLonLatFloatPoint

      public TLcdLonLatFloatPoint()
    • TLcdLonLatFloatPoint

      public TLcdLonLatFloatPoint(float aLongitude, float aLatitude)
    • TLcdLonLatFloatPoint

      public TLcdLonLatFloatPoint(double aLongitude, double aLatitude)
    • TLcdLonLatFloatPoint

      public TLcdLonLatFloatPoint(ILcdPoint aPoint)
  • Method Details

    • getX

      public final 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 final 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 final double getZ()
      Description copied from interface: ILcdPoint
      Returns the z coordinate of this ILcdPoint.
      Specified by:
      getZ in interface ILcdPoint
      Overrides:
      getZ in class ALcd2DEditablePoint
      Returns:
      0.
    • getCosX

      public final double getCosX()
      Description copied from interface: ILcdPoint
      Returns cos( getX() * DEG2RAD ).
      Specified by:
      getCosX in interface ILcdPoint
      Overrides:
      getCosX in class ALcdPoint
      Returns:
      cos( getX() * DEG2RAD ).
    • getCosY

      public final double getCosY()
      Description copied from interface: ILcdPoint
      Returns cos( getY() * DEG2RAD ).
      Specified by:
      getCosY in interface ILcdPoint
      Overrides:
      getCosY in class ALcdPoint
      Returns:
      cos( getY() * DEG2RAD ).
    • getSinX

      public final double getSinX()
      Description copied from interface: ILcdPoint
      Returns sin( getX() * DEG2RAD ).
      Specified by:
      getSinX in interface ILcdPoint
      Overrides:
      getSinX in class ALcdPoint
      Returns:
      sin( getX() * DEG2RAD ).
    • getSinY

      public final double getSinY()
      Description copied from interface: ILcdPoint
      Returns sin( getY() * DEG2RAD ).
      Specified by:
      getSinY in interface ILcdPoint
      Overrides:
      getSinY in class ALcdPoint
      Returns:
      sin( getY() * DEG2RAD ).
    • getTanX

      public final double getTanX()
      Description copied from interface: ILcdPoint
      Returns tan( getX() * DEG2RAD ).
      Specified by:
      getTanX in interface ILcdPoint
      Overrides:
      getTanX in class ALcdPoint
      Returns:
      tan( getX() * DEG2RAD ).
    • getTanY

      public final double getTanY()
      Description copied from interface: ILcdPoint
      Returns tan( getY() * DEG2RAD ).
      Specified by:
      getTanY in interface ILcdPoint
      Overrides:
      getTanY in class ALcdPoint
      Returns:
      tan( getY() * DEG2RAD ).
    • cloneAs2DEditablePoint

      public final 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 final 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 final void move2D(double aLon, double aLat)
      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:
      aLon - the x coordinate of the point.
      aLat - the y coordinate of the point.
    • contains2D

      public boolean contains2D(double aLon, double aLat)
      Description copied from class: ALcdPoint
      Checks whether this ALcdPoint is equal to the given point in the 2D cartesian plane.
      Specified by:
      contains2D in interface ILcdShape
      Overrides:
      contains2D in class ALcdPoint
      Parameters:
      aLon - the x coordinate of the point.
      aLat - the y coordinate of the point.
      Returns:
      the boolean result of the equality test.
    • interacts2D

      public boolean interacts2D(double aLon, double aLat, double aWidth, double aHeight)
      Description copied from interface: ILcdBounds
      Checks whether this ILcdBounds object interacts with the given rectangle in the 2D space. Only the first two dimensions of the ILcdBounds object are considered.

      If this bounds is undefined, the result is false.

      Specified by:
      interacts2D in interface ILcdBounds
      Overrides:
      interacts2D in class ALcdPoint
      Parameters:
      aLon - the x coordinate of the rectangle.
      aLat - the y coordinate of the rectangle.
      aWidth - the width of the rectangle.
      aHeight - the height of the rectangle.
      Returns:
      true if this ILcdBounds object touches or overlaps to any extent with the given rectangle, false otherwise.
    • contains2D

      public boolean contains2D(double aLon, double aLat, double aWidth, double aHeight)
      Description copied from interface: ILcdBounds
      Checks whether this ILcdBounds object contains the given rectangle in the 2D space. Only the first two dimensions of the ILcdBounds object are considered.

      If this bounds is undefined, the result is false.

      Specified by:
      contains2D in interface ILcdBounds
      Overrides:
      contains2D in class ALcdPoint
      Parameters:
      aLon - the x coordinate of the rectangle.
      aLat - the y coordinate of the rectangle.
      aWidth - the width of the rectangle.
      aHeight - the height of the rectangle.
      Returns:
      the boolean result of the containment test.
    • cloneAs2DEditableBounds

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

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

      public String toString()
      Overrides:
      toString in class ALcd2DEditablePoint
    • clone

      public Object clone()
      Description copied from class: ALcdShape
      Creates and returns a copy of this object, by delegating to Object.clone(). Extensions should delegate to this implementation with super.clone(), in order to create an object instance of the right type, with all fields copied. They then should explicitly clone any non-primitive fields for which a deeper clone is required.
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class ALcdShape
      See Also: