Class TLcdEllipsoid

java.lang.Object
com.luciad.geodesy.TLcdEllipsoid
All Implemented Interfaces:
ILcdEllipsoid, Serializable

public class TLcdEllipsoid extends Object implements ILcdEllipsoid
A TLcdEllipsoid represents an ellipsoid and is the implementation of an ILcdEllipsoid. Typically it is defined by:
  • a semiMajorRadius (usually represented by the letter a), and
  • a semiMinorRadius (usually represented by the letter b).
By default the WGS_1984 ellipsoid is created but the ellipsoidal parameters can be changed by the methods
  • initializeAB
  • initializeA1OverF
which also implies a change of name of the ellipsoid although this is not forced.

Many methods of the TLcdEllipsoid refer to specialist's knowledge and will not be explained here. Also the calculations involved are usually not trivial. We refer for more information to following references:

  1. Map Projections: Theory and Applications, 1990, Pearson
  2. Coordinate Systems and Map Projections, 2nd edition, 1992, Maling
  3. Map Projections: A Working Manual, 1987, Snyder
  4. Map Projections: A Reference Manual, 1995, Bugayevski and Snyder
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TLcdEllipsoid
    Default ellipsoid object representing the WGS1984 ellipsoid.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default ellipsoid construction is the WGS_1984 ellipsoid.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bufferContour2DOf2DPolylineSFCT(ILcdPointList aPointList, double aWidth, ILcd2DEditablePoint[] a2DEditablePointArraySFCT)
    Calculates the contour of the buffer/corridor along a given ILcdPointList at a given width.
    void
    bufferContour2DOfSegmentSFCT(ILcdPoint aStartPoint, ILcdPoint aEndPoint, double aWidth, ILcd2DEditablePoint[] a2DEditablePointArraySFCT)
    Calculates the contour of the rectangle defined by aStartPoint, aEndPoint, and aWidth, as an array of 4 ILcd2DEditablePoint objects.
    void
    The conformal spherical longitude/latitude for a given geodetic longitude/latitude.
    static double
    distanceToGeodesic(double aLon1, double aLat1, double aLon2, double aLat2, double aLon3, double aLat3, double aAngle)
    Calculates the distance between the geodesic (aLon1,aLat1)-(aLon2,aLat2) and point (aLon3,aLat3), at a certain angle aAngle.
    double
    distanceToGeodesic(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, double aAngle)
    Calculates the distance between the geodesic aP1-aP2 and the point aP3, at a certain angle aAngle.
    boolean
    equals(Object aEllipsoid)
    Overrides Object.equals.
    double
    forwardAzimuth2D(double aLon1, double aLat1, double aLon2, double aLat2)
    Calculates the forward azimuth of the geodesic line from aP1 to aP2 in radians ! Only the (x,y) coordinates (longitude and latitude) of the ILcdPoint objects are taken into account.
    double
    Calculates the forward azimuth of the geodesic line from aP1 to aP2 in radians ! Only the (x,y) coordinates (longitude and latitude) of the ILcdPoint objects are taken into account.
    double
    geoc2height(ILcdPoint aXYZGeocPoint)
    Calculates the height above the ellipsoid for a point defined in an Earth Centered, Earth Fixed XYZ Cartesian coordinate system.
    void
    geoc2llhSFCT(ILcdPoint aXYZPoint, ILcd3DEditablePoint aLLHPointSFCT)
    Coordinate conversion between Earth Centered, Earth Fixed XYZ Cartesian coordinate system and latitude-longitude-ellipsoidal height for the ellipsoid.
    double
    geodesicArea(ILcdPoint[] aPts, int aN)
    Calculates the geodesic surface area of a polygon given as an array of ILcdPoint objects.
    double
    geodesicDistance(double aLon1, double aLat1, double aLon2, double aLat2)
    Calculates the shortest distance between two arbitrary ILcdPoint objects aP1 and aP2 on the ellipsoid in meters.
    double
    Calculates the shortest distance between two arbitrary ILcdPoint objects aP1 and aP2 on the ellipsoid in meters.
    void
    geodesicPointSFCT(ILcdPoint aPoint, double aDistance, double aAzimuth, ILcd2DEditablePoint aGeodesicPointSFCT)
    Determines the ILcdPoint aGeodesicPoint on the geodesic through (aP1.getX(), aP1.getY()) located at a distance aDistance and forward azimuth aAzimuth.
    void
    geodesicPointSFCT(ILcdPoint aP1, ILcdPoint aP2, double aK, ILcd2DEditablePoint aGeodesicPointSFCT)
    Sets aGeodesicPointSFCT to an ILcdPoint on the geodesic line through the point aP1 and the point aP2, located at a fraction aK of the (shortest) distance between aP1 and aP2.
    double
    Gets the reciprocal of the flattening 1/f.
    double
    Gets the semiMajorRadius a.
    double
    Radius of auxiliary sphere of the ellipsoid.
    double
    Gets the semiMinorRadius b.
    double
    Radius of a sphere such that its meridional arc from 0 -> 90 degrees is equal to the corresponding meridional arc on the ellipsoid.
    double
    Gets the eccentricity e which is always positive.
    double
    Gets the eccentricitySquared e2 = (a2 - b2)/a2.
    double
    Gets the secondEccentricitySquared e' 2 = (a2 - b2 )/b2.
    double
    Gets the flattening f.
    double
    Gets n = (a - b)/(a + b).
    Gets the name of this ILcdEllipsoid.
    int
     
    void
    initializeA1OverF(double aA, double a1OverF)
    The ellipsoidal characteristics can be initialized by setting the semiMajorAxis a and the reciprocal of the flattening f.
    void
    initializeAB(double aA, double aB)
    The ellipsoidal characteristics can be initialized by setting the semiMajorAxis a and the semiMinorAxis b.
    void
    intersection2DLSSFCT(double aLon1, double aLat1, double aLon2, double aLat2, double aLon3, double aLat3, double aLon4, double aLat4, ILcd2DEditablePoint aLLPSFCT)
    Calculates the intersection of two geodesic lines going through the given coordinates.
    void
    Calculates the intersection of two geodesic lines going containing the given coordinates.
    boolean
    intersects2DLS(double aLon1, double aLat1, double aLon2, double aLat2, double aLon3, double aLat3, double aLon4, double aLat4)
    Checks whether two geodesic line segments with the given coordinates intersect.
    boolean
    Checks whether two geodesic line segments intersect.
    void
    The inverse transformation of the conformal spherical longitude/latitude.
    boolean
    Checks whether ellipsoid is the special case sphere.
    void
    llh2geocSFCT(ILcdPoint aLLHPoint, ILcd3DEditablePoint aXYZGeocentricPointSFCT)
    Coordinate conversion between latitude-longitude-ellipsoidal height for the ellipsoid and Earth Centered, Earth Fixed XYZ Cartesian coordinate system.
    double
    meridionalArcDistance(double aLatitude)
    Calculates the meridional arc distance in meters.
    double
    meridionalArcDistance(double aLatitude, double aCosLat, double aSinLat)
    Calculates the meridional arc distance in meters.
    double
    radiusEuler(double aLatitude, double aAzimuth)
    Euler radius of the ellipsoid at a given latitude aLatitude and a given azimuth aAzimuth.
    double
    radiusEuler(double aLatitude, double aSinLat, double aAzimuth, double aCosAzimuth, double aSinAzimuth)
    Euler radius of the ellipsoid at a given latitude aLatitude and a given azimuth aAzimuth.
    double
    radiusGaussian(double aLat)
    The Gaussian curvature radius is the geometric mean of the vertical and the meridional radius.
    double
    radiusGaussian(double aLat, double aSinLat)
    The Gaussian curvature radius is the geometric mean of the vertical and the meridional radius.
    double
    radiusMeridian(double aLatitude)
    Radius of curvature in prime meridian at a given geodetic latitude.
    double
    radiusMeridian(double aLatitude, double aSinLat)
    Radius of curvature in prime meridian at a given geodetic latitude.
    double
    radiusVertical(double aLatitude)
    Radius of curvature in prime vertical at a given geodetic latitude.
    double
    radiusVertical(double aLatitude, double aSinLat)
    Radius of curvature in prime vertical at a given geodetic latitude.
    double
    Calculates the azimuth of the rhumbline from aP1 to aP2 in degrees! Only the (x,y) coordinates (longitude and latitude) of the ILcdPoint objects are taken into account.
    double
    Calculates the distance between two arbitrary ILcdPoint objects aP1 and aP2 on the ellipsoid in meters following a path with constant azimuth.
    void
    rhumblinePointSFCT(ILcdPoint aPoint, double aDistance, double aAzimuth, ILcd2DEditablePoint aRhumblinePointSFCT)
    Determines the ILcdPoint aRhumblinePointSFCT on the rhumbline (a path with a constant bearing) through (aP1.getX(), aP1.getY()) located at a distance aDistance and forward azimuth aAzimuth.
    void
    setName(String aName)
    Sets the name of this ellipsoid.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT

      public static final TLcdEllipsoid DEFAULT
      Default ellipsoid object representing the WGS1984 ellipsoid.
  • Constructor Details

    • TLcdEllipsoid

      public TLcdEllipsoid()
      Default ellipsoid construction is the WGS_1984 ellipsoid.
  • Method Details

    • initializeAB

      public void initializeAB(double aA, double aB)
      The ellipsoidal characteristics can be initialized by setting the semiMajorAxis a and the semiMinorAxis b.
      Parameters:
      aA - radius of major axis.
      aB - radius of minor axis.
    • initializeA1OverF

      public void initializeA1OverF(double aA, double a1OverF)
      The ellipsoidal characteristics can be initialized by setting the semiMajorAxis a and the reciprocal of the flattening f.
      Parameters:
      aA - radius of major axis.
      a1OverF - reciprocal value of flattening.
    • getA

      public double getA()
      Description copied from interface: ILcdEllipsoid
      Gets the semiMajorRadius a.
      Specified by:
      getA in interface ILcdEllipsoid
      Returns:
      the SemiMajorRadius a.
    • getB

      public double getB()
      Description copied from interface: ILcdEllipsoid
      Gets the semiMinorRadius b.
      Specified by:
      getB in interface ILcdEllipsoid
      Returns:
      the SemiMinorRadius b.
    • get1OverF

      public double get1OverF()
      Description copied from interface: ILcdEllipsoid
      Gets the reciprocal of the flattening 1/f.
      Specified by:
      get1OverF in interface ILcdEllipsoid
      Returns:
      the reciprocal of the flattening 1/f.
    • getF

      public double getF()
      Description copied from interface: ILcdEllipsoid
      Gets the flattening f.
      Specified by:
      getF in interface ILcdEllipsoid
      Returns:
      the flattening f.
    • getE

      public double getE()
      Description copied from interface: ILcdEllipsoid
      Gets the eccentricity e which is always positive.
      Specified by:
      getE in interface ILcdEllipsoid
      Returns:
      the eccentricity e which is always positive.
    • getE2

      public double getE2()
      Description copied from interface: ILcdEllipsoid
      Gets the eccentricitySquared e2 = (a2 - b2)/a2.
      Specified by:
      getE2 in interface ILcdEllipsoid
      Returns:
      the eccentricitySquared e2 = (a2 - b2 )/a2.
    • getEMinor2

      public double getEMinor2()
      Description copied from interface: ILcdEllipsoid
      Gets the secondEccentricitySquared e' 2 = (a2 - b2 )/b2.
      Specified by:
      getEMinor2 in interface ILcdEllipsoid
      Returns:
      the secondEccentricitySquared e' 2 = (a2 - b2 )/b2 .
    • getN

      public double getN()
      Description copied from interface: ILcdEllipsoid
      Gets n = (a - b)/(a + b).
      Specified by:
      getN in interface ILcdEllipsoid
      Returns:
      n = (a - b)/(a + b).
    • isSphere

      public boolean isSphere()
      Description copied from interface: ILcdEllipsoid
      Checks whether ellipsoid is the special case sphere.
      Specified by:
      isSphere in interface ILcdEllipsoid
      Returns:
      true if and only if ellipsoid is a sphere.
    • radiusVertical

      public double radiusVertical(double aLatitude)
      Description copied from interface: ILcdEllipsoid
      Radius of curvature in prime vertical at a given geodetic latitude. Commonly referred to with a Greek letter n.
      Specified by:
      radiusVertical in interface ILcdEllipsoid
      Parameters:
      aLatitude - latitude, in degrees.
      Returns:
      the radius of curvature in prime vertical at a given geodetic latitude.
      See Also:
    • radiusVertical

      public double radiusVertical(double aLatitude, double aSinLat)
      Description copied from interface: ILcdEllipsoid
      Radius of curvature in prime vertical at a given geodetic latitude. Commonly referred to with a Greek letter n.
      Specified by:
      radiusVertical in interface ILcdEllipsoid
      Parameters:
      aLatitude - latitude, in degrees.
      aSinLat - the sine of the latitude.
      Returns:
      the radius of curvature in prime vertical at a given geodetic latitude.
      See Also:
    • radiusMeridian

      public double radiusMeridian(double aLatitude)
      Description copied from interface: ILcdEllipsoid
      Radius of curvature in prime meridian at a given geodetic latitude.
      Specified by:
      radiusMeridian in interface ILcdEllipsoid
      Parameters:
      aLatitude - latitude, in degrees.
      Returns:
      the radius of curvature in prime meridian at a given geodetic latitude.
      See Also:
    • radiusMeridian

      public double radiusMeridian(double aLatitude, double aSinLat)
      Description copied from interface: ILcdEllipsoid
      Radius of curvature in prime meridian at a given geodetic latitude.
      Specified by:
      radiusMeridian in interface ILcdEllipsoid
      Parameters:
      aLatitude - latitude, in degrees.
      aSinLat - the sine of the latitude.
      Returns:
      the radius of curvature in prime meridian at a given geodetic latitude.
    • meridionalArcDistance

      public double meridionalArcDistance(double aLatitude)
      Calculates the meridional arc distance in meters. The length of the arc measured from the plane of the equator to a point at latitude aLatitude. Since the earth is represented by a rotational ellipsoid the longitude is irrelevant.

      A truncated series expansion is listed in Coordinate Systems and Map Projections, 2nd edition, 1992, Maling. The authors derived more terms to obtain a better accuracy.

      Specified by:
      meridionalArcDistance in interface ILcdEllipsoid
      Parameters:
      aLatitude - latitude, in degrees.
      Returns:
      the meridional arc distance in meters.
      See Also:
    • meridionalArcDistance

      public double meridionalArcDistance(double aLatitude, double aCosLat, double aSinLat)
      Calculates the meridional arc distance in meters. The length of the arc measured from the plane of the equator to a point at latitude aLatitude. Since the earth is represented by a rotational ellipsoid the longitude is irrelevant.

      A truncated series expansion is listed in Coordinate Systems and Map Projections, 2nd edition, 1992, Maling. The authors derived more terms to obtain a better accuracy.

      Specified by:
      meridionalArcDistance in interface ILcdEllipsoid
      Parameters:
      aLatitude - latitude, in degrees.
      aCosLat - the cosine of the latitude.
      aSinLat - the sine of the latitude.
      Returns:
      the meridional arc distance in meters.
    • conformalSphericalLonLatPointSFCT

      public void conformalSphericalLonLatPointSFCT(ILcdPoint aLLP, ILcd2DEditablePoint aLLPSFCT)
      Description copied from interface: ILcdEllipsoid
      The conformal spherical longitude/latitude for a given geodetic longitude/latitude. These lon-lat-points are represented by ILcdPoint objects. A conformal projection is a projection for which the shape of a figure on the earth is preserved on the map. For a thorough understanding the reader is referred to the references.
      Specified by:
      conformalSphericalLonLatPointSFCT in interface ILcdEllipsoid
      Parameters:
      aLLP - Geodetic point on the ellipsoid.
      aLLPSFCT - Geodetic point on the conformal sphere.
    • inverseConformalSphericalLonLatPointSFCT

      public void inverseConformalSphericalLonLatPointSFCT(ILcdPoint aLLP, ILcd2DEditablePoint aLLPSFCT)
      Description copied from interface: ILcdEllipsoid
      The inverse transformation of the conformal spherical longitude/latitude.
      Specified by:
      inverseConformalSphericalLonLatPointSFCT in interface ILcdEllipsoid
      Parameters:
      aLLP - Geodetic point on the conformal sphere.
      aLLPSFCT - Geodetic point on the ellipsoid.
      See Also:
    • geoc2llhSFCT

      public void geoc2llhSFCT(ILcdPoint aXYZPoint, ILcd3DEditablePoint aLLHPointSFCT)
      Coordinate conversion between Earth Centered, Earth Fixed XYZ Cartesian coordinate system and latitude-longitude-ellipsoidal height for the ellipsoid.

      The direct solution implemented here is taken from Peter Dana's page on "Geodetic datum overview": https://foote.geography.uconn.edu/gcraft/notes/datum/datum.html. This solution is an approximation by only including terms up to e2.

      Specified by:
      geoc2llhSFCT in interface ILcdEllipsoid
      Parameters:
      aXYZPoint - geocentric 3D point.
      aLLHPointSFCT - lonLatHeight coordinates to be set.
    • geoc2height

      public double geoc2height(ILcdPoint aXYZGeocPoint)
      Description copied from interface: ILcdEllipsoid
      Calculates the height above the ellipsoid for a point defined in an Earth Centered, Earth Fixed XYZ Cartesian coordinate system.
      Specified by:
      geoc2height in interface ILcdEllipsoid
      Parameters:
      aXYZGeocPoint - geocentric 3D point
      Returns:
      the height above the ellipsoid
    • llh2geocSFCT

      public void llh2geocSFCT(ILcdPoint aLLHPoint, ILcd3DEditablePoint aXYZGeocentricPointSFCT)
      Coordinate conversion between latitude-longitude-ellipsoidal height for the ellipsoid and Earth Centered, Earth Fixed XYZ Cartesian coordinate system.

      The solution implemented here is taken from Peter Dana's page on "Geodetic datum overview": https://foote.geography.uconn.edu/gcraft/notes/datum/datum.html.

      Specified by:
      llh2geocSFCT in interface ILcdEllipsoid
      Parameters:
      aLLHPoint - lonLatHeight point.
      aXYZGeocentricPointSFCT - Geocentric coordinates to be set.
    • getAuxRadius

      public double getAuxRadius()
      Radius of auxiliary sphere of the ellipsoid. The simplest choice is to take the semiMajorAxis of the ellipsoid.

      Simplest choice of radius of auxiliary sphere returns the major semi-axis.

      Specified by:
      getAuxRadius in interface ILcdEllipsoid
      Returns:
      the major semi-axis a.
    • getConformalRadius

      public double getConformalRadius()
      Description copied from interface: ILcdEllipsoid
      Radius of a sphere such that its meridional arc from 0 -> 90 degrees is equal to the corresponding meridional arc on the ellipsoid.
      Specified by:
      getConformalRadius in interface ILcdEllipsoid
      Returns:
      the radius of a sphere such that its meridional arc from 0 -> 90 degrees is equal to the corresponding meridional arc on the ellipsoid.
    • geodesicDistance

      public double geodesicDistance(double aLon1, double aLat1, double aLon2, double aLat2)
      Description copied from interface: ILcdEllipsoid
      Calculates the shortest distance between two arbitrary ILcdPoint objects aP1 and aP2 on the ellipsoid in meters.
      Specified by:
      geodesicDistance in interface ILcdEllipsoid
      Parameters:
      aLon1 - longitude, in degrees, of the start point of the geodesic line segment.
      aLat1 - latitude, in degrees, of the start point of the geodesic line segment.
      aLon2 - longitude, in degrees, of the end point of the geodesic line segment.
      aLat2 - latitude, in degrees, of the end point of the geodesic line segment.
      Returns:
      the same as geodesicDistance(ILcdPoint aP1, ILcdPoint aP2) if aP1 would be an ILcdPoint with lon-lat coordinates (aLongitude1,aLatitude1) and aP2 would be a ILcdPoint with lon-lat coordinates (aLongitude2,aLatitude2).
      See Also:
    • geodesicDistance

      public double geodesicDistance(ILcdPoint aP1, ILcdPoint aP2)
      Description copied from interface: ILcdEllipsoid
      Calculates the shortest distance between two arbitrary ILcdPoint objects aP1 and aP2 on the ellipsoid in meters. The curve that represents this shortest path is known as the geodesic curve. Only the longitude and the latitude of the two geodetic coordinates are taken into account.
      Specified by:
      geodesicDistance in interface ILcdEllipsoid
      Parameters:
      aP1 - start point of geodesic line segment.
      aP2 - end point of geodesic line segment.
      Returns:
      the shortest distance between aP1 and aP2 on the ellipsoid in meters.
    • distanceToGeodesic

      public double distanceToGeodesic(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, double aAngle)
      Calculates the distance between the geodesic aP1-aP2 and the point aP3, at a certain angle aAngle. Returns result in degrees.

      The current implementation calculates the distance using a spherical approximation.

      Specified by:
      distanceToGeodesic in interface ILcdEllipsoid
      Parameters:
      aP1 - defining point of geodesic line.
      aP2 - defining point of geodesic line.
      aP3 - point from which the distance needs to be calculated.
      aAngle - defines the angle between the geodesic lines defined by the point aP3 and the point of crossing and the geodesic line defined by aP1 and aP2 and the point of crossing. Should be specified in degrees.
      Returns:
      the distance in degrees.
      See Also:
    • distanceToGeodesic

      public static double distanceToGeodesic(double aLon1, double aLat1, double aLon2, double aLat2, double aLon3, double aLat3, double aAngle)
      Calculates the distance between the geodesic (aLon1,aLat1)-(aLon2,aLat2) and point (aLon3,aLat3), at a certain angle aAngle. Returns result in degrees.

      Note: this method uses the spherical approximation from TLspSphereUtil, see TLcdSphereUtil.distanceToGeodesic().

      Parameters:
      aLon1 - longitude of first end point of geodesic line.
      aLat1 - latitude of first end point of geodesic line.
      aLon2 - longitude of second end point of geodesic line.
      aLat2 - latitude of second end point of geodesic line.
      aLon3 - longitude of point from which the distance has to be calculated.
      aLat3 - latitude of point from which the distance has to be calculated.
      aAngle - defines the angle between the geodesic defined by (aLon3,aLat3) and the point of crossing and the geodesic defined by (aLon1,aLat1) and (aLon2,aLat2).
      Returns:
      the distance in degrees.
      See Also:
    • geodesicArea

      public double geodesicArea(ILcdPoint[] aPts, int aN)
      Calculates the geodesic surface area of a polygon given as an array of ILcdPoint objects. The segments of the polygon must not be self-intersecting. Only the longitude and latitude of the coordinates are taken into account.

      Constraint: (aN > 2) and (aPts.length > aN).

      This is an approximation based on the spherical formulae using a Gaussian radius. The value returned is always positive, regardless of the orientation of the points.

      Specified by:
      geodesicArea in interface ILcdEllipsoid
      Parameters:
      aPts - an array of ILcdPoint objects.
      aN - aPts[0..aN-1] defines the polygon on the ellipsoid.
      Returns:
      the geodesic surface area of a polygon on the ellipsoid.
    • radiusGaussian

      public double radiusGaussian(double aLat)
      Description copied from interface: ILcdEllipsoid
      The Gaussian curvature radius is the geometric mean of the vertical and the meridional radius. See p. 78 of Coordinate Systems and Map Projections , 2nd edition, 1992, Maling. Often used as the basis for conformal spherical calculations.
      Specified by:
      radiusGaussian in interface ILcdEllipsoid
      Parameters:
      aLat - latitude, in degrees
      Returns:
      the Gaussian curvature radius.
      See Also:
    • radiusGaussian

      public double radiusGaussian(double aLat, double aSinLat)
      Description copied from interface: ILcdEllipsoid
      The Gaussian curvature radius is the geometric mean of the vertical and the meridional radius. See p. 78 of Coordinate Systems and Map Projections , 2nd edition, 1992, Maling. Often used as the basis for conformal spherical calculations.
      Specified by:
      radiusGaussian in interface ILcdEllipsoid
      Parameters:
      aLat - latitude, in degrees
      aSinLat - the sine of the latitude.
      Returns:
      the Gaussian curvature radius.
      See Also:
    • radiusEuler

      public double radiusEuler(double aLatitude, double aAzimuth)
      Description copied from interface: ILcdEllipsoid
      Euler radius of the ellipsoid at a given latitude aLatitude and a given azimuth aAzimuth. The euler radius is the mean radius of the spheroidal arc at the given latitude for the given azimuth.
      Specified by:
      radiusEuler in interface ILcdEllipsoid
      Parameters:
      aLatitude - latitude, in arc degrees.
      aAzimuth - azimuth, in RADIANS .
      Returns:
      the Euler radius of the ellipsoid at the given latitude.
      See Also:
    • radiusEuler

      public double radiusEuler(double aLatitude, double aSinLat, double aAzimuth, double aCosAzimuth, double aSinAzimuth)
      Description copied from interface: ILcdEllipsoid
      Euler radius of the ellipsoid at a given latitude aLatitude and a given azimuth aAzimuth. The euler radius is the mean radius of the spheroidal arc at the given latitude for the given azimuth.
      Specified by:
      radiusEuler in interface ILcdEllipsoid
      Parameters:
      aLatitude - latitude, in arc degrees.
      aSinLat - the sine of the latitude.
      aAzimuth - azimuth, in RADIANS .
      aCosAzimuth - the cosine of the azimuth.
      aSinAzimuth - the sine of the azimuth.
      Returns:
      the Euler radius of the ellipsoid at the given latitude.
    • forwardAzimuth2D

      public double forwardAzimuth2D(ILcdPoint aP1, ILcdPoint aP2)

      Calculates the forward azimuth of the geodesic line from aP1 to aP2 in radians ! Only the (x,y) coordinates (longitude and latitude) of the ILcdPoint objects are taken into account.

      The forward azimuth lies between [0.0, 2.0*Math.PI], with 0.0 north, clockwise.

      Implementation of Vincenty's formula.

      Specified by:
      forwardAzimuth2D in interface ILcdEllipsoid
      Parameters:
      aP1 - start point of the geodesic line segment.
      aP2 - end point of the geodesic line segment.
      Returns:
      the forward azimuth from aP1 to aP2 in radians!
      See Also:
    • forwardAzimuth2D

      public double forwardAzimuth2D(double aLon1, double aLat1, double aLon2, double aLat2)
      Description copied from interface: ILcdEllipsoid

      Calculates the forward azimuth of the geodesic line from aP1 to aP2 in radians ! Only the (x,y) coordinates (longitude and latitude) of the ILcdPoint objects are taken into account.

      The forward azimuth lies between [0.0, 2.0*Math.PI], with 0.0 north, clockwise.

      Specified by:
      forwardAzimuth2D in interface ILcdEllipsoid
      Parameters:
      aLon1 - longitude, in degrees, of the start point of the geodesic line segment.
      aLat1 - latitude, in degrees, of the start point of the geodesic line segment.
      aLon2 - longitude, in degrees, of the end point of the geodesic line segment.
      aLat2 - latitude, in degrees, of the end point of the geodesic line segment.
      Returns:
      the forward azimuth from (aLongitude1,aLatitude1) to (aLongitude2,aLatitude2) in radians!
    • geodesicPointSFCT

      public void geodesicPointSFCT(ILcdPoint aP1, ILcdPoint aP2, double aK, ILcd2DEditablePoint aGeodesicPointSFCT)
      Sets aGeodesicPointSFCT to an ILcdPoint on the geodesic line through the point aP1 and the point aP2, located at a fraction aK of the (shortest) distance between aP1 and aP2.

      Implementation is based on the inverse and forward formulas of Vincenty.

      Specified by:
      geodesicPointSFCT in interface ILcdEllipsoid
      Parameters:
      aP1 - first 2D point on the ellipsoid [aP1.getX(), aP1.getY()].
      aP2 - second 2D point on the ellipsoid [aP2.getX(), aP2.getY()].
      aK - fraction between 0.0 and 1.0.
      aGeodesicPointSFCT - side effect parameter that contains the result upon return of the method.
      See Also:
    • geodesicPointSFCT

      public void geodesicPointSFCT(ILcdPoint aPoint, double aDistance, double aAzimuth, ILcd2DEditablePoint aGeodesicPointSFCT)
      Determines the ILcdPoint aGeodesicPoint on the geodesic through (aP1.getX(), aP1.getY()) located at a distance aDistance and forward azimuth aAzimuth.

      Vincenty's forward formula is implemented. This formula may be used for lines ranging from a few centimeter to nearly 20000km, with millimeter accuracy.

      The implementation of Vincenty's forward formula is described in:

      1. Geocentric Datum of Australia: Technical Manual, available at http://www.icsm.gov.au/sites/default/files/2017-09/gda-v_2.4_0.pdf.
      2. Vincenty, T., Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations, Survey Review XXII, 176, April 1975.
      Specified by:
      geodesicPointSFCT in interface ILcdEllipsoid
      Parameters:
      aPoint - ILcdPoint on the ellipsoid.
      aDistance - distance expressed in meters. If the distance is smaller than 0, this method will return the input point as result.
      aAzimuth - forward azimuth expressed in degrees.
      aGeodesicPointSFCT - side effect parameter that contains the result upon return of the method.
      See Also:
    • rhumblineAzimuth2D

      public double rhumblineAzimuth2D(ILcdPoint aP1, ILcdPoint aP2)
      Description copied from interface: ILcdEllipsoid

      Calculates the azimuth of the rhumbline from aP1 to aP2 in degrees! Only the (x,y) coordinates (longitude and latitude) of the ILcdPoint objects are taken into account.

      The forward azimuth lies between [0.0, 360.0], with 0.0 north, clockwise.

      Specified by:
      rhumblineAzimuth2D in interface ILcdEllipsoid
      Parameters:
      aP1 - start point of rhumbline segment.
      aP2 - end point of rhumbline segment.
      Returns:
      the forward azimuth from aP1 to aP2 in DEGREES!
    • rhumblineDistance

      public double rhumblineDistance(ILcdPoint aP1, ILcdPoint aP2)
      Description copied from interface: ILcdEllipsoid
      Calculates the distance between two arbitrary ILcdPoint objects aP1 and aP2 on the ellipsoid in meters following a path with constant azimuth. The curve that represents this path is known as the rhumbline. Only the longitude and the latitude of the two geodetic coordinates are taken into account.
      Specified by:
      rhumblineDistance in interface ILcdEllipsoid
      Parameters:
      aP1 - start point of rhumbline segment.
      aP2 - end point of rhumbline segment.
      Returns:
      the rhumbline distance between aP1 and aP2 on the ellipsoid in meters.
    • rhumblinePointSFCT

      public void rhumblinePointSFCT(ILcdPoint aPoint, double aDistance, double aAzimuth, ILcd2DEditablePoint aRhumblinePointSFCT)
      Description copied from interface: ILcdEllipsoid
      Determines the ILcdPoint aRhumblinePointSFCT on the rhumbline (a path with a constant bearing) through (aP1.getX(), aP1.getY()) located at a distance aDistance and forward azimuth aAzimuth.
      Specified by:
      rhumblinePointSFCT in interface ILcdEllipsoid
      Parameters:
      aPoint - ILcdPoint on the ellipsoid.
      aDistance - distance expressed in meters.
      aAzimuth - forward azimuth expressed in degrees.
      aRhumblinePointSFCT - ILcdPoint on the ellipsoid.
    • intersects2DLS

      public boolean intersects2DLS(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, ILcdPoint aP4)
      Checks whether two geodesic line segments intersect. Any intersection will always lie on both segments (i.e. between aP1 and aP2, and between aP3 and aP4).

      Refer to TLcdEllipsoidUtil.intersectionGeodesicGeodesic(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.geodesy.ILcdEllipsoid, com.luciad.shape.shape2D.ILcd2DEditablePoint) for checking the intersection of entire geodesics.

      Specified by:
      intersects2DLS in interface ILcdEllipsoid
      Parameters:
      aP1 - start point of the first line segment.
      aP2 - end point of the first line segment.
      aP3 - start point of the second line segment.
      aP4 - end point of the second line segment.
      Returns:
      true if the segments intersect each other, false otherwise.
      See Also:
    • intersects2DLS

      public boolean intersects2DLS(double aLon1, double aLat1, double aLon2, double aLat2, double aLon3, double aLat3, double aLon4, double aLat4)
      Checks whether two geodesic line segments with the given coordinates intersect. Any intersection will always lie on both segments (i.e. between the points (aLon1,aLat1) and (aLon2,aLat2), and between (aLon3,aLat3) and (aLon4,aLat4).

      Refer to TLcdEllipsoidUtil.intersectionGeodesicGeodesic(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.geodesy.ILcdEllipsoid, com.luciad.shape.shape2D.ILcd2DEditablePoint) for checking the intersection of entire geodesics.

      Specified by:
      intersects2DLS in interface ILcdEllipsoid
      Parameters:
      aLon1 - longitude of the start point of the first geodesic line segment.
      aLat1 - latitude of the start point of the first geodesic line segment.
      aLon2 - longitude of the end point of the first geodesic line segment.
      aLat2 - latitude of the end point of the first geodesic line segment.
      aLon3 - longitude of the start point of the first geodesic line segment.
      aLat3 - latitude of the start point of the first geodesic line segment.
      aLon4 - longitude of the end point of the first geodesic line segment.
      aLat4 - latitude of the end point of the first geodesic line segment.
      Returns:
      true if geodesic line segments intersect each other, false otherwise.
      See Also:
    • intersection2DLSSFCT

      public void intersection2DLSSFCT(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, ILcdPoint aP4, ILcd2DEditablePoint aLLPSFCT)
      Calculates the intersection of two geodesic lines going containing the given coordinates. The intersection will always lie on both segments (i.e. between aP1 and aP2, and between aP3 and aP4).

      Refer to TLcdEllipsoidUtil.intersectionGeodesicGeodesic(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.geodesy.ILcdEllipsoid, com.luciad.shape.shape2D.ILcd2DEditablePoint) for checking the intersection of entire geodesics.

      The points aP1 and aP2 should not coincide nor should the points aP3 and aP4. A RuntimeException is thrown in case the two geodesics overlap or do not intersect.

      Specified by:
      intersection2DLSSFCT in interface ILcdEllipsoid
      Parameters:
      aP1 - start point of the first geodesic line segment.
      aP2 - end point of the first geodesic line segment.
      aP3 - start point of the second geodesic line segment.
      aP4 - end point of the second geodesic line segment.
      aLLPSFCT - represents the intersection point on return of the method.
    • intersection2DLSSFCT

      public void intersection2DLSSFCT(double aLon1, double aLat1, double aLon2, double aLat2, double aLon3, double aLat3, double aLon4, double aLat4, ILcd2DEditablePoint aLLPSFCT)
      Calculates the intersection of two geodesic lines going through the given coordinates. Any intersection will always lie on both segments (i.e. between the points (aLon1,aLat1) and (aLon2,aLat2), and between (aLon3,aLat3) and (aLon4,aLat4).

      Refer to TLcdEllipsoidUtil.intersectionGeodesicGeodesic(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.geodesy.ILcdEllipsoid, com.luciad.shape.shape2D.ILcd2DEditablePoint) for checking the intersection of entire geodesics.

      The points (aLon1,aLat1) and (aLon2,aLat2 should not coincide nor should the points (aLon3,aLat3) and (aLon4,aLat4). A RuntimeException is thrown in case the two geodesics overlap or do not intersect.

      Specified by:
      intersection2DLSSFCT in interface ILcdEllipsoid
      Parameters:
      aLon1 - longitude of the start point of the first geodesic line segment.
      aLat1 - latitude of the start point of the first geodesic line segment.
      aLon2 - longitude of the end point of the first geodesic line segment.
      aLat2 - latitude of the end point of the first geodesic line segment.
      aLon3 - longitude of the start point of the first geodesic line segment.
      aLat3 - latitude of the start point of the first geodesic line segment.
      aLon4 - longitude of the end point of the first geodesic line segment.
      aLat4 - latitude of the end point of the first geodesic line segment.
      aLLPSFCT - represents the intersection point on return of the method.
    • bufferContour2DOfSegmentSFCT

      public void bufferContour2DOfSegmentSFCT(ILcdPoint aStartPoint, ILcdPoint aEndPoint, double aWidth, ILcd2DEditablePoint[] a2DEditablePointArraySFCT)
      Calculates the contour of the rectangle defined by aStartPoint, aEndPoint, and aWidth, as an array of 4 ILcd2DEditablePoint objects. The ordering of the points of the contour is clockwise starting from the first point of the rectangle.

      Because there are only 4 points used to define the contour, the contour representation becomes less accurate when the start and end point are further removed from each other: the connected contour lines no longer lie at the given distance from the axis at each intermediate point. For a more accurate calculation of a buffer contour that uses additional contour points if necessary, please refer to TLcdEllipsoidUtil#computeBufferContour2D.

      Uses TLcdSphereUtil.bufferContour2DOfSegmentSFCT(aStartPoint,aEndPoint,aWidth,getA(),a2DEditablePointArraySFCT).

      Specified by:
      bufferContour2DOfSegmentSFCT in interface ILcdEllipsoid
      Parameters:
      aStartPoint - start point of buffer segment.
      aEndPoint - end point of buffer segment.
      aWidth - distance from the line segment to the contour in meters.
      a2DEditablePointArraySFCT - an initialized array of 4 ILcd2DEditablePoint objects, which will represent the contour polygon.
      See Also:
    • bufferContour2DOf2DPolylineSFCT

      public void bufferContour2DOf2DPolylineSFCT(ILcdPointList aPointList, double aWidth, ILcd2DEditablePoint[] a2DEditablePointArraySFCT)
      Calculates the contour of the buffer/corridor along a given ILcdPointList at a given width. The ordering of the points of the contour is clockwise starting from the first point of the rectangle.

      This implementation has the following limitations:

      • contours with holes (i.e., caused by axis intersections) cannot be represented, since the contour is modeled as an ILcd2DEditablePoint array,
      • the corners of the contour at the axis points are sharp instead of rounded, which make it less suitable for buffers that have sharp angles between its consecutive axis segments; it has also has as consequence that the distance between the contour and the axis exceeds the given buffer distance in the corners,
      • the calculated contour is only an estimate, because it uses a reduced number of contour points; when the start and end point of a segment are further removed from each other, the connected contour lines no longer lie at the given distance from the axis at each intermediate point.
      For an improved calculation of a buffer contour that overcomes these limitations, please refer to TLcdEllipsoidUtil#computeBufferContour2D.

      Uses TLcdSphereUtil.bufferContour2DOf2DPolyline(aStartPoint,aEndPoint,aWidth,getA(),a2DEditablePointArraySFCT).

      Specified by:
      bufferContour2DOf2DPolylineSFCT in interface ILcdEllipsoid
      Parameters:
      aPointList - the axis of the buffer.
      aWidth - distance from the axis to the contour in meters.
      a2DEditablePointArraySFCT - an initialized array of aPointList.getPointCount() * 2 ILcd2DEditablePoint objects, which will represent the contour polygon.
      See Also:
    • getName

      public String getName()
      Description copied from interface: ILcdEllipsoid
      Gets the name of this ILcdEllipsoid.
      Specified by:
      getName in interface ILcdEllipsoid
      Returns:
      the name of this ILcdEllipsoid.
    • setName

      public void setName(String aName)
      Sets the name of this ellipsoid.
      Parameters:
      aName - name of the ellipsoid represented by this ILcdEllipsoid.
      See Also:
    • equals

      public boolean equals(Object aEllipsoid)
      Description copied from interface: ILcdEllipsoid
      Overrides Object.equals.
      Specified by:
      equals in interface ILcdEllipsoid
      Overrides:
      equals in class Object
      Parameters:
      aEllipsoid - Object to be checked on.
      Returns:
      true if both objects are equal.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object