public class MolodenskyTransform extends DatumShiftTransform
MolodenskyTransform
s 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.
isSource3D
= false
),
then the source dimensions is 2 and the height is
assumed to be zero.isTarget3D
= false
),
then the target dimensions is 2 and the computed
height (typically non-zero even if the input height was zero) is lost.MathTransform
has been created:
MolodenskyTransform
instances created directly by the constructor work with angular values in radians.
That constructor is reserved for subclasses only.createGeodeticTransformation(…)
static method
work with angular values in degrees and heights in the same units than the source ellipsoid
axes (usually metres).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.
Defined in the sis-referencing
module
AbstractMathTransform.Inverse
Modifier and Type | Field and Description |
---|---|
protected double |
eccentricitySquared
The square of eccentricity of the source ellipsoid.
|
protected double |
semiMajor
Semi-major axis length (a) of the source ellipsoid.
|
protected double |
tX
Shift along the geocentric X axis (toward prime meridian)
in units of the semi-major axis of the source ellipsoid.
|
protected double |
tY
Shift along the geocentric Y axis (toward 90°E)
in units of the semi-major axis of the source ellipsoid.
|
protected double |
tZ
Shift along the geocentric Z axis (toward north pole)
in units of the semi-major axis of the source ellipsoid.
|
Modifier | Constructor and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
protected int |
computeHashCode()
Computes a hash value for this transform.
|
static MathTransform |
createGeodeticTransformation(MathTransformFactory factory,
Ellipsoid source,
boolean isSource3D,
Ellipsoid target,
boolean isTarget3D,
double tX,
double tY,
double tZ,
boolean isAbridged)
Creates a transformation between two from geographic CRS.
|
boolean |
equals(Object object,
ComparisonMode mode)
Compares the specified object with this math transform for equality.
|
ParameterDescriptorGroup |
getParameterDescriptors()
Returns a description of the internal parameters of this
MolodenskyTransform transform. |
ParameterValueGroup |
getParameterValues()
Returns a copy of internal parameter values of this transform.
|
int |
getSourceDimensions()
Gets the dimension of input points.
|
int |
getTargetDimensions()
Gets the dimension of output points.
|
MathTransform |
inverse()
Returns the inverse of this Molodensky transform.
|
boolean |
isIdentity()
Returns
true if this transform is the identity one. |
Matrix |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
boolean derivate)
Transforms the (λ,φ) or (λ,φ,h) coordinates between two geographic CRS,
and optionally returns the derivative at that location.
|
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms the (λ,φ) or (λ,φ,h) coordinates between two geographic CRS.
|
getContextualParameters
derivative, equals, formatTo, hashCode, transform, transform, transform, transform, tryConcatenate
print, toString, toString, toWKT
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toWKT
protected final double tX
BursaWolfParameters.tX
protected final double tY
BursaWolfParameters.tY
protected final double tZ
BursaWolfParameters.tZ
protected final double semiMajor
protected final double eccentricitySquared
protected MolodenskyTransform(Ellipsoid source, boolean isSource3D, Ellipsoid target, boolean isTarget3D, double tX, double tY, double tZ, boolean isAbridged)
MolodenskyTransform
class expects ordinate values in the following order and units:
MolodenskyTransform
instances
need to be concatenated with the following affine transforms:
MolodenskyTransform
:MolodenskyTransform
:MolodenskyTransform
construction,
the full conversion chain including the above affine transforms can be created by
DatumShiftTransform.getContextualParameters().completeTransform(factory, this)}
.source
- the source ellipsoid.isSource3D
- true
if the source coordinates have a height.target
- the target ellipsoid.isTarget3D
- true
if the target coordinates have a height.tX
- the geocentric X translation in same units than the source ellipsoid axes.tY
- the geocentric Y translation in same units than the source ellipsoid axes.tZ
- the geocentric Z translation in same units than the source ellipsoid axes.isAbridged
- true
for the abridged formula, or false
for the complete one.createGeodeticTransformation(MathTransformFactory, Ellipsoid, boolean, Ellipsoid, boolean, double, double, double, boolean)
public static MathTransform createGeodeticTransformation(MathTransformFactory factory, Ellipsoid source, boolean isSource3D, Ellipsoid target, boolean isTarget3D, double tX, double tY, double tZ, boolean isAbridged) throws FactoryException
MolodenskyTransform
instance with the steps needed for converting values between
degrees to radians. The transform works with input and output coordinates in the following units:
factory
- the factory to use for creating the transform.source
- the source ellipsoid.isSource3D
- true
if the source coordinates have a height.target
- the target ellipsoid.isTarget3D
- true
if the target coordinates have a height.tX
- the geocentric X translation in same units than the source ellipsoid axes.tY
- the geocentric Y translation in same units than the source ellipsoid axes.tZ
- the geocentric Z translation in same units than the source ellipsoid axes.isAbridged
- true
for the abridged formula, or false
for the complete one.FactoryException
- if an error occurred while creating a transform.public boolean isIdentity()
true
if this transform is the identity one.
Molodensky transform is considered identity (minus rounding errors) if:
isIdentity
in interface MathTransform
isIdentity
in class AbstractMathTransform
true
if this transform is the identity transform.public Matrix transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate) throws TransformException
transform
in class AbstractMathTransform
srcPts
- the array containing the source coordinate (can not be null
).srcOff
- the offset to the point to be transformed in the source array.dstPts
- the array into which the transformed coordinate is returned. May be the same than srcPts
.
May be null
if only the derivative matrix is desired.dstOff
- the offset to the location of the transformed point that is stored in the destination array.derivate
- true
for computing the derivative, or false
if not needed.null
if the derivate
argument is false
.TransformException
- if the point can not be transformed or
if a problem occurred while calculating the derivative.AbstractMathTransform.derivative(DirectPosition)
,
AbstractMathTransform.transform(DirectPosition, DirectPosition)
,
MathTransforms.derivativeAndTransform(MathTransform, double[], int, double[], int)
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException
transform(double[], int, double[], int, boolean)
,
but the formulas are repeated here for performance reasons.transform
in interface MathTransform
transform
in class AbstractMathTransform
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.TransformException
- if a point can not be transformed.public MathTransform inverse()
inverse
in interface MathTransform
inverse
in class AbstractMathTransform
@Debug public ParameterDescriptorGroup getParameterDescriptors()
MolodenskyTransform
transform.
The returned group contains parameter descriptors for the number of dimensions and the eccentricity.
getParameterDescriptors
in interface Parameterized
getParameterDescriptors
in class AbstractMathTransform
DefaultOperationMethod.getParameters()
@Debug public ParameterValueGroup getParameterValues()
getParameterValues
in interface Parameterized
getParameterValues
in class DatumShiftTransform
AbstractMathTransform.getContextualParameters()
,
AbstractSingleOperation.getParameterValues()
public final int getSourceDimensions()
getSourceDimensions
in interface MathTransform
getSourceDimensions
in class AbstractMathTransform
DefaultOperationMethod.getSourceDimensions()
public final int getTargetDimensions()
getTargetDimensions
in interface MathTransform
getTargetDimensions
in class AbstractMathTransform
DefaultOperationMethod.getTargetDimensions()
protected int computeHashCode()
AbstractMathTransform.hashCode()
when first needed.computeHashCode
in class DatumShiftTransform
public boolean equals(Object object, ComparisonMode mode)
equals
in interface LenientComparable
equals
in class DatumShiftTransform
object
- the object to compare with this transform.mode
- the strictness level of the comparison. Default to STRICT
.true
if the given object is considered equals to this math transform.Utilities.deepEquals(Object, Object, ComparisonMode)
Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.