org.geotools.referencing.operation.transform
Class EarthGravitationalModel

java.lang.Object
  extended by org.geotools.referencing.wkt.Formattable
      extended by org.geotools.referencing.operation.transform.AbstractMathTransform
          extended by org.geotools.referencing.operation.transform.VerticalTransform
              extended by org.geotools.referencing.operation.transform.EarthGravitationalModel
All Implemented Interfaces:
org.opengis.referencing.operation.MathTransform

public final class EarthGravitationalModel
extends VerticalTransform

Transforms vertical coordinates using coefficients from the Earth Gravitational Model.

Aknowledgement
This class is an adaption of Fortran code clenqt.for from the National Geospatial-Intelligence Agency and available in public domain. The normalized geopotential coefficients file bundled in this module is an adaptation of egm180.nor file, with some spaces trimmed.

Since:
2.3
Version:
$Id: EarthGravitationalModel.java 33894 2009-09-11 10:51:02Z simonegiannecchini $
Author:
Pierre Cardinal, Martin Desruisseaux

Nested Class Summary
static class EarthGravitationalModel.Provider
          The provider for EarthGravitationalModel.
 
Nested classes/interfaces inherited from class org.geotools.referencing.operation.transform.AbstractMathTransform
AbstractMathTransform.Inverse
 
Field Summary
 
Fields inherited from class org.geotools.referencing.wkt.Formattable
SINGLE_LINE
 
Method Summary
 org.opengis.parameter.ParameterDescriptorGroup getParameterDescriptors()
          Returns the parameter descriptors for this math transform.
 org.opengis.parameter.ParameterValueGroup getParameterValues()
          Returns the parameters for this math transform.
 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.
protected  void load(java.lang.String filename)
          Loads the coefficients from the specified ASCII file and initialize the internal clenshaw arrays.
 
Methods inherited from class org.geotools.referencing.operation.transform.VerticalTransform
getSourceDimensions, getTargetDimensions, transform, transform
 
Methods inherited from class org.geotools.referencing.operation.transform.AbstractMathTransform
createTransformedShape, derivative, derivative, ensureNonNull, equals, formatWKT, getName, hashCode, inverse, isIdentity, needCopy, rollLongitude, transform, transform, transform, transform
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.referencing.operation.MathTransform
toWKT
 

Method Detail

load

protected void load(java.lang.String filename)
             throws java.io.IOException
Loads the coefficients from the specified ASCII file and initialize the internal clenshaw arrays.

Note: ASCII may looks like an unefficient format for binary distribution. A binary file with coefficient values read by DataInput.readDouble() would be more compact than an uncompressed ASCII file. However, binary files are hard to compress by the ZIP algorithm. Our experience show that a 675 kb uncompressed ASCII file is only 222 kb after ZIP or JAR compression. The same data as a binary file is 257 kb uncompressed and 248 kb compressed. So surprisingly, the ASCII file is more compact than the binary file after compression. Since it is the primary format provided by the Earth-Info web site, we use it directly in order to avoid a multiplication of formats.

Parameters:
filename - The filename (e.g. "WGS84.cof", relative to this class directory.
Throws:
java.io.IOException - if the file can't be read or has an invalid content.

heightOffset

public double heightOffset(double longitude,
                           double latitude,
                           double height)
                    throws org.opengis.referencing.operation.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.

Specified by:
heightOffset in class VerticalTransform
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:
org.opengis.referencing.operation.TransformException - if the offset can't be computed for the specified coordinates.

getParameterDescriptors

public org.opengis.parameter.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 org.opengis.parameter.ParameterValueGroup getParameterValues()
Returns the parameters for this math transform.

Overrides:
getParameterValues in class AbstractMathTransform
Returns:
A copy of the parameter values for this math transform, or null.
See Also:
Operation.getParameterValues()


Copyright © 1996-2010 Geotools. All Rights Reserved.