Class AbridgedMolodenskyTransform2D

All Implemented Interfaces:
Serializable, Parameterized, LenientComparable, org.opengis.referencing.operation.MathTransform, org.opengis.referencing.operation.MathTransform2D

final class AbridgedMolodenskyTransform2D extends MolodenskyTransform2D
Two-dimensional abridged Molodensky transform with all translation terms fixed to zero. This implementation performs only a change of ellipsoid. It provides nothing new compared to MolodenskyFormula, except performance.

Note: this transform is yet more abridged than standard "abridged Molondensky" transform since it sets all translation terms to zero. A better class name could be "Very abridged Molodensky transform". For the usual abridged Molondensky with non-zero translation terms, use the parent class.

Since:
0.8
Version:
0.8
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial number for inter-operability with different versions.
      See Also:
    • scale

      private transient double scale
      A combination of MolodenskyFormula.ANGULAR_SCALE with other fields in an expression that become constants because of the simplification applied in this AbridgedMolodenskyTransform2D.
  • Constructor Details

    • AbridgedMolodenskyTransform2D

      AbridgedMolodenskyTransform2D(org.opengis.referencing.datum.Ellipsoid source, org.opengis.referencing.datum.Ellipsoid target)
      Constructs a 2D transform.
    • AbridgedMolodenskyTransform2D

      AbridgedMolodenskyTransform2D(MolodenskyTransform inverse, org.opengis.referencing.datum.Ellipsoid source, org.opengis.referencing.datum.Ellipsoid target)
      Constructs the inverse of a 2D transform.
      Parameters:
      inverse - the transform for which to create the inverse.
      source - the source ellipsoid of the given inverse transform.
      target - the target ellipsoid of the given inverse transform.
  • Method Details

    • readObject

      private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
      Invoked on deserialization for restoring the scale field.
      Parameters:
      in - the input stream from which to deserialize a math transform.
      Throws:
      IOException - if an I/O error occurred while reading or if the stream contains invalid data.
      ClassNotFoundException - if the class serialized on the stream is not on the classpath.
    • computeTransientFields

      private void computeTransientFields()
      Computes the scale field from existing fields.
    • transform

      public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
      Transforms the (λ,φ) coordinates between two geographic CRS. This method performs the same transformation than MolodenskyTransform, but the formulas are repeated and simplified here for performance reasons. In addition of using abridged Molodensky formulas, this method assumes that MolodenskyFormula.tX, MolodenskyFormula.tY and MolodenskyFormula.tZ fields are zero.
      Specified by:
      transform in interface org.opengis.referencing.operation.MathTransform
      Overrides:
      transform in class MolodenskyTransform
      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.