public class InterpolatedGeocentricTransform extends DatumShiftTransform
Many datum shift grids like NADCON and NTv2 apply the changes directly on geographic coordinates.
This relatively simple case is handled by InterpolatedTransform.
But the InterpolatedGeocentricTransform algorithm uses the grid in a more complex way:
DatumShiftGrid for the offset to apply for coordinate (λ,φ).
But instead of returning a (Δλ, Δφ) offset, the grid shall return a (ΔX, ΔY, ΔZ) offset.NTG_88.pdf,
"Grille de paramètres de transformation de coordonnées"
at http://www.ign.fr.
Note however that the signs of (ΔX, ΔY, ΔZ) values expected by this class are the opposite of the
signs used in NTG_88 document. This is because NTG_88 grid defines shifts from target to source,
while this class expects shifts from source to target.
Note: this algorithm is not the same as a (theoretical) EllipsoidToCentricTransform →
InterpolatedTransform → (inverse of EllipsoidToCentricTransform) concatenation
because the DatumShiftGrid inputs are geographic coordinates even if the interpolated
grid values are in geocentric space.
InterpolatedMolodenskyTransform performs the same calculation more efficiently at the cost of
a few centimetres error. Both classes are instantiated in the same way and expect the same inputs.InterpolatedMolodenskyTransform,
Serialized FormDefined in the sis-referencing module
| Modifier | Constructor and Description |
|---|---|
protected |
InterpolatedGeocentricTransform(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 |
|---|---|
static MathTransform |
createGeodeticTransformation(MathTransformFactory factory,
Ellipsoid source,
boolean isSource3D,
Ellipsoid target,
boolean isTarget3D,
DatumShiftGrid<Angle,Length> grid)
Creates a transformation between two geographic CRS.
|
int |
getSourceDimensions()
Gets the dimension of input points.
|
int |
getTargetDimensions()
Gets the dimension of output points.
|
MathTransform |
inverse()
Returns the inverse of this interpolated geocentric 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.
|
computeHashCode, equals, getContextualParameters, getParameterValuesderivative, equals, formatTo, getParameterDescriptors, hashCode, isIdentity, transform, transform, transform, transform, transform, tryConcatenateprint, toString, toString, toWKTclone, finalize, getClass, notify, notifyAll, wait, wait, waittoWKTprotected InterpolatedGeocentricTransform(Ellipsoid source, boolean isSource3D, Ellipsoid target, boolean isTarget3D, DatumShiftGrid<Angle,Length> grid)
InterpolatedGeocentricTransform class expects ordinate values in the following order and units:
InterpolatedGeocentricTransform instances
need to be concatenated with the following affine transforms:
InterpolatedGeocentricTransform:InterpolatedGeocentricTransform:InterpolatedGeocentricTransform 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
InterpolatedGeocentricTransform 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 int getSourceDimensions()
getSourceDimensions in interface MathTransformgetSourceDimensions in class AbstractMathTransformDefaultOperationMethod.getSourceDimensions()public int getTargetDimensions()
getTargetDimensions in interface MathTransformgetTargetDimensions in class AbstractMathTransformDefaultOperationMethod.getTargetDimensions()public Matrix transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate) throws TransformException
transform in class AbstractMathTransformsrcPts - 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 MathTransform inverse()
inverse in interface MathTransforminverse in class AbstractMathTransformCopyright © 2010–2017 The Apache Software Foundation. All rights reserved.