Class TLcdGeodeticDatum
- All Implemented Interfaces:
ILcdGeodeticDatum,ILcdCloneable,Serializable,Cloneable
TLcdGeodeticDatum is described by the position,
orientation and scale relationships of its ILcdEllipsoid to an
earth centered earth fixed ILcdEllipsoid. In other words, this
provides sufficient information to perform a linear transformation between
the geodetic datum and the global reference geodetic system based on 11
parameters: position shifts, angular rotations, a scale, a pivot point, and a prime meridian.
The simplest transformation is a 3-parameter transformation based on the two
ILcdEllipsoid objects and the position shifts.
A more complex transformation is the Helmert 7-parameter transformation based on the two ILcdEllipsoid objects
and the position shifts, angular rotations and scale. The pivot is (0,0,0) in this case.
The most complex transformation is the Molodensky-Badekas 10-parameter transformation. This transformation is the same as the Helmert 7-parameter transformation, but additionally it uses a non-zero pivot point.
This class is thread-safe for read-only access, provided that any custom ILcdEllipsoid set onto the current object is also thread-safe for read-only access.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA geodetic datum is complex if it is not simple and not a reference geodetic datum.static final intA geodetic datum is a reference geodetic datum if it is not defined with respect to another geodetic datum, i.e., itsILcdEllipsoidis considered earth centered earth fixed.static final intA geodetic datum is simple if only position shifts are defined for the datum conversion.static final intThis is used for geodetic daumts using the Molodensky-Badekas 10-parameter transformation. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor creates a reference geodetic datum (WGS84).TLcdGeodeticDatum(double aX, double aY, double aZ, double aRotX, double aRotY, double aRotZ, double aScale, double aPrimeMeridian, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aRefDatum, String aName) Definition of a local complex datum.TLcdGeodeticDatum(double aX, double aY, double aZ, double aRotX, double aRotY, double aRotZ, double aScale, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aRefDatum, String aName) Definition of a local complex datum.TLcdGeodeticDatum(double aX, double aY, double aZ, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aReferenceDatum, String aName) Definition of a local simple geodetic datum.TLcdGeodeticDatum(ILcdEllipsoid aEllipsoid, String aName) Definition of a global geodetic datum.TLcdGeodeticDatum(TLcdGeodeticDatum aGeodeticDatum) Definition of a local complex geodetic datum. -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones thisILcdGeodeticDatum.voiddatum2refGeocSFCT(ILcdPoint aXYZPoint, ILcd3DEditablePoint aXYZOut) Conversion of geocentric datum coordinate to geocentric reference datum coordinate.voiddatum2refLLHSFCT(ILcdPoint aLLHPoint, ILcd3DEditablePoint aLLHOut) Conversion of geodetic datum coordinate to geodetic reference datum coordinate.booleanChecks whether the two geodetic datums are exactly equal.booleanChecks whether the horizontal datum parts of the two geodetic datums are exactly equal.voidgeoc2llhSFCT(ILcdPoint aXYZGeocPoint, ILcd3DEditablePoint aLLHPointSFCT) Coordinate conversion between Earth Centered, Earth Fixed XYZ Cartesian coordinate system and latitude-longitude-height for this geodetic datum.Returns theILcdEllipsoidof the subject geodetic datum.doublegetHeight(double aLon, double aLat) Returns the height of the vertical datum of thisILcdGeodeticDatumfor the specified geodetic coordinates.getName()Gets the name of thisILcdGeodeticDatum.doubleReturns the x component of the pivot pointdoubleReturns the y component of the pivot pointdoubleReturns the z component of the pivot pointdoubleReturns the prime meridian in degrees longitude.Gets the reference geodetic datum.doublegetRotX()X rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.doublegetRotY()Y rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.doublegetRotZ()Z rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.doublegetScale()Scale factor.intgetType()Gives an indication of the complexity of computations when transforming to/from the reference geodetic datum.Returns a vertical datum name, if this geodetic datum defines one.doublegetX()X coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.doublegetY()Y coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.doublegetZ()Z coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.inthashCode()booleanReturns whether the methodgetHeightreturns non zero height values.voidinitialize(double aX, double aY, double aZ, double aRotX, double aRotY, double aRotZ, double aScale, double aPrimeMeridian, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aRefDatum, String aName) Definition of a local complex geodetic datum.voidinitialize(double aX, double aY, double aZ, double aRotX, double aRotY, double aRotZ, double aScale, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aRefDatum, String aName) Deprecated.use the method with 8 parameters, containing the prime meridian.voidllh2geocSFCT(ILcdPoint aLLHPoint, ILcd3DEditablePoint aXYZGeocPointSFCT) Coordinate conversion between latitude-longitude-height for this geodetic datum and Earth Centered, Earth Fixed XYZ Cartesian coordinate system.voidref2datumGeocSFCT(ILcdPoint aXYZPoint, ILcd3DEditablePoint aXYZOut) Conversion of geocentric reference datum coordinate to geocentric datum coordinate.voidref2datumLLHSFCT(ILcdPoint aLLHPoint, ILcd3DEditablePoint aLLHOut) Conversion of geodetic reference datum coordinate to geodetic datum coordinate.voidsetEllipsoid(ILcdEllipsoid aEllipsoid) Sets theILcdEllipsoidof the subject geodetic datum.voidSets the name of thisILcdGeodeticDatum.voidsetPivotX(double aPivotX) Sets the x component of the pivot point that is used for the Molodensky-Badekas 10-parameter transformation.voidsetPivotY(double aPivotY) Sets the y component of the pivot point that is used for the Molodensky-Badekas 10-parameter transformation.voidsetPivotZ(double aPivotZ) Sets the z component of the pivot point that is used for the Molodensky-Badekas 10-parameter transformation.voidsetPrimeMeridian(double aPrimeMeridian) Sets the prime meridian in degrees longitude of this geodetic datum.voidsetRefDatum(ILcdGeodeticDatum aRefDatum) Sets the reference geodetic datum.voidsetRotX(double aRotX) Sets the X rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.voidsetRotY(double aRotY) Sets the Y rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.voidsetRotZ(double aRotZ) Sets the Z rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.voidsetScale(double aScale) Sets the scale factor.voidsetX(double aX) Sets the X coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.voidsetY(double aY) Sets the Y coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.voidsetZ(double aZ) Sets the Z coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.toString()Returns a String representation of thisILcdGeodeticDatum.
-
Field Details
-
REFERENCE
public static final int REFERENCEA geodetic datum is a reference geodetic datum if it is not defined with respect to another geodetic datum, i.e., itsILcdEllipsoidis considered earth centered earth fixed. A reference geodetic datum has no translation, no rotation, scale equal to 1.0 and a prime meridian equal to 0.0.- See Also:
-
SIMPLE
public static final int SIMPLEA geodetic datum is simple if only position shifts are defined for the datum conversion. A geodetic datum is considered simple if one of the translation parameters is different from 0.0, but no rotation is defined, the scale is equal to 1.0, all pivot value are 0.0 and the prime meridian is equal to 0.0.- See Also:
-
COMPLEX
public static final int COMPLEXA geodetic datum is complex if it is not simple and not a reference geodetic datum.- See Also:
-
TEN_PARAMETER
public static final int TEN_PARAMETERThis is used for geodetic daumts using the Molodensky-Badekas 10-parameter transformation. This transformation is the same as the Helmert 7-parameter transformation, but additionally it uses a non-zero pivot point.- Since:
- 2023.1
- See Also:
-
-
Constructor Details
-
TLcdGeodeticDatum
public TLcdGeodeticDatum()Default constructor creates a reference geodetic datum (WGS84). -
TLcdGeodeticDatum
Definition of a global geodetic datum.- Parameters:
aEllipsoid- ellipsoid of the global geodetic datum.aName- name of the global geodetic datum.
-
TLcdGeodeticDatum
public TLcdGeodeticDatum(double aX, double aY, double aZ, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aReferenceDatum, String aName) Definition of a local simple geodetic datum.- Parameters:
aX- x-axis position shift w.r.t. reference datum.aY- y-axis position shift w.r.t. reference datum.aZ- z-axis position shift w.r.t. reference datum.aEllipsoid- ellipsoid of the geodetic datum.aReferenceDatum- reference geodetic datum.aName- name of this geodetic datum.
-
TLcdGeodeticDatum
Definition of a local complex geodetic datum.- Parameters:
aGeodeticDatum- geodetic datum to clone.
-
TLcdGeodeticDatum
public TLcdGeodeticDatum(double aX, double aY, double aZ, double aRotX, double aRotY, double aRotZ, double aScale, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aRefDatum, String aName) Definition of a local complex datum.- Parameters:
aX- x-axis position shift w.r.t. reference datum.aY- y-axis position shift w.r.t. reference datum.aZ- z-axis position shift w.r.t. reference datum.aRotX- rotation around x-axis.aRotY- rotation around y-axis.aRotZ- rotation around z-axis.aScale- scale factor.aEllipsoid- ellipsoid of this geodetic datum.aRefDatum- reference geodetic datum.aName- name for this geodetic datum.- See Also:
-
TLcdGeodeticDatum
public TLcdGeodeticDatum(double aX, double aY, double aZ, double aRotX, double aRotY, double aRotZ, double aScale, double aPrimeMeridian, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aRefDatum, String aName) Definition of a local complex datum.- Parameters:
aX- x-axis position shift w.r.t. reference datum.aY- y-axis position shift w.r.t. reference datum.aZ- z-axis position shift w.r.t. reference datum.aRotX- rotation around x-axis.aRotY- rotation around y-axis.aRotZ- rotation around z-axis.aScale- scale factor.aPrimeMeridian- prime meridian.aEllipsoid- ellipsoid of this geodetic datum.aRefDatum- reference geodetic datum.aName- name for this geodetic datum.- See Also:
-
-
Method Details
-
setX
public void setX(double aX) Sets the X coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.- Parameters:
aX- the X coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.- See Also:
-
getX
public double getX()X coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.- Returns:
- The x value.
- See Also:
-
setY
public void setY(double aY) Sets the Y coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.- Parameters:
aY- the Y coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.- See Also:
-
getY
public double getY()Y coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.- Returns:
- The y value.
- See Also:
-
setZ
public void setZ(double aZ) Sets the Z coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.- Parameters:
aZ- the Z coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.- See Also:
-
getZ
public double getZ()Z coordinate ofILcdEllipsoidorigin with respect to referenceILcdEllipsoidcartesian coordinate system.- Returns:
- The z value.
- See Also:
-
setRotX
public void setRotX(double aRotX) Sets the X rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.- Parameters:
aRotX- the X rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.- See Also:
-
getRotX
public double getRotX()X rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.- Returns:
- The rotX value.
- See Also:
-
setRotY
public void setRotY(double aRotY) Sets the Y rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.- Parameters:
aRotY- the Y rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.- See Also:
-
getRotY
public double getRotY()Y rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.- Returns:
- The rotY value.
- See Also:
-
setRotZ
public void setRotZ(double aRotZ) Sets the Z rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.- Parameters:
aRotZ- the Z rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.- See Also:
-
getRotZ
public double getRotZ()Z rotation in radians (positive counterclockwise) with respect to referenceILcdEllipsoidcartesian coordinate system.- Returns:
- The rotZ value.
- See Also:
-
setScale
public void setScale(double aScale) Sets the scale factor.- Parameters:
aScale- the scale factor.- See Also:
-
getScale
public double getScale()Scale factor.- Returns:
- The scale value.
- See Also:
-
setPivotX
public void setPivotX(double aPivotX) Sets the x component of the pivot point that is used for the Molodensky-Badekas 10-parameter transformation. When all 3 components (x, y and z) of the pivot are 0, this simplifies to a Helmert 7-parameter transformation.- Parameters:
aPivotX- the x component of the pivot point- Since:
- 2023.1
-
getPivotX
public double getPivotX()Returns the x component of the pivot point- Returns:
- the x component of the pivot point
- Since:
- 2023.1
- See Also:
-
setPivotY
public void setPivotY(double aPivotY) Sets the y component of the pivot point that is used for the Molodensky-Badekas 10-parameter transformation. When all 3 components (x, y and z) of the pivot are 0, this simplifies to a Helmert 7-parameter transformation.- Parameters:
aPivotY- the y component of the pivot point- Since:
- 2023.1
-
getPivotY
public double getPivotY()Returns the y component of the pivot point- Returns:
- the y component of the pivot point
- Since:
- 2023.1
- See Also:
-
setPivotZ
public void setPivotZ(double aPivotZ) Sets the z component of the pivot point that is used for the Molodensky-Badekas 10-parameter transformation. When all 3 components (x, y and z) of the pivot are 0, this simplifies to a Helmert 7-parameter transformation.- Parameters:
aPivotZ- the z component of the pivot point- Since:
- 2023.1
-
getPivotZ
public double getPivotZ()Returns the z component of the pivot point- Returns:
- the z component of the pivot point
- Since:
- 2023.1
- See Also:
-
setEllipsoid
Sets theILcdEllipsoidof the subject geodetic datum.- Parameters:
aEllipsoid- theILcdEllipsoidof the subject geodetic datum.- See Also:
-
getEllipsoid
Returns theILcdEllipsoidof the subject geodetic datum.- Specified by:
getEllipsoidin interfaceILcdGeodeticDatum- Returns:
ILcdEllipsoidof the subject geodetic datum.- See Also:
-
setRefDatum
Sets the reference geodetic datum.- Parameters:
aRefDatum- the reference geodetic datum.- See Also:
-
getRefDatum
Gets the reference geodetic datum.- Returns:
- the reference geodetic datum.
- See Also:
-
getType
public int getType()Gives an indication of the complexity of computations when transforming to/from the reference geodetic datum. A geodetic datum can be of the types REFERENCE, SIMPLE, or COMPLEX. It is of the type REFERENCE if it is not defined with respect to another geodetic datum; SIMPLE if there are only shifts of positions involved; COMPLEX if not SIMPLE or not REFERENCE.- Returns:
- the type of the geodetic datum.
- REFERENCE implies X=Y=Z=0, rotX=rotY=rotZ=0, scale=1.0 and prime meridian=0.0
- SIMPLE implies X or Y or Z different from 0, rotX=rotY=rotZ=0, scale=1.0 and prime meridian=0.0
- COMPLEX implies not SIMPLE and not REFERENCE, either a rotation parameter, scale or prime meridian is different from the default value.
-
getPrimeMeridian
public double getPrimeMeridian()Returns the prime meridian in degrees longitude.- Returns:
- the prime meridian in degrees longitude. Default value is 0.0 (Greenwich).
- See Also:
-
setPrimeMeridian
public void setPrimeMeridian(double aPrimeMeridian) Sets the prime meridian in degrees longitude of this geodetic datum.- Parameters:
aPrimeMeridian- the prime meridian of the geodetic datum.- See Also:
-
setName
Sets the name of thisILcdGeodeticDatum.- Parameters:
aName- The new name value.- See Also:
-
getName
Gets the name of thisILcdGeodeticDatum.- Specified by:
getNamein interfaceILcdGeodeticDatum- Returns:
- the name of this
ILcdGeodeticDatum. - See Also:
-
initialize
public void initialize(double aX, double aY, double aZ, double aRotX, double aRotY, double aRotZ, double aScale, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aRefDatum, String aName) Deprecated.use the method with 8 parameters, containing the prime meridian.Calls the initialize method with 8 parameters.- Parameters:
aX- x-axis position shift w.r.t. reference datum.aY- y-axis position shift w.r.t. reference datum.aZ- z-axis position shift w.r.t. reference datum.aRotX- rotation around x-axis.aRotY- rotation around y-axis.aRotZ- rotation around z-axis.aScale- scale factor.aEllipsoid- ellipsoid of this geodetic datum.aRefDatum- reference geodetic datum.aName- name for this geodetic datum.- See Also:
-
initialize
public void initialize(double aX, double aY, double aZ, double aRotX, double aRotY, double aRotZ, double aScale, double aPrimeMeridian, ILcdEllipsoid aEllipsoid, ILcdGeodeticDatum aRefDatum, String aName) Definition of a local complex geodetic datum.- Parameters:
aX- x-axis position shift w.r.t. reference datum.aY- y-axis position shift w.r.t. reference datum.aZ- z-axis position shift w.r.t. reference datum.aRotX- rotation around x-axis.aRotY- rotation around y-axis.aRotZ- rotation around z-axis.aScale- scale factor.aPrimeMeridian- the prime meridian of the geodetic datum.aEllipsoid- ellipsoid of this geodetic datum.aRefDatum- reference geodetic datum.aName- name for this geodetic datum.- See Also:
-
datum2refGeocSFCT
Conversion of geocentric datum coordinate to geocentric reference datum coordinate.- Specified by:
datum2refGeocSFCTin interfaceILcdGeodeticDatum- Parameters:
aXYZPoint- geocentric datum coordinate.aXYZOut- geocentric reference datum coordinate as side effect.
-
ref2datumGeocSFCT
Conversion of geocentric reference datum coordinate to geocentric datum coordinate.- Specified by:
ref2datumGeocSFCTin interfaceILcdGeodeticDatum- Parameters:
aXYZPoint- geocentric reference datum coordinate.aXYZOut- geocentric datum coordinate as side effect.
-
datum2refLLHSFCT
Conversion of geodetic datum coordinate to geodetic reference datum coordinate.- Specified by:
datum2refLLHSFCTin interfaceILcdGeodeticDatum- Parameters:
aLLHPoint- geodetic datum coordinate.aLLHOut- geodetic reference datum coordinate as side effect.
-
ref2datumLLHSFCT
Conversion of geodetic reference datum coordinate to geodetic datum coordinate.- Specified by:
ref2datumLLHSFCTin interfaceILcdGeodeticDatum- Parameters:
aLLHPoint- geodetic reference datum coordinate.aLLHOut- geodetic datum coordinate as side effect.
-
geoc2llhSFCT
Description copied from interface:ILcdGeodeticDatumCoordinate conversion between Earth Centered, Earth Fixed XYZ Cartesian coordinate system and latitude-longitude-height for this geodetic datum. The conversion only works within this geodetic datum.- Specified by:
geoc2llhSFCTin interfaceILcdGeodeticDatum- Parameters:
aXYZGeocPoint- geocentric 3D point.aLLHPointSFCT- lonLatHeight coordinates to be set.
-
llh2geocSFCT
Description copied from interface:ILcdGeodeticDatumCoordinate conversion between latitude-longitude-height for this geodetic datum and Earth Centered, Earth Fixed XYZ Cartesian coordinate system. The conversion only works within this geodetic datum.- Specified by:
llh2geocSFCTin interfaceILcdGeodeticDatum- Parameters:
aLLHPoint- lonLatHeight point.aXYZGeocPointSFCT- Geocentric coordinates to be set.
-
toString
Returns a String representation of thisILcdGeodeticDatum. -
equals
Checks whether the two geodetic datums are exactly equal.- Specified by:
equalsin interfaceILcdGeodeticDatum- Overrides:
equalsin classObject- Parameters:
aObject- the object for equality- Returns:
- true when the object passed is a
TLcdGeodeticDatumand is exactly equal to this geodetic datum.
-
equals2D
Checks whether the horizontal datum parts of the two geodetic datums are exactly equal.- Specified by:
equals2Din interfaceILcdGeodeticDatum- Parameters:
aObject- the object for equality- Returns:
- true when the object passed is a
TLcdGeodeticDatumand its horizontal datum part is exactly equal to this object's horizontal datum.
-
clone
Clones thisILcdGeodeticDatum.- Specified by:
clonein interfaceILcdCloneable- Specified by:
clonein interfaceILcdGeodeticDatum- Overrides:
clonein classObject- Returns:
- Clone of this
ILcdGeodeticDatum. - See Also:
-
hasNonZeroHeights
public boolean hasNonZeroHeights()Description copied from interface:ILcdGeodeticDatumReturns whether the methodgetHeightreturns non zero height values. The methodgetHeightwill always return0, if this method returnsfalse- Specified by:
hasNonZeroHeightsin interfaceILcdGeodeticDatum- Returns:
- true if the method
getHeightreturns non zero height values, false otherwise.
-
getVerticalDatumName
Description copied from interface:ILcdGeodeticDatumReturns a vertical datum name, if this geodetic datum defines one.- Specified by:
getVerticalDatumNamein interfaceILcdGeodeticDatum- Returns:
- a vertical datum name, or an empty
Optionalif no vertical datum is present.
-
hashCode
public int hashCode() -
getHeight
public double getHeight(double aLon, double aLat) Returns the height of the vertical datum of thisILcdGeodeticDatumfor the specified geodetic coordinates. These heights are expressed in meters with respect to the ellipsoid of thisILcdGeodeticDatum.Note that, if the geodetic coordinates lie outside the bounds of this instance,
Double.NaNwill be returned.- Specified by:
getHeightin interfaceILcdGeodeticDatum- Parameters:
aLon- the longitude coordinate.aLat- the latitude coordinate.- Returns:
- the ellipsoidal height of the vertical datum of this
ILcdGeodeticDatumfor the specified geodetic coordinates.
-