Class VerticalTransform
Object
Formattable
AbstractMathTransform
VerticalTransform
- All Implemented Interfaces:
MathTransform
- Direct Known Subclasses:
EarthGravitationalModel
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
- Author:
- Martin Desruisseaux
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMathTransform
AbstractMathTransform.Inverse
-
Field Summary
Fields inherited from class Formattable
SINGLE_LINE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new instance ofVerticalTransform
. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
Gets the dimension of input points.final int
Gets the dimension of output points.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.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, equals, formatWKT, getName, getParameterDescriptors, getParameterValues, hashCode, inverse, isIdentity, 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
-
VerticalTransform
protected VerticalTransform()Creates a new instance ofVerticalTransform
.
-
-
Method Details
-
getSourceDimensions
public final 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.
-
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 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 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.- Throws:
TransformException
- if a point can't be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the untransformable 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 tothis
.
-
transform
public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException Transforms a list of coordinate point ordinal values.- 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.- Throws:
TransformException
- if a point can't be transformed. Some implementations will stop at the first failure, wile some other implementations will fill the untransformable 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 tothis
.
-