public class TLcdEllipsoid extends Object implements ILcdEllipsoid
TLcdEllipsoid
represents an ellipsoid and is the implementation
of an ILcdEllipsoid
.
Typically it is defined by:
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:
Modifier and Type | Field and Description |
---|---|
static TLcdEllipsoid |
DEFAULT
Default ellipsoid object representing the WGS1984 ellipsoid.
|
Constructor and Description |
---|
TLcdEllipsoid()
Default ellipsoid construction is the WGS_1984 ellipsoid.
|
Modifier and Type | Method and 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 |
conformalSphericalLonLatPointSFCT(ILcdPoint aLLP,
ILcd2DEditablePoint aLLPSFCT)
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 |
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. |
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 |
geodesicDistance(ILcdPoint aP1,
ILcdPoint aP2)
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 |
get1OverF()
Gets the reciprocal of the flattening 1/f.
|
double |
getA()
Gets the semiMajorRadius a.
|
double |
getAuxRadius()
Radius of auxiliary sphere of the ellipsoid.
|
double |
getB()
Gets the semiMinorRadius b.
|
double |
getConformalRadius()
Radius of a sphere such that its meridional arc from 0 -> 90 degrees is
equal to the corresponding meridional arc on the ellipsoid.
|
double |
getE()
Gets the eccentricity e which is always positive.
|
double |
getE2()
Gets the eccentricitySquared
e2 = (a2 - b2)/a2.
|
double |
getEMinor2()
Gets the secondEccentricitySquared
e' 2 = (a2 - b2 )/b2.
|
double |
getF()
Gets the flattening f.
|
double |
getN()
Gets n = (a - b)/(a + b).
|
String |
getName()
Gets the name of this
ILcdEllipsoid . |
int |
hashCode() |
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 |
intersection2DLSSFCT(ILcdPoint aP1,
ILcdPoint aP2,
ILcdPoint aP3,
ILcdPoint aP4,
ILcd2DEditablePoint aLLPSFCT)
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 |
intersects2DLS(ILcdPoint aP1,
ILcdPoint aP2,
ILcdPoint aP3,
ILcdPoint aP4)
Checks whether two geodesic line segments intersect.
|
void |
inverseConformalSphericalLonLatPointSFCT(ILcdPoint aLLP,
ILcd2DEditablePoint aLLPSFCT)
The inverse transformation of the conformal spherical longitude/latitude.
|
boolean |
isSphere()
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 |
rhumblineAzimuth2D(ILcdPoint aP1,
ILcdPoint aP2)
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 |
rhumblineDistance(ILcdPoint aP1,
ILcdPoint aP2)
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.
|
String |
toString() |
public static final TLcdEllipsoid DEFAULT
public TLcdEllipsoid()
public void initializeAB(double aA, double aB)
aA
- radius of major axis.aB
- radius of minor axis.public void initializeA1OverF(double aA, double a1OverF)
aA
- radius of major axis.a1OverF
- reciprocal value of flattening.public double getA()
ILcdEllipsoid
getA
in interface ILcdEllipsoid
public double getB()
ILcdEllipsoid
getB
in interface ILcdEllipsoid
public double get1OverF()
ILcdEllipsoid
get1OverF
in interface ILcdEllipsoid
public double getF()
ILcdEllipsoid
getF
in interface ILcdEllipsoid
public double getE()
ILcdEllipsoid
getE
in interface ILcdEllipsoid
public double getE2()
ILcdEllipsoid
getE2
in interface ILcdEllipsoid
public double getEMinor2()
ILcdEllipsoid
getEMinor2
in interface ILcdEllipsoid
public double getN()
ILcdEllipsoid
getN
in interface ILcdEllipsoid
public boolean isSphere()
ILcdEllipsoid
isSphere
in interface ILcdEllipsoid
true
if and only if ellipsoid is a sphere.public double radiusVertical(double aLatitude)
ILcdEllipsoid
radiusVertical
in interface ILcdEllipsoid
aLatitude
- latitude, in degrees.ILcdEllipsoid.radiusVertical(double, double)
public double radiusVertical(double aLatitude, double aSinLat)
ILcdEllipsoid
radiusVertical
in interface ILcdEllipsoid
aLatitude
- latitude, in degrees.aSinLat
- the sine of the latitude.ILcdEllipsoid.radiusVertical(double)
public double radiusMeridian(double aLatitude)
ILcdEllipsoid
radiusMeridian
in interface ILcdEllipsoid
aLatitude
- latitude, in degrees.ILcdEllipsoid.radiusMeridian(double, double)
public double radiusMeridian(double aLatitude, double aSinLat)
ILcdEllipsoid
radiusMeridian
in interface ILcdEllipsoid
aLatitude
- latitude, in degrees.aSinLat
- the sine of the latitude.public double meridionalArcDistance(double aLatitude)
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.
meridionalArcDistance
in interface ILcdEllipsoid
aLatitude
- latitude, in degrees.ILcdEllipsoid.meridionalArcDistance(double, double, double)
public double meridionalArcDistance(double aLatitude, double aCosLat, double aSinLat)
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.
meridionalArcDistance
in interface ILcdEllipsoid
aLatitude
- latitude, in degrees.aCosLat
- the cosine of the latitude.aSinLat
- the sine of the latitude.public void conformalSphericalLonLatPointSFCT(ILcdPoint aLLP, ILcd2DEditablePoint aLLPSFCT)
ILcdEllipsoid
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.conformalSphericalLonLatPointSFCT
in interface ILcdEllipsoid
aLLP
- Geodetic point on the ellipsoid.aLLPSFCT
- Geodetic point on the conformal sphere.public void inverseConformalSphericalLonLatPointSFCT(ILcdPoint aLLP, ILcd2DEditablePoint aLLPSFCT)
ILcdEllipsoid
inverseConformalSphericalLonLatPointSFCT
in interface ILcdEllipsoid
aLLP
- Geodetic point on the conformal sphere.aLLPSFCT
- Geodetic point on the ellipsoid.ILcdEllipsoid.conformalSphericalLonLatPointSFCT(com.luciad.shape.ILcdPoint, com.luciad.shape.shape2D.ILcd2DEditablePoint)
public void geoc2llhSFCT(ILcdPoint aXYZPoint, ILcd3DEditablePoint aLLHPointSFCT)
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.
geoc2llhSFCT
in interface ILcdEllipsoid
aXYZPoint
- geocentric 3D point.aLLHPointSFCT
- lonLatHeight coordinates to be set.public double geoc2height(ILcdPoint aXYZGeocPoint)
ILcdEllipsoid
geoc2height
in interface ILcdEllipsoid
aXYZGeocPoint
- geocentric 3D pointpublic void llh2geocSFCT(ILcdPoint aLLHPoint, ILcd3DEditablePoint aXYZGeocentricPointSFCT)
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.
llh2geocSFCT
in interface ILcdEllipsoid
aLLHPoint
- lonLatHeight point.aXYZGeocentricPointSFCT
- Geocentric coordinates to be set.public double getAuxRadius()
Simplest choice of radius of auxiliary sphere returns the major semi-axis.
getAuxRadius
in interface ILcdEllipsoid
public double getConformalRadius()
ILcdEllipsoid
getConformalRadius
in interface ILcdEllipsoid
public double geodesicDistance(double aLon1, double aLat1, double aLon2, double aLat2)
ILcdEllipsoid
ILcdPoint
objects aP1
and aP2
on the ellipsoid in meters.geodesicDistance
in interface ILcdEllipsoid
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.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)
.ILcdEllipsoid.geodesicDistance(ILcdPoint aP1, ILcdPoint aP2)
public double geodesicDistance(ILcdPoint aP1, ILcdPoint aP2)
ILcdEllipsoid
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.geodesicDistance
in interface ILcdEllipsoid
aP1
- start point of geodesic line segment.aP2
- end point of geodesic line segment.aP1
and aP2
on the ellipsoid in meters.public double distanceToGeodesic(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, double aAngle)
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.
distanceToGeodesic
in interface ILcdEllipsoid
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.TLcdSphereUtil.distanceToGeodesic(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, double)
public static double distanceToGeodesic(double aLon1, double aLat1, double aLon2, double aLat2, double aLon3, double aLat3, double aAngle)
(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()
.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)
.TLcdSphereUtil.distanceToGeodesic(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, double)
public double geodesicArea(ILcdPoint[] aPts, int aN)
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.
geodesicArea
in interface ILcdEllipsoid
aPts
- an array of ILcdPoint
objects.aN
- aPts[0..aN-1]
defines the polygon on the ellipsoid.public double radiusGaussian(double aLat)
ILcdEllipsoid
radiusGaussian
in interface ILcdEllipsoid
aLat
- latitude, in degreesILcdEllipsoid.radiusMeridian(double)
,
ILcdEllipsoid.radiusVertical(double)
public double radiusGaussian(double aLat, double aSinLat)
ILcdEllipsoid
radiusGaussian
in interface ILcdEllipsoid
aLat
- latitude, in degreesaSinLat
- the sine of the latitude.ILcdEllipsoid.radiusMeridian(double)
,
ILcdEllipsoid.radiusVertical(double)
public double radiusEuler(double aLatitude, double aAzimuth)
ILcdEllipsoid
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.radiusEuler
in interface ILcdEllipsoid
aLatitude
- latitude, in arc degrees.aAzimuth
- azimuth, in RADIANS .ILcdEllipsoid.radiusEuler(double, double, double, double, double)
public double radiusEuler(double aLatitude, double aSinLat, double aAzimuth, double aCosAzimuth, double aSinAzimuth)
ILcdEllipsoid
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.radiusEuler
in interface ILcdEllipsoid
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.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.
forwardAzimuth2D
in interface ILcdEllipsoid
aP1
- start point of the geodesic line segment.aP2
- end point of the geodesic line segment.aP1
to aP2
in radians!geodesicDistance(double, double, double, double)
public double forwardAzimuth2D(double aLon1, double aLat1, double aLon2, double aLat2)
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.
forwardAzimuth2D
in interface ILcdEllipsoid
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.(aLongitude1,aLatitude1)
to (aLongitude2,aLatitude2)
in radians!public void geodesicPointSFCT(ILcdPoint aP1, ILcdPoint aP2, double aK, ILcd2DEditablePoint aGeodesicPointSFCT)
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.
geodesicPointSFCT
in interface ILcdEllipsoid
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.geodesicDistance(double, double, double, double)
public void geodesicPointSFCT(ILcdPoint aPoint, double aDistance, double aAzimuth, ILcd2DEditablePoint aGeodesicPointSFCT)
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:
geodesicPointSFCT
in interface ILcdEllipsoid
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.ILcdEllipsoid.geodesicDistance(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint)
public double rhumblineAzimuth2D(ILcdPoint aP1, ILcdPoint aP2)
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.
rhumblineAzimuth2D
in interface ILcdEllipsoid
aP1
- start point of rhumbline segment.aP2
- end point of rhumbline segment.aP1
to aP2
in DEGREES!public double rhumblineDistance(ILcdPoint aP1, ILcdPoint aP2)
ILcdEllipsoid
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.rhumblineDistance
in interface ILcdEllipsoid
aP1
- start point of rhumbline segment.aP2
- end point of rhumbline segment.aP1
and aP2
on the ellipsoid in meters.public void rhumblinePointSFCT(ILcdPoint aPoint, double aDistance, double aAzimuth, ILcd2DEditablePoint aRhumblinePointSFCT)
ILcdEllipsoid
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
.rhumblinePointSFCT
in interface ILcdEllipsoid
aPoint
- ILcdPoint
on the ellipsoid.aDistance
- distance expressed in meters.aAzimuth
- forward azimuth expressed in degrees.aRhumblinePointSFCT
- ILcdPoint
on the ellipsoid.public boolean intersects2DLS(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, ILcdPoint 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.
intersects2DLS
in interface ILcdEllipsoid
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.true
if the segments intersect each other, false
otherwise.TLcdEllipsoidUtil.intersects2DLS(com.luciad.geodesy.ILcdEllipsoid, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint)
public boolean intersects2DLS(double aLon1, double aLat1, double aLon2, double aLat2, double aLon3, double aLat3, double aLon4, double aLat4)
(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.
intersects2DLS
in interface ILcdEllipsoid
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.true
if geodesic line segments intersect each other,
false
otherwise.TLcdEllipsoidUtil.intersects2DLS(com.luciad.geodesy.ILcdEllipsoid, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint)
public void intersection2DLSSFCT(ILcdPoint aP1, ILcdPoint aP2, ILcdPoint aP3, ILcdPoint aP4, ILcd2DEditablePoint aLLPSFCT)
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.
intersection2DLSSFCT
in interface ILcdEllipsoid
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.public void intersection2DLSSFCT(double aLon1, double aLat1, double aLon2, double aLat2, double aLon3, double aLat3, double aLon4, double aLat4, ILcd2DEditablePoint aLLPSFCT)
(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.
intersection2DLSSFCT
in interface ILcdEllipsoid
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.public void bufferContour2DOfSegmentSFCT(ILcdPoint aStartPoint, ILcdPoint aEndPoint, double aWidth, ILcd2DEditablePoint[] a2DEditablePointArraySFCT)
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)
.
bufferContour2DOfSegmentSFCT
in interface ILcdEllipsoid
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.TLcdSphereUtil.bufferContour2DOfSegmentSFCT(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, double, com.luciad.shape.shape2D.ILcd2DEditablePoint[])
public void bufferContour2DOf2DPolylineSFCT(ILcdPointList aPointList, double aWidth, ILcd2DEditablePoint[] a2DEditablePointArraySFCT)
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:
ILcd2DEditablePoint
array,TLcdEllipsoidUtil#computeBufferContour2D
.
Uses TLcdSphereUtil.bufferContour2DOf2DPolyline(aStartPoint,aEndPoint,aWidth,getA(),a2DEditablePointArraySFCT)
.
bufferContour2DOf2DPolylineSFCT
in interface ILcdEllipsoid
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.TLcdSphereUtil.bufferContour2DOfSegmentSFCT(com.luciad.shape.ILcdPoint, com.luciad.shape.ILcdPoint, double, com.luciad.shape.shape2D.ILcd2DEditablePoint[])
public String getName()
ILcdEllipsoid
ILcdEllipsoid
.getName
in interface ILcdEllipsoid
ILcdEllipsoid
.public void setName(String aName)
aName
- name of the ellipsoid represented by this ILcdEllipsoid
.getName()
public boolean equals(Object aEllipsoid)
ILcdEllipsoid
equals
in interface ILcdEllipsoid
equals
in class Object
aEllipsoid
- Object to be checked on.