Class MolodenskyTransform

  • All Implemented Interfaces:
    Serializable, Parameterized, Lenient­Comparable, Math­Transform

    public class MolodenskyTransform
    extends DatumShiftTransform
    Two- or three-dimensional datum shift using the (potentially abridged) Molodensky transformation. The Molodensky transformation (EPSG:9604) and the abridged Molodensky transformation (EPSG:9605) transform geographic points from one geographic coordinate reference system to another (a datum shift). The Molodensky formulas are approximations of Geocentric translation (geographic domain) transformations (EPSG:1035 and 9603), but performed directly on geographic coordinates without Geographic/Geocentric conversions.

    Molodensky­Transforms works conceptually on three-dimensional coordinates, but the ellipsoidal height can be omitted resulting in two-dimensional coordinates. No dimension other than 2 or 3 are allowed.

    • If the height is omitted from the input coordinates (is­Source3D = false), then the source dimensions is 2 and the height is assumed to be zero.
    • If the height is omitted from the output coordinates (is­Target3D = false), then the target dimensions is 2 and the computed height (typically non-zero even if the input height was zero) is lost.
    The transform expect coordinate values if the following order:
    1. longitudes (λ) relative to the prime meridian (usually Greenwich),
    2. latitudes (φ),
    3. optionally heights above the ellipsoid (h).
    The units of measurements depend on how the Math­Transform has been created:
    • Molodensky­Transform instances created directly by the constructor work with angular values in radians. That constructor is reserved for subclasses only.
    • Transforms created by the create­Geodetic­Transformation(…) static method work with angular values in degrees and heights in the same units than the source ellipsoid axes (usually metres).
    Comparison of Molodensky and geocentric translation
    Compared to the "Geocentric translation (geographic domain)" method, the Molodensky method has errors usually within a few centimetres. The Abridged Molodensky method has more noticeable errors, of a few tenths of centimetres.

    Another difference between Molodensky and geocentric translation methods is their behavior when crossing the anti-meridian. If a datum shift causes a longitude to cross the anti-meridian (e.g. 179.999° become 180.001°), the Molodensky method will keep 180.001° as-is while the geocentric translation method will wrap the longitude to -179.999°. Such wrap-around behavior may or may not be desired, depending on the applications.

    Since:
    0.7
    See Also:
    Serialized Form

    Defined in the sis-referencing module

    • Field Detail

      • tX

        protected final double tX
        Shift along the geocentric X axis (toward prime meridian) in units of the semi-major axis of the source ellipsoid.
        See Also:
        Bursa­Wolf­Parameters​.t­X
      • tY

        protected final double tY
        Shift along the geocentric Y axis (toward 90°E) in units of the semi-major axis of the source ellipsoid.
        See Also:
        Bursa­Wolf­Parameters​.t­Y
      • tZ

        protected final double tZ
        Shift along the geocentric Z axis (toward north pole) in units of the semi-major axis of the source ellipsoid.
        See Also:
        Bursa­Wolf­Parameters​.t­Z
      • semiMajor

        protected final double semiMajor
        Semi-major axis length (a) of the source ellipsoid.
      • eccentricitySquared

        protected final double eccentricitySquared
        The square of eccentricity of the source ellipsoid. This can be computed by ℯ² = (a²-b²)/a² where a is the semi-major axis length and b is the semi-minor axis length.
        See Also:
        Default­Ellipsoid​.get­Eccentricity­Squared()
    • Constructor Detail

      • MolodenskyTransform

        protected MolodenskyTransform​(Ellipsoid source,
                                      boolean isSource3D,
                                      Ellipsoid target,
                                      boolean isTarget3D,
                                      double tX,
                                      double tY,
                                      double tZ,
                                      boolean isAbridged)
        Creates a Molodensky transform from the specified parameters. This Molodensky­Transform class expects coordinate values in the following order and units:
        1. longitudes in radians relative to the prime meridian (usually Greenwich),
        2. latitudes in radians,
        3. optionally heights above the ellipsoid, in same units than the source ellipsoid axes.
        For converting geographic coordinates in degrees, Molodensky­Transform instances need to be concatenated with the following affine transforms:
        • Normalization before Molodensky­Transform:
          • Conversion of (λ,φ) from degrees to radians.
        • Denormalization after Molodensky­Transform:
          • Conversion of (λ,φ) from radians to degrees.
        After Molodensky­Transform construction, the full conversion chain including the above affine transforms can be created by Datum­Shift­Transform​.get­Contextual­Parameters().complete­Transform(factory, this)}.
        Parameters:
        source - the source ellipsoid.
        is­Source3D - true if the source coordinates have a height.
        target - the target ellipsoid.
        is­Target3D - true if the target coordinates have a height.
        t­X - the geocentric X translation in same units than the source ellipsoid axes.
        t­Y - the geocentric Y translation in same units than the source ellipsoid axes.
        t­Z - the geocentric Z translation in same units than the source ellipsoid axes.
        is­Abridged - true for the abridged formula, or false for the complete one.
        See Also:
        create­Geodetic­Transformation(Math­Transform­Factory, Ellipsoid, boolean, Ellipsoid, boolean, double, double, double, boolean)