org.geotools.referencing.operation.transform
Class MolodenskiTransform

Object
  extended by Formattable
      extended by AbstractMathTransform
          extended by MolodenskiTransform
All Implemented Interfaces:
Serializable, MathTransform

public class MolodenskiTransform
extends AbstractMathTransform
implements Serializable

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:

Since:
2.1
Author:
Rueben Schulz, Martin Desruisseaux
See Also:
Serialized Form

Nested Class Summary
static class MolodenskiTransform.Provider
          The provider for MolodenskiTransform.
static class MolodenskiTransform.ProviderAbridged
          The provider for abridged MolodenskiTransform.
 
Nested classes/interfaces inherited from class AbstractMathTransform
AbstractMathTransform.Inverse
 
Field Summary
 
Fields inherited from class Formattable
SINGLE_LINE
 
Constructor Summary
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.
 
Method Summary
 boolean equals(Object object)
          Compares the specified object with this math transform for equality.
 ParameterDescriptorGroup getParameterDescriptors()
          Returns the parameter descriptors for this math transform.
 ParameterValueGroup getParameterValues()
          Returns the parameters for this math transform.
 int getSourceDimensions()
          Gets the dimension of input points.
 int getTargetDimensions()
          Gets the dimension of output points.
 int hashCode()
          Returns a hash value for this transform.
 MathTransform inverse()
          Creates the inverse transform of this object.
 boolean isIdentity()
          Returns true 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, rollLongitude, transform, transform, transform, transform
 
Methods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface MathTransform
toWKT
 

Constructor Detail

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, or false 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 Detail

getParameterDescriptors

public ParameterDescriptorGroup getParameterDescriptors()
Returns the parameter descriptors for this math transform.

Overrides:
getParameterDescriptors in class AbstractMathTransform
Returns:
The parameter descriptors for this math transform, or null.
See Also:
OperationMethod.getParameters()

getParameterValues

public ParameterValueGroup getParameterValues()
Returns the parameters for this math transform.

Overrides:
getParameterValues in class AbstractMathTransform
Returns:
The parameters for this math transform.
See Also:
Operation.getParameterValues()

getSourceDimensions

public int getSourceDimensions()
Gets the dimension of input points.

Specified by:
getSourceDimensions in interface MathTransform
Specified by:
getSourceDimensions in class AbstractMathTransform
Returns:
The dimension of input points.

getTargetDimensions

public final int getTargetDimensions()
Gets the dimension of output points.

Specified by:
getTargetDimensions in interface MathTransform
Specified by:
getTargetDimensions in class AbstractMathTransform
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 interface MathTransform
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 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.

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 interface MathTransform
Overrides:
transform in class AbstractMathTransform
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 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.

isIdentity

public boolean isIdentity()
Returns true if this transform is the identity one. This transform is considered identity (minus rounding errors) if:

Specified by:
isIdentity in interface MathTransform
Overrides:
isIdentity in class AbstractMathTransform
Returns:
true if this MathTransform is an identity transform; false otherwise.
Since:
2.5

inverse

public MathTransform inverse()
Creates the inverse transform of this object.

Specified by:
inverse in interface MathTransform
Overrides:
inverse in class AbstractMathTransform
Returns:
The inverse transform.

hashCode

public final int hashCode()
Returns a hash value for this transform.

Overrides:
hashCode in class AbstractMathTransform

equals

public final boolean equals(Object object)
Compares the specified object with this math transform for equality.

Overrides:
equals in class AbstractMathTransform
Parameters:
object - 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.


Copyright © 1996-2014 Geotools. All Rights Reserved.