Class AbridgedMolodenskyTransform2D
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.operation.transform.AbstractMathTransform
org.apache.sis.referencing.operation.transform.DatumShiftTransform
org.apache.sis.referencing.operation.transform.MolodenskyFormula
org.apache.sis.referencing.operation.transform.MolodenskyTransform
org.apache.sis.referencing.operation.transform.MolodenskyTransform2D
org.apache.sis.referencing.operation.transform.AbridgedMolodenskyTransform2D
- All Implemented Interfaces:
Serializable
,Parameterized
,LenientComparable
,org.opengis.referencing.operation.MathTransform
,org.opengis.referencing.operation.MathTransform2D
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
AbstractMathTransform.Inverse
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
A combination ofMolodenskyFormula.ANGULAR_SCALE
with other fields in an expression that become constants because of the simplification applied in thisAbridgedMolodenskyTransform2D
.private static final long
Serial number for inter-operability with different versions.Fields inherited from class org.apache.sis.referencing.operation.transform.MolodenskyFormula
ANGULAR_SCALE, eccentricitySquared, isAbridged, isSource3D, isTarget3D, semiMajor, tX, tY, tZ, Δa, Δfmod
Fields inherited from class org.apache.sis.referencing.operation.transform.DatumShiftTransform
context, grid
Fields inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
MAXIMUM_BUFFER_SIZE, MAXIMUM_FAILURES
-
Constructor Summary
ConstructorsConstructorDescriptionAbridgedMolodenskyTransform2D
(MolodenskyTransform inverse, org.opengis.referencing.datum.Ellipsoid source, org.opengis.referencing.datum.Ellipsoid target) Constructs the inverse of a 2D transform.AbridgedMolodenskyTransform2D
(org.opengis.referencing.datum.Ellipsoid source, org.opengis.referencing.datum.Ellipsoid target) Constructs a 2D transform. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Computes thescale
field from existing fields.private void
Invoked on deserialization for restoring thescale
field.void
transform
(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Transforms the (λ,φ) coordinates between two geographic CRS.Methods inherited from class org.apache.sis.referencing.operation.transform.MolodenskyTransform2D
createTransformedShape, derivative, inverse, transform
Methods inherited from class org.apache.sis.referencing.operation.transform.MolodenskyTransform
completeParameters, createGeodeticTransformation, getParameterDescriptors, isIdentity, transform
Methods inherited from class org.apache.sis.referencing.operation.transform.MolodenskyFormula
computeHashCode, equals, getParameterValues, getSourceDimensions, getTargetDimensions, transform
Methods inherited from class org.apache.sis.referencing.operation.transform.DatumShiftTransform
ensureGeocentricTranslation, getContextualParameters, normalizedToGridX, normalizedToGridY, setContextParameters
Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
beforeFormat, derivative, equals, formatTo, getDomain, hashCode, isInverseEquals, mismatchedDimension, transform, transform, transform, transform, tryConcatenate
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.referencing.operation.MathTransform
derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
scale
private transient double scaleA combination ofMolodenskyFormula.ANGULAR_SCALE
with other fields in an expression that become constants because of the simplification applied in thisAbridgedMolodenskyTransform2D
.
-
-
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 giveninverse
transform.target
- the target ellipsoid of the giveninverse
transform.
-
-
Method Details
-
readObject
Invoked on deserialization for restoring thescale
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 thescale
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 thanMolodenskyTransform
, but the formulas are repeated and simplified here for performance reasons. In addition of using abridged Molodensky formulas, this method assumes thatMolodenskyFormula.tX
,MolodenskyFormula.tY
andMolodenskyFormula.tZ
fields are zero.- Specified by:
transform
in interfaceorg.opengis.referencing.operation.MathTransform
- Overrides:
transform
in classMolodenskyTransform
- 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 thansrcPts
.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.
-