Class TLcdEllipsoid
- All Implemented Interfaces:
ILcdEllipsoid,Serializable
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).
- initializeAB
- initializeA1OverF
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:
- Map Projections: Theory and Applications, 1990, Pearson
- Coordinate Systems and Map Projections, 2nd edition, 1992, Maling
- Map Projections: A Working Manual, 1987, Snyder
- Map Projections: A Reference Manual, 1995, Bugayevski and Snyder
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TLcdEllipsoidDefault ellipsoid object representing the WGS1984 ellipsoid. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbufferContour2DOf2DPolylineSFCT(ILcdPointList aPointList, double aWidth, ILcd2DEditablePoint[] a2DEditablePointArraySFCT) Calculates the contour of the buffer/corridor along a givenILcdPointListat a given width.voidbufferContour2DOfSegmentSFCT(ILcdPoint aStartPoint, ILcdPoint aEndPoint, double aWidth, ILcd2DEditablePoint[] a2DEditablePointArraySFCT) Calculates the contour of the rectangle defined byaStartPoint,aEndPoint, andaWidth, as an array of 4ILcd2DEditablePointobjects.voidconformalSphericalLonLatPointSFCT(ILcdPoint aLLP, ILcd2DEditablePoint aLLPSFCT) The conformal spherical longitude/latitude for a given geodetic longitude/latitude.static doubledistanceToGeodesic(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 angleaAngle.doubledistanceToGeodesic(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, double aAngle) Calculates the distance between the geodesicaP1-aP2and the pointaP3, at a certain angleaAngle.booleanOverrides Object.equals.doubleforwardAzimuth2D(double aLon1, double aLat1, double aLon2, double aLat2) Calculates the forward azimuth of the geodesic line fromaP1toaP2in radians ! Only the (x,y) coordinates (longitude and latitude) of theILcdPointobjects are taken into account.doubleforwardAzimuth2D(ILcdPoint aP1, ILcdPoint aP2) Calculates the forward azimuth of the geodesic line fromaP1toaP2in radians ! Only the (x,y) coordinates (longitude and latitude) of theILcdPointobjects are taken into account.doublegeoc2height(ILcdPoint aXYZGeocPoint) Calculates the height above the ellipsoid for a point defined in an Earth Centered, Earth Fixed XYZ Cartesian coordinate system.voidgeoc2llhSFCT(ILcdPoint aXYZPoint, ILcd3DEditablePoint aLLHPointSFCT) Coordinate conversion between Earth Centered, Earth Fixed XYZ Cartesian coordinate system and latitude-longitude-ellipsoidal height for the ellipsoid.doublegeodesicArea(ILcdPoint[] aPts, int aN) Calculates the geodesic surface area of a polygon given as an array ofILcdPointobjects.doublegeodesicDistance(double aLon1, double aLat1, double aLon2, double aLat2) Calculates the shortest distance between two arbitraryILcdPointobjectsaP1andaP2on the ellipsoid in meters.doublegeodesicDistance(ILcdPoint aP1, ILcdPoint aP2) Calculates the shortest distance between two arbitraryILcdPointobjectsaP1andaP2on the ellipsoid in meters.voidgeodesicPointSFCT(ILcdPoint aPoint, double aDistance, double aAzimuth, ILcd2DEditablePoint aGeodesicPointSFCT) Determines theILcdPointaGeodesicPointon the geodesic through(aP1.getX(), aP1.getY())located at a distanceaDistanceand forward azimuthaAzimuth.voidgeodesicPointSFCT(ILcdPoint aP1, ILcdPoint aP2, double aK, ILcd2DEditablePoint aGeodesicPointSFCT) SetsaGeodesicPointSFCTto anILcdPointon the geodesic line through the pointaP1and the pointaP2, located at a fractionaKof the (shortest) distance betweenaP1andaP2.doubleGets the reciprocal of the flattening 1/f.doublegetA()Gets the semiMajorRadius a.doubleRadius of auxiliary sphere of the ellipsoid.doublegetB()Gets the semiMinorRadius b.doubleRadius of a sphere such that its meridional arc from 0 -> 90 degrees is equal to the corresponding meridional arc on the ellipsoid.doublegetE()Gets the eccentricity e which is always positive.doublegetE2()Gets the eccentricitySquared e2 = (a2 - b2)/a2.doubleGets the secondEccentricitySquared e' 2 = (a2 - b2 )/b2.doublegetF()Gets the flattening f.doublegetN()Gets n = (a - b)/(a + b).getName()Gets the name of thisILcdEllipsoid.inthashCode()voidinitializeA1OverF(double aA, double a1OverF) The ellipsoidal characteristics can be initialized by setting the semiMajorAxis a and the reciprocal of the flattening f.voidinitializeAB(double aA, double aB) The ellipsoidal characteristics can be initialized by setting the semiMajorAxis a and the semiMinorAxis b.voidintersection2DLSSFCT(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.voidintersection2DLSSFCT(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, ILcdPoint aP4, ILcd2DEditablePoint aLLPSFCT) Calculates the intersection of two geodesic lines going containing the given coordinates.booleanintersects2DLS(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.booleanintersects2DLS(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, ILcdPoint aP4) Checks whether two geodesic line segments intersect.voidinverseConformalSphericalLonLatPointSFCT(ILcdPoint aLLP, ILcd2DEditablePoint aLLPSFCT) The inverse transformation of the conformal spherical longitude/latitude.booleanisSphere()Checks whether ellipsoid is the special case sphere.voidllh2geocSFCT(ILcdPoint aLLHPoint, ILcd3DEditablePoint aXYZGeocentricPointSFCT) Coordinate conversion between latitude-longitude-ellipsoidal height for the ellipsoid and Earth Centered, Earth Fixed XYZ Cartesian coordinate system.doublemeridionalArcDistance(double aLatitude) Calculates the meridional arc distance in meters.doublemeridionalArcDistance(double aLatitude, double aCosLat, double aSinLat) Calculates the meridional arc distance in meters.doubleradiusEuler(double aLatitude, double aAzimuth) Euler radius of the ellipsoid at a given latitudeaLatitudeand a given azimuthaAzimuth.doubleradiusEuler(double aLatitude, double aSinLat, double aAzimuth, double aCosAzimuth, double aSinAzimuth) Euler radius of the ellipsoid at a given latitudeaLatitudeand a given azimuthaAzimuth.doubleradiusGaussian(double aLat) The Gaussian curvature radius is the geometric mean of the vertical and the meridional radius.doubleradiusGaussian(double aLat, double aSinLat) The Gaussian curvature radius is the geometric mean of the vertical and the meridional radius.doubleradiusMeridian(double aLatitude) Radius of curvature in prime meridian at a given geodetic latitude.doubleradiusMeridian(double aLatitude, double aSinLat) Radius of curvature in prime meridian at a given geodetic latitude.doubleradiusVertical(double aLatitude) Radius of curvature in prime vertical at a given geodetic latitude.doubleradiusVertical(double aLatitude, double aSinLat) Radius of curvature in prime vertical at a given geodetic latitude.doublerhumblineAzimuth2D(ILcdPoint aP1, ILcdPoint aP2) Calculates the azimuth of the rhumbline fromaP1toaP2in degrees! Only the (x,y) coordinates (longitude and latitude) of theILcdPointobjects are taken into account.doublerhumblineDistance(ILcdPoint aP1, ILcdPoint aP2) Calculates the distance between two arbitraryILcdPointobjectsaP1andaP2on the ellipsoid in meters following a path with constant azimuth.voidrhumblinePointSFCT(ILcdPoint aPoint, double aDistance, double aAzimuth, ILcd2DEditablePoint aRhumblinePointSFCT) Determines theILcdPointaRhumblinePointSFCTon the rhumbline (a path with a constant bearing) through(aP1.getX(), aP1.getY())located at a distanceaDistanceand forward azimuthaAzimuth.voidSets the name of this ellipsoid.toString()
-
Field Details
-
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:ILcdEllipsoidGets the semiMajorRadius a.- Specified by:
getAin interfaceILcdEllipsoid- Returns:
- the SemiMajorRadius a.
-
getB
public double getB()Description copied from interface:ILcdEllipsoidGets the semiMinorRadius b.- Specified by:
getBin interfaceILcdEllipsoid- Returns:
- the SemiMinorRadius b.
-
get1OverF
public double get1OverF()Description copied from interface:ILcdEllipsoidGets the reciprocal of the flattening 1/f.- Specified by:
get1OverFin interfaceILcdEllipsoid- Returns:
- the reciprocal of the flattening 1/f.
-
getF
public double getF()Description copied from interface:ILcdEllipsoidGets the flattening f.- Specified by:
getFin interfaceILcdEllipsoid- Returns:
- the flattening f.
-
getE
public double getE()Description copied from interface:ILcdEllipsoidGets the eccentricity e which is always positive.- Specified by:
getEin interfaceILcdEllipsoid- Returns:
- the eccentricity e which is always positive.
-
getE2
public double getE2()Description copied from interface:ILcdEllipsoidGets the eccentricitySquared e2 = (a2 - b2)/a2.- Specified by:
getE2in interfaceILcdEllipsoid- Returns:
- the eccentricitySquared e2 = (a2 - b2 )/a2.
-
getEMinor2
public double getEMinor2()Description copied from interface:ILcdEllipsoidGets the secondEccentricitySquared e' 2 = (a2 - b2 )/b2.- Specified by:
getEMinor2in interfaceILcdEllipsoid- Returns:
- the secondEccentricitySquared e' 2 = (a2 - b2 )/b2 .
-
getN
public double getN()Description copied from interface:ILcdEllipsoidGets n = (a - b)/(a + b).- Specified by:
getNin interfaceILcdEllipsoid- Returns:
- n = (a - b)/(a + b).
-
isSphere
public boolean isSphere()Description copied from interface:ILcdEllipsoidChecks whether ellipsoid is the special case sphere.- Specified by:
isSpherein interfaceILcdEllipsoid- Returns:
trueif and only if ellipsoid is a sphere.
-
radiusVertical
public double radiusVertical(double aLatitude) Description copied from interface:ILcdEllipsoidRadius of curvature in prime vertical at a given geodetic latitude. Commonly referred to with a Greek letter n.- Specified by:
radiusVerticalin interfaceILcdEllipsoid- 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:ILcdEllipsoidRadius of curvature in prime vertical at a given geodetic latitude. Commonly referred to with a Greek letter n.- Specified by:
radiusVerticalin interfaceILcdEllipsoid- 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:ILcdEllipsoidRadius of curvature in prime meridian at a given geodetic latitude.- Specified by:
radiusMeridianin interfaceILcdEllipsoid- 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:ILcdEllipsoidRadius of curvature in prime meridian at a given geodetic latitude.- Specified by:
radiusMeridianin interfaceILcdEllipsoid- 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 latitudeaLatitude. 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:
meridionalArcDistancein interfaceILcdEllipsoid- 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 latitudeaLatitude. 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:
meridionalArcDistancein interfaceILcdEllipsoid- 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
Description copied from interface:ILcdEllipsoidThe conformal spherical longitude/latitude for a given geodetic longitude/latitude. These lon-lat-points are represented byILcdPointobjects. 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:
conformalSphericalLonLatPointSFCTin interfaceILcdEllipsoid- Parameters:
aLLP- Geodetic point on the ellipsoid.aLLPSFCT- Geodetic point on the conformal sphere.
-
inverseConformalSphericalLonLatPointSFCT
Description copied from interface:ILcdEllipsoidThe inverse transformation of the conformal spherical longitude/latitude.- Specified by:
inverseConformalSphericalLonLatPointSFCTin interfaceILcdEllipsoid- Parameters:
aLLP- Geodetic point on the conformal sphere.aLLPSFCT- Geodetic point on the ellipsoid.- See Also:
-
geoc2llhSFCT
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". This solution is an approximation by only including terms up to e2.
- Specified by:
geoc2llhSFCTin interfaceILcdEllipsoid- Parameters:
aXYZPoint- geocentric 3D point.aLLHPointSFCT- lonLatHeight coordinates to be set.
-
geoc2height
Description copied from interface:ILcdEllipsoidCalculates the height above the ellipsoid for a point defined in an Earth Centered, Earth Fixed XYZ Cartesian coordinate system.- Specified by:
geoc2heightin interfaceILcdEllipsoid- Parameters:
aXYZGeocPoint- geocentric 3D point- Returns:
- the height above the ellipsoid
-
llh2geocSFCT
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".
- Specified by:
llh2geocSFCTin interfaceILcdEllipsoid- 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:
getAuxRadiusin interfaceILcdEllipsoid- Returns:
- the major semi-axis a.
-
getConformalRadius
public double getConformalRadius()Description copied from interface:ILcdEllipsoidRadius of a sphere such that its meridional arc from 0 -> 90 degrees is equal to the corresponding meridional arc on the ellipsoid.- Specified by:
getConformalRadiusin interfaceILcdEllipsoid- 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:ILcdEllipsoidCalculates the shortest distance between two arbitraryILcdPointobjectsaP1andaP2on the ellipsoid in meters.- Specified by:
geodesicDistancein interfaceILcdEllipsoid- 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)ifaP1would be anILcdPointwith lon-lat coordinates(aLongitude1,aLatitude1)andaP2would be aILcdPointwith lon-lat coordinates(aLongitude2,aLatitude2). - See Also:
-
geodesicDistance
Description copied from interface:ILcdEllipsoidCalculates the shortest distance between two arbitraryILcdPointobjectsaP1andaP2on 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:
geodesicDistancein interfaceILcdEllipsoid- Parameters:
aP1- start point of geodesic line segment.aP2- end point of geodesic line segment.- Returns:
- the shortest distance between
aP1andaP2on the ellipsoid in meters.
-
distanceToGeodesic
Calculates the distance between the geodesicaP1-aP2and the pointaP3, at a certain angleaAngle. Returns result in degrees.The current implementation calculates the distance using a spherical approximation.
- Specified by:
distanceToGeodesicin interfaceILcdEllipsoid- 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 pointaP3and the point of crossing and the geodesic line defined byaP1andaP2and 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 angleaAngle. Returns result in degrees. Note: this method uses the spherical approximation fromTLspSphereUtil, seeTLcdSphereUtil.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
Calculates the geodesic surface area of a polygon given as an array ofILcdPointobjects. 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:
geodesicAreain interfaceILcdEllipsoid- Parameters:
aPts- an array ofILcdPointobjects.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:ILcdEllipsoidThe 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:
radiusGaussianin interfaceILcdEllipsoid- Parameters:
aLat- latitude, in degrees- Returns:
- the Gaussian curvature radius.
- See Also:
-
radiusGaussian
public double radiusGaussian(double aLat, double aSinLat) Description copied from interface:ILcdEllipsoidThe 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:
radiusGaussianin interfaceILcdEllipsoid- Parameters:
aLat- latitude, in degreesaSinLat- the sine of the latitude.- Returns:
- the Gaussian curvature radius.
- See Also:
-
radiusEuler
public double radiusEuler(double aLatitude, double aAzimuth) Description copied from interface:ILcdEllipsoidEuler radius of the ellipsoid at a given latitudeaLatitudeand a given azimuthaAzimuth. The euler radius is the mean radius of the spheroidal arc at the given latitude for the given azimuth.- Specified by:
radiusEulerin interfaceILcdEllipsoid- 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:ILcdEllipsoidEuler radius of the ellipsoid at a given latitudeaLatitudeand a given azimuthaAzimuth. The euler radius is the mean radius of the spheroidal arc at the given latitude for the given azimuth.- Specified by:
radiusEulerin interfaceILcdEllipsoid- 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
Calculates the forward azimuth of the geodesic line from
aP1toaP2in radians ! Only the (x,y) coordinates (longitude and latitude) of theILcdPointobjects 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:
forwardAzimuth2Din interfaceILcdEllipsoid- Parameters:
aP1- start point of the geodesic line segment.aP2- end point of the geodesic line segment.- Returns:
- the forward azimuth from
aP1toaP2in radians! - See Also:
-
forwardAzimuth2D
public double forwardAzimuth2D(double aLon1, double aLat1, double aLon2, double aLat2) Description copied from interface:ILcdEllipsoidCalculates the forward azimuth of the geodesic line from
aP1toaP2in radians ! Only the (x,y) coordinates (longitude and latitude) of theILcdPointobjects are taken into account.The forward azimuth lies between [0.0, 2.0*Math.PI], with 0.0 north, clockwise.
- Specified by:
forwardAzimuth2Din interfaceILcdEllipsoid- 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) SetsaGeodesicPointSFCTto anILcdPointon the geodesic line through the pointaP1and the pointaP2, located at a fractionaKof the (shortest) distance betweenaP1andaP2.Implementation is based on the inverse and forward formulas of Vincenty.
- Specified by:
geodesicPointSFCTin interfaceILcdEllipsoid- 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 theILcdPointaGeodesicPointon the geodesic through(aP1.getX(), aP1.getY())located at a distanceaDistanceand forward azimuthaAzimuth.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:
- Geocentric Datum of Australia: Technical Manual, available at http://www.icsm.gov.au/sites/default/files/2017-09/gda-v_2.4_0.pdf.
- Vincenty, T., Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations, Survey Review XXII, 176, April 1975.
- Specified by:
geodesicPointSFCTin interfaceILcdEllipsoid- Parameters:
aPoint-ILcdPointon 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
Description copied from interface:ILcdEllipsoidCalculates the azimuth of the rhumbline from
aP1toaP2in degrees! Only the (x,y) coordinates (longitude and latitude) of theILcdPointobjects are taken into account.The forward azimuth lies between [0.0, 360.0], with 0.0 north, clockwise.
- Specified by:
rhumblineAzimuth2Din interfaceILcdEllipsoid- Parameters:
aP1- start point of rhumbline segment.aP2- end point of rhumbline segment.- Returns:
- the forward azimuth from
aP1toaP2in DEGREES!
-
rhumblineDistance
Description copied from interface:ILcdEllipsoidCalculates the distance between two arbitraryILcdPointobjectsaP1andaP2on 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:
rhumblineDistancein interfaceILcdEllipsoid- Parameters:
aP1- start point of rhumbline segment.aP2- end point of rhumbline segment.- Returns:
- the rhumbline distance between
aP1andaP2on the ellipsoid in meters.
-
rhumblinePointSFCT
public void rhumblinePointSFCT(ILcdPoint aPoint, double aDistance, double aAzimuth, ILcd2DEditablePoint aRhumblinePointSFCT) Description copied from interface:ILcdEllipsoidDetermines theILcdPointaRhumblinePointSFCTon the rhumbline (a path with a constant bearing) through(aP1.getX(), aP1.getY())located at a distanceaDistanceand forward azimuthaAzimuth.- Specified by:
rhumblinePointSFCTin interfaceILcdEllipsoid- Parameters:
aPoint-ILcdPointon the ellipsoid.aDistance- distance expressed in meters.aAzimuth- forward azimuth expressed in degrees.aRhumblinePointSFCT-ILcdPointon the ellipsoid.
-
intersects2DLS
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:
intersects2DLSin interfaceILcdEllipsoid- 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:
trueif the segments intersect each other,falseotherwise.- 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:
intersects2DLSin interfaceILcdEllipsoid- 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:
trueif geodesic line segments intersect each other,falseotherwise.- 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
aP1andaP2should not coincide nor should the pointsaP3andaP4. A RuntimeException is thrown in case the two geodesics overlap or do not intersect.- Specified by:
intersection2DLSSFCTin interfaceILcdEllipsoid- 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,aLat2should 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:
intersection2DLSSFCTin interfaceILcdEllipsoid- 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 byaStartPoint,aEndPoint, andaWidth, as an array of 4ILcd2DEditablePointobjects. 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:
bufferContour2DOfSegmentSFCTin interfaceILcdEllipsoid- 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 4ILcd2DEditablePointobjects, 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 givenILcdPointListat 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
ILcd2DEditablePointarray, - 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.
TLcdEllipsoidUtil#computeBufferContour2D.Uses
TLcdSphereUtil.bufferContour2DOf2DPolyline(aStartPoint,aEndPoint,aWidth,getA(),a2DEditablePointArraySFCT).- Specified by:
bufferContour2DOf2DPolylineSFCTin interfaceILcdEllipsoid- Parameters:
aPointList- the axis of the buffer.aWidth- distance from the axis to the contour in meters.a2DEditablePointArraySFCT- an initialized array ofaPointList.getPointCount() * 2ILcd2DEditablePointobjects, which will represent the contour polygon.- See Also:
- contours with holes (i.e., caused by axis intersections) cannot
be represented, since the contour is modeled as an
-
getName
Description copied from interface:ILcdEllipsoidGets the name of thisILcdEllipsoid.- Specified by:
getNamein interfaceILcdEllipsoid- Returns:
- the name of this
ILcdEllipsoid.
-
setName
Sets the name of this ellipsoid.- Parameters:
aName- name of the ellipsoid represented by thisILcdEllipsoid.- See Also:
-
equals
Description copied from interface:ILcdEllipsoidOverrides Object.equals.- Specified by:
equalsin interfaceILcdEllipsoid- Overrides:
equalsin classObject- Parameters:
aEllipsoid- Object to be checked on.- Returns:
- true if both objects are equal.
-
hashCode
public int hashCode() -
toString
-