Class MolodenskiTransform
Object
Formattable
AbstractMathTransform
MolodenskiTransform
- All Implemented Interfaces:
Serializable
,MathTransform
Two- or three-dimensional datum shift using the (potentially abridged) Molodensky transformation. The Molodensky
transformation (EPSG code 9604) and the abridged Molodensky transformation (EPSG code 9605) transform two or three
dimensional geographic points from one geographic coordinate reference system to another (a datum shift), using three
shift parameters (delta X, delta Y, delta Z) and the difference between the semi-major axis and flattenings of the
two ellipsoids.
Unlike the Bursa-Wolf 3 parameter method (which acts on geocentric coordinates), this transformation can be performed directly on geographic coordinates.
References:
- Defense Mapping Agency (DMA), Datums, Ellipsoids, Grids and Grid Reference Systems, Technical Manual 8358.1. Available from http://earth-info.nga.mil/GandG/pubs.html
- Defense Mapping Agency (DMA), The Universal Grids: Universal Transverse Mercator (UTM) and Universal Polar Stereographic (UPS), Fairfax VA, Technical Manual 8358.2. Available from http://earth-info.nga.mil/GandG/pubs.html
- National Imagery and Mapping Agency (NIMA), Department of Defense World Geodetic System 1984, Technical Report 8350.2. Available from http://earth-info.nga.mil/GandG/pubs.html
- "Coordinate Conversions and Transformations including Formulas", EPSG Guidence Note Number 7, Version 19.
- Since:
- 2.1
- Author:
- Rueben Schulz, Martin Desruisseaux
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The provider forMolodenskiTransform
.static class
The provider for abridgedMolodenskiTransform
.Nested classes/interfaces inherited from class AbstractMathTransform
AbstractMathTransform.Inverse
-
Field Summary
Fields inherited from class Formattable
SINGLE_LINE
-
Constructor Summary
ConstructorsConstructorDescriptionMolodenskiTransform
(boolean abridged, double a, double b, boolean source3D, double ta, double tb, boolean target3D, double dx, double dy, double dz) Constructs a Molodenski transform from the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specified object with this math transform for equality.Returns the parameter descriptors for this math transform.Returns the parameters for this math transform.int
Gets the dimension of input points.final int
Gets the dimension of output points.int
hashCode()
Returns a hash value for this transform.inverse()
Creates the inverse transform of this object.boolean
Returnstrue
if this transform is the identity one.void
transform
(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Transforms a list of coordinate point ordinal values.void
transform
(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Transforms a list of coordinate point ordinal values.Methods inherited from class AbstractMathTransform
createTransformedShape, derivative, derivative, ensureNonNull, formatWKT, getName, needCopy, normalizeAngle, rollLongitude, transform, transform, transform, transform
Methods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
Methods inherited from interface MathTransform
toWKT
-
Constructor Details
-
MolodenskiTransform
public MolodenskiTransform(boolean abridged, double a, double b, boolean source3D, double ta, double tb, boolean target3D, double dx, double dy, double dz) Constructs a Molodenski transform from the specified parameters.- Parameters:
abridged
-true
for the abridged formula, orfalse
for the complete one.a
- The source semi-major axis length in meters.b
- The source semi-minor axis length in meters.source3D
-true
if the source has a height.ta
- The target semi-major axis length in meters.tb
- The target semi-minor axis length in meters.target3D
-true
if the target has a height.dx
- The x translation in meters.dy
- The y translation in meters.dz
- The z translation in meters.
-
-
Method Details
-
getParameterDescriptors
Returns the parameter descriptors for this math transform.- Overrides:
getParameterDescriptors
in classAbstractMathTransform
- Returns:
- The parameter descriptors for this math transform, or
null
. - See Also:
-
getParameterValues
Returns the parameters for this math transform.- Overrides:
getParameterValues
in classAbstractMathTransform
- Returns:
- The parameters for this math transform.
- See Also:
-
getSourceDimensions
public int getSourceDimensions()Gets the dimension of input points.- Specified by:
getSourceDimensions
in interfaceMathTransform
- Specified by:
getSourceDimensions
in classAbstractMathTransform
- Returns:
- The dimension of input points.
-
getTargetDimensions
public final int getTargetDimensions()Gets the dimension of output points.- Specified by:
getTargetDimensions
in interfaceMathTransform
- Specified by:
getTargetDimensions
in classAbstractMathTransform
- Returns:
- The dimension of output points.
-
transform
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) Transforms a list of coordinate point ordinal values. This method is provided for efficiently transforming many points. The supplied array of ordinal values will contain packed ordinal values. For example, if the source dimension is 3, then the ordinals will be packed in this order:(x0,y0,z0, x1,y1,z1 ...).
- Specified by:
transform
in interfaceMathTransform
- 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.
-
transform
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) Transforms a list of coordinate point ordinal values. This method is provided for efficiently transforming many points. The supplied array of ordinal values will contain packed ordinal values. For example, if the source dimension is 3, then the ordinals will be packed in this order:(x0,y0,z0, x1,y1,z1 ...).
- Specified by:
transform
in interfaceMathTransform
- Overrides:
transform
in classAbstractMathTransform
- 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.
-
isIdentity
public boolean isIdentity()Returnstrue
if this transform is the identity one. This transform is considered identity (minus rounding errors) if:- the X,Y,Z shift are zero
- the source and target axis length are the same
- the input and output dimension are the same.
- Specified by:
isIdentity
in interfaceMathTransform
- Overrides:
isIdentity
in classAbstractMathTransform
- Returns:
true
if thisMathTransform
is an identity transform;false
otherwise.- Since:
- 2.5
-
inverse
Creates the inverse transform of this object.- Specified by:
inverse
in interfaceMathTransform
- Overrides:
inverse
in classAbstractMathTransform
- Returns:
- The inverse transform.
-
equals
Description copied from class:AbstractMathTransform
Compares the specified object with this math transform for equality. The default implementation checks ifobject
is an instance of the same class thanthis
and use the same parameter descriptor. Subclasses should override this method in order to compare internal fields.- Overrides:
equals
in classAbstractMathTransform
- Parameters:
o
- The object to compare with this transform.- Returns:
true
if the given object is a transform of the same class and if, given identical source position, the transformed position would be the equals.
-
hashCode
public int hashCode()Description copied from class:AbstractMathTransform
Returns a hash value for this transform.- Overrides:
hashCode
in classAbstractMathTransform
-