public class InterpolatedMolodenskyTransform extends DatumShiftTransform
InterpolatedGeocentricTransform
, but uses the Molodensy
(non-abridged) approximation for performance reasons.
Errors are less than 3 centimetres for the "France geocentric interpolation" (ESPG:9655).
By comparison, the finest accuracy reported in the grid file for France is 5 centimetres.
Many datum shift grids like NADCON and NTv2 apply the interpolated translations directly on geographic coordinates.
This relatively simple case is handled by InterpolatedTransform
.
But in the InterpolatedMolodenskyTransform
case, the interpolated translations are rather the
(tX, tY, tZ) parameters of a Molodensky transformation.
InterpolatedGeocentricTransform
,
Serialized FormDefined in the sis-referencing
module
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 |
InterpolatedMolodenskyTransform(Ellipsoid source,
boolean isSource3D,
Ellipsoid target,
boolean isTarget3D,
DatumShiftGrid<Angle,Length> grid)
Creates a 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,
DatumShiftGrid<Angle,Length> grid)
Creates a transformation between two 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
InterpolatedMolodenskyTransform 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 interpolated Molodensky transform.
|
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, isIdentity, 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 InterpolatedMolodenskyTransform(Ellipsoid source, boolean isSource3D, Ellipsoid target, boolean isTarget3D, DatumShiftGrid<Angle,Length> grid)
InterpolatedMolodenskyTransform
class expects ordinate values in the following order and units:
InterpolatedMolodenskyTransform
instances
need to be concatenated with the following affine transforms:
InterpolatedMolodenskyTransform
:InterpolatedMolodenskyTransform
:InterpolatedMolodenskyTransform
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.grid
- the grid of datum shifts from source to target datum.
The DatumShiftGrid.interpolateInCell(…)
method
shall compute (ΔX, ΔY, ΔZ) translations from source to target in the
unit of source ellipsoid axes.createGeodeticTransformation(MathTransformFactory, Ellipsoid, boolean, Ellipsoid, boolean, DatumShiftGrid)
public static MathTransform createGeodeticTransformation(MathTransformFactory factory, Ellipsoid source, boolean isSource3D, Ellipsoid target, boolean isTarget3D, DatumShiftGrid<Angle,Length> grid) throws FactoryException
InterpolatedMolodenskyTransform
instance with the steps needed for converting values between
degrees to radians. The transform works with input and output coordinates in the following units:
grid
instance shall expect geographic coordinates (λ,φ)
in radians.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.grid
- the grid of datum shifts from source to target datum.
The DatumShiftGrid.interpolateInCell(…)
method
shall compute (ΔX, ΔY, ΔZ) translations from source to target in the
unit of source ellipsoid axes.FactoryException
- if an error occurred while creating a 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(…)
method,
but on an arbitrary amount of coordinates and without computing derivative.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()
InterpolatedMolodenskyTransform
transform.
The returned group contains parameters for the source ellipsoid semi-axis lengths and the differences between
source and target ellipsoid parameters.
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.