org.geotoolkit.referencing.operation.transform
Class VerticalTransform

Object
  extended by FormattableObject
      extended by AbstractMathTransform
          extended by VerticalTransform
All Implemented Interfaces:
Formattable, Parameterized, LenientComparable, MathTransform
Direct Known Subclasses:
EarthGravitationalModel

@ThreadSafe
public abstract class VerticalTransform
extends AbstractMathTransform

Base class for transformations from a height above the ellipsoid to a height above the geoid. This transform expects three-dimensional geographic coordinates in (longitude, latitude, height) order. The transformations are usually backed by some ellipsoid-dependent database.

Since:
2.3
Version:
3.20
Author:
Martin Desruisseaux (IRD, Geomatys)
Module:
referencing/geotk-referencing3D (download)    View source code for this class

Nested Class Summary
 
Nested classes/interfaces inherited from class AbstractMathTransform
AbstractMathTransform.Inverse
 
Field Summary
 
Fields inherited from class FormattableObject
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE
 
Constructor Summary
protected VerticalTransform()
          Creates a new instance of VerticalTransform.
 
Method Summary
 int getSourceDimensions()
          Gets the dimension of input points, which is 3.
 int getTargetDimensions()
          Gets the dimension of output points, which is 3.
protected abstract  double heightOffset(double longitude, double latitude, double height)
          Returns the value to add to a height above the ellipsoid in order to get a height above the geoid for the specified geographic coordinate.
 Matrix transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, boolean derivate)
          Transforms a single coordinate point in a list of ordinal values, and optionally computes the derivative at that location.
 void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
          Transforms a list of coordinate point ordinal values.
 void transform(double[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
          Transforms a list of coordinate point ordinal values.
 void transform(float[] 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
computeHashCode, createTransformedShape, derivative, derivative, ensureNonNull, equals, equals, formatWKT, getName, getParameterDescriptors, getParameterValues, hashCode, inverse, isIdentity, rollLongitude, transform, transform
 
Methods inherited from class FormattableObject
getDefaultIndentation, print, setDefaultIndentation, 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

VerticalTransform

protected VerticalTransform()
Creates a new instance of VerticalTransform.

Method Detail

getSourceDimensions

public final int getSourceDimensions()
Gets the dimension of input points, which is 3.

Specified by:
getSourceDimensions in interface MathTransform
Specified by:
getSourceDimensions in class AbstractMathTransform

getTargetDimensions

public final int getTargetDimensions()
Gets the dimension of output points, which is 3.

Specified by:
getTargetDimensions in interface MathTransform
Specified by:
getTargetDimensions in class AbstractMathTransform

heightOffset

protected abstract double heightOffset(double longitude,
                                       double latitude,
                                       double height)
                                throws TransformException
Returns the value to add to a height above the ellipsoid in order to get a height above the geoid for the specified geographic coordinate.

Parameters:
longitude - The geodetic longitude, in decimal degrees.
latitude - The geodetic latitude, in decimal degrees.
height - The height above the ellipsoid in metres.
Returns:
The value to add in order to get the height above the geoid (in metres).
Throws:
TransformException - if the offset can't be computed for the specified coordinates.

transform

public Matrix transform(double[] srcPts,
                        int srcOff,
                        double[] dstPts,
                        int dstOff,
                        boolean derivate)
                 throws TransformException
Transforms a single coordinate point in a list of ordinal values, and optionally computes the derivative at that location.

Specified by:
transform in class AbstractMathTransform
Parameters:
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.
Returns:
The matrix of the transform derivative at the given source position, or null if the derivate argument is false.
Throws:
TransformException - If the point can't be transformed.
Since:
3.20 (derived from 3.00)
See Also:
AbstractMathTransform.derivative(DirectPosition), AbstractMathTransform.transform(DirectPosition, DirectPosition), MathTransforms.derivativeAndTransform(MathTransform, double[], int, double[], int)

transform

public void transform(double[] srcPts,
                      int srcOff,
                      double[] dstPts,
                      int dstOff,
                      int numPts)
               throws TransformException
Transforms a list of coordinate point ordinal values.

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.
Throws:
TransformException - if a point can't be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the un-transformable points with NaN values, continue and throw the exception only at end. Implementations that fall in the later case should set the last completed transform to this.

transform

public void transform(float[] srcPts,
                      int srcOff,
                      float[] dstPts,
                      int dstOff,
                      int numPts)
               throws TransformException
Transforms a list of coordinate point ordinal values.

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.
Throws:
TransformException - if a point can't be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the un-transformable points with NaN values, continue and throw the exception only at end. Implementations that fall in the later case should set the last completed transform to this.

transform

public void transform(float[] srcPts,
                      int srcOff,
                      double[] dstPts,
                      int dstOff,
                      int numPts)
               throws TransformException
Transforms a list of coordinate point ordinal values.

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.
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.
Throws:
TransformException - if a point can't be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the un-transformable points with NaN values, continue and throw the exception only at end. Implementations that fall in the later case should set the last completed transform to this.

transform

public void transform(double[] srcPts,
                      int srcOff,
                      float[] dstPts,
                      int dstOff,
                      int numPts)
               throws TransformException
Transforms a list of coordinate point ordinal values.

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.
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.
Throws:
TransformException - if a point can't be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the un-transformable points with NaN values, continue and throw the exception only at end. Implementations that fall in the later case should set the last completed transform to this.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.