Class MolodenskiTransform

  • All Implemented Interfaces:
    Serializable, MathTransform

    public class MolodenskiTransform
    extends AbstractMathTransform
    implements Serializable
    Two- or three-dimensional datum shift using the (potentially abridged) Molodensky transformation. The Molodensky transformation (EPSG code 9604) and the abridged Molodensky transformation (EPSG code 9605) transform two or three dimensional geographic points from one geographic coordinate reference system to another (a datum shift), using three shift parameters (delta X, delta Y, delta Z) and the difference between the semi-major axis and flattenings of the two ellipsoids.

    Unlike the Bursa-Wolf 3 parameter method (which acts on geocentric coordinates), this transformation can be performed directly on geographic coordinates.

    References:

    • Defense Mapping Agency (DMA), Datums, Ellipsoids, Grids and Grid Reference Systems, Technical Manual 8358.1. Available from http://earth-info.nga.mil/GandG/pubs.html
    • Defense Mapping Agency (DMA), The Universal Grids: Universal Transverse Mercator (UTM) and Universal Polar Stereographic (UPS), Fairfax VA, Technical Manual 8358.2. Available from http://earth-info.nga.mil/GandG/pubs.html
    • National Imagery and Mapping Agency (NIMA), Department of Defense World Geodetic System 1984, Technical Report 8350.2. Available from http://earth-info.nga.mil/GandG/pubs.html
    • "Coordinate Conversions and Transformations including Formulas", EPSG Guidence Note Number 7, Version 19.
    Since:
    2.1
    Author:
    Rueben Schulz, Martin Desruisseaux
    See Also:
    Serialized Form
    • Constructor Detail

      • MolodenskiTransform

        public MolodenskiTransform​(boolean abridged,
                                   double a,
                                   double b,
                                   boolean source3D,
                                   double ta,
                                   double tb,
                                   boolean target3D,
                                   double dx,
                                   double dy,
                                   double dz)
        Constructs a Molodenski transform from the specified parameters.
        Parameters:
        abridged - true for the abridged formula, or false for the complete one.
        a - The source semi-major axis length in meters.
        b - The source semi-minor axis length in meters.
        source3D - true if the source has a height.
        ta - The target semi-major axis length in meters.
        tb - The target semi-minor axis length in meters.
        target3D - true if the target has a height.
        dx - The x translation in meters.
        dy - The y translation in meters.
        dz - The z translation in meters.
    • Method Detail

      • transform

        public void transform​(double[] srcPts,
                              int srcOff,
                              double[] dstPts,
                              int dstOff,
                              int numPts)
        Transforms a list of coordinate point ordinal values. This method is provided for efficiently transforming many points. The supplied array of ordinal values will contain packed ordinal values. For example, if the source dimension is 3, then the ordinals will be packed in this order:

        (x0,y0,z0, x1,y1,z1 ...).

        Specified by:
        transform in interface MathTransform
        Parameters:
        srcPts - the array containing the source point coordinates.
        srcOff - the offset to the first point to be transformed in the source array.
        dstPts - the array into which the transformed point coordinates are returned. May be the same than srcPts.
        dstOff - the offset to the location of the first transformed point that is stored in the destination array.
        numPts - the number of point objects to be transformed.
      • transform

        public void transform​(float[] srcPts,
                              int srcOff,
                              float[] dstPts,
                              int dstOff,
                              int numPts)
        Transforms a list of coordinate point ordinal values. This method is provided for efficiently transforming many points. The supplied array of ordinal values will contain packed ordinal values. For example, if the source dimension is 3, then the ordinals will be packed in this order:

        (x0,y0,z0, x1,y1,z1 ...).

        Specified by:
        transform in interface MathTransform
        Overrides:
        transform in class AbstractMathTransform
        Parameters:
        srcPts - the array containing the source point coordinates.
        srcOff - the offset to the first point to be transformed in the source array.
        dstPts - the array into which the transformed point coordinates are returned. May be the same than srcPts.
        dstOff - the offset to the location of the first transformed point that is stored in the destination array.
        numPts - the number of point objects to be transformed.
      • isIdentity

        public boolean isIdentity()
        Returns true if this transform is the identity one. This transform is considered identity (minus rounding errors) if:

        • the X,Y,Z shift are zero
        • the source and target axis length are the same
        • the input and output dimension are the same.
        Specified by:
        isIdentity in interface MathTransform
        Overrides:
        isIdentity in class AbstractMathTransform
        Returns:
        true if this MathTransform is an identity transform; false otherwise.
        Since:
        2.5
      • equals

        public boolean equals​(Object o)
        Description copied from class: AbstractMathTransform
        Compares the specified object with this math transform for equality. The default implementation checks if object is an instance of the same class than this and use the same parameter descriptor. Subclasses should override this method in order to compare internal fields.
        Overrides:
        equals in class AbstractMathTransform
        Parameters:
        o - The object to compare with this transform.
        Returns:
        true if the given object is a transform of the same class and if, given identical source position, the transformed position would be the equals.