Class TLcdLonLatHeightPoint

All Implemented Interfaces:
ILcdBounded, ILcdBounds, ILcdPoint, ILcdPointList, ILcdPolypoint, ILcdShape, ILcd2DEditablePoint, ILcd2DEditableShape, ILcd3DEditablePoint, ILcd3DEditableShape, ILcdCloneable, Serializable, Cloneable
Direct Known Subclasses:
TLcdASDITrack, TLcdASTERIXTrack, TLcdLonLatHeightMPoint

public class TLcdLonLatHeightPoint extends ALcd3DEditablePoint implements ILcd3DEditablePoint
This class provides an implementation of ILcd3DEditablePoint in the geodetic space. This implementation caches the trigonometric function values of the coordinates.

All longitude/latitude coordinates are expressed in degrees. Heights are expressed in meters.

This class is thread-safe for concurrent read-only access of its contents. For read-write access, external locking must be used. Such locking is typically done at the model level.

Use as a domain object

If you plan on using TLcdLonLatHeightPoint as a domain object (e.g. using ILcdModel.addElement), please note that two TLcdLonLatHeightPoint instances are considered to be equal if they describe the same location. If location does not uniquely identify your domain objects, please override equals/hashcode to take the additional properties into account. Alternatively, one could consider every class instance different, resulting in these equals/hashcode implementations:

  public boolean equals( Object aObject ) {
    return aObject == this;
  }

  public int hashCode() {
    return System.identityHashCode( this );
  }
 
Failing to respect equals/hashcode may result in undesired behavior, for example when performing spatial queries, used during painting.
See Also:
  • Constructor Details

    • TLcdLonLatHeightPoint

      public TLcdLonLatHeightPoint(double aLon, double aLat, double aZ)
      Constructs a new TLcdLonLatHeightPoint with the given coordinates.
      Parameters:
      aLon - longitude in decimal degrees, positive for Eastern hemisphere, negative for Western hemisphere.
      aLat - latitude in decimal degrees, positive for Northern hemisphere, negative for Southern hemisphere.
      aZ - z coordinate in meters.
    • TLcdLonLatHeightPoint

      public TLcdLonLatHeightPoint()
    • TLcdLonLatHeightPoint

      public TLcdLonLatHeightPoint(ILcdPoint aPoint)
      Constructs and initializes a new TLcdLonLatHeightPoint with the same location as the given ILcdPoint.
      Parameters:
      aPoint - the point to be copied.
    • TLcdLonLatHeightPoint

      public TLcdLonLatHeightPoint(ILcdPoint aPoint, double aZ)
      Constructs and initializes a new TLcdLonLatHeightPoint at the given location.
      Parameters:
      aPoint - the point to be copied of which the first two coordinates will be used.
      aZ - the third coordinate.
  • Method Details

    • getLon

      public final double getLon()
    • getLat

      public final double getLat()
    • 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.
    • 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 ).
    • 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 ).
    • 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 ).
    • 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 ).
    • 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 ).
    • 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 ).
    • move3D

      public void move3D(double aLon, double aLat, double aZ)
      Sets the longitude and latitude of this ILcd3DEditablePoint.
      Specified by:
      move3D in interface ILcd3DEditableShape
      Parameters:
      aLon - longitude in decimal degrees, positive for Eastern hemisphere, negative for Western hemisphere.
      aLat - latitude in decimal degrees, positive for Northern hemisphere, negative for Southern hemisphere.
      aZ - height in meters.
    • 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)
      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.
    • 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.
    • equals

      public boolean equals(Object aObject)
      Checks whether the object has the same class as this object and whether the coordinates are equal or differ by 360 for longitudes.
      Specified by:
      equals in interface ILcdPoint
      Overrides:
      equals in class ALcdPoint
      Parameters:
      aObject - the object to check for equality
      Returns:
      true if the object has the same class and it has the same coordinates, taking into account a 360 degree difference for longitudes.
    • 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:
    • cloneAs2DEditableBounds

      public 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 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:
    • getHeight

      public double getHeight()
      Caution:returns the height of the bounds of this point, which is 0.0. This method is not an alternative to getZ().
      Specified by:
      getHeight in interface ILcdBounds
      Overrides:
      getHeight in class ALcdPoint
      Returns:
      0.0.
      See Also: