deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.crs.transformations.polynomial
Class PolynomialTransformation

java.lang.Object
  extended by org.deegree.crs.Identifiable
      extended by org.deegree.crs.transformations.Transformation
          extended by org.deegree.crs.transformations.polynomial.PolynomialTransformation
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LeastSquareApproximation

public abstract class PolynomialTransformation
extends Transformation

PolynomialTransformation is the base class for all polynomial transformations.

Version:
$Revision$, $Date$
Author:
Rutger Bezema, last edited by: $Author$
See Also:
Serialized Form

Constructor Summary
PolynomialTransformation(java.util.List<java.lang.Double> firstParameters, java.util.List<java.lang.Double> secondParameters, CoordinateSystem sourceCRS, CoordinateSystem targetCRS, Identifiable id)
           
 
Method Summary
abstract  java.util.List<javax.vecmath.Point3d> applyPolynomial(java.util.List<javax.vecmath.Point3d> srcPoints)
          The central method, which actually transforms the points by applying the implemented polynomial.
abstract  float[][] createVariables(java.util.List<javax.vecmath.Point3d> originalPoints, java.util.List<javax.vecmath.Point3d> projectedPoints, int polynomalOrder)
           
 java.util.List<javax.vecmath.Point3d> doTransform(java.util.List<javax.vecmath.Point3d> srcPts)
          Do a transformation, e.g. the incoming data will be transformed into other coordinates.
 java.util.List<java.lang.Double> getFirstParams()
           
abstract  int getOrder()
           
 java.util.List<java.lang.Double> getSecondParams()
           
 void inverse()
          This method flags the transformation about it's state.
 boolean isIdentity()
           
 boolean isInverseTransform()
           
 
Methods inherited from class org.deegree.crs.transformations.Transformation
areInverse, createFromTo, doTransform, doTransform, getImplementationName, getSourceCRS, getSourceDimension, getTargetCRS, getTargetDimension, getTransformationName, getTransformationPath, setSourceCRS
 
Methods inherited from class org.deegree.crs.Identifiable
checkForNullObject, checkForNullObject, checkForNullObject, equals, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getDescription, getDescriptions, getIdAndName, getIdentifier, getIdentifiers, getName, getNames, getVersion, getVersions, hasID, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PolynomialTransformation

public PolynomialTransformation(java.util.List<java.lang.Double> firstParameters,
                                java.util.List<java.lang.Double> secondParameters,
                                CoordinateSystem sourceCRS,
                                CoordinateSystem targetCRS,
                                Identifiable id)
Parameters:
firstParameters - the parameters for the
secondParameters -
sourceCRS -
targetCRS -
id - an identifiable instance containing information about this transformation
Method Detail

getOrder

public abstract int getOrder()
Returns:
the order of the Polynomial used for this transformation.

createVariables

public abstract float[][] createVariables(java.util.List<javax.vecmath.Point3d> originalPoints,
                                          java.util.List<javax.vecmath.Point3d> projectedPoints,
                                          int polynomalOrder)
Parameters:
originalPoints - of the projection
projectedPoints - the 'function' values
polynomalOrder - the order of the polynomial function to use.
Returns:
the variables the polynomial used for this transformation.

applyPolynomial

public abstract java.util.List<javax.vecmath.Point3d> applyPolynomial(java.util.List<javax.vecmath.Point3d> srcPoints)
                                                               throws TransformationException
The central method, which actually transforms the points by applying the implemented polynomial.

Parameters:
srcPoints - to transform
Returns:
the transformed points.
Throws:
TransformationException - if for some reason one of the incoming points could not be transformed.

getFirstParams

public java.util.List<java.lang.Double> getFirstParams()
Returns:
the Parameters for the calculation of the first coordinate.

getSecondParams

public java.util.List<java.lang.Double> getSecondParams()
Returns:
the Parameters for the calculation of the second coordinate.

doTransform

public final java.util.List<javax.vecmath.Point3d> doTransform(java.util.List<javax.vecmath.Point3d> srcPts)
                                                        throws TransformationException
Description copied from class: Transformation
Do a transformation, e.g. the incoming data will be transformed into other coordinates.

Specified by:
doTransform in class Transformation
Parameters:
srcPts - the points which must be transformed, expected are following values either, long_1, lat_1, height_1, long_2, lat_2, height_2. or long_1, lat_1, long_2, lat_2
Returns:
the transformed points
Throws:
TransformationException - if a transform could not be calculated.

inverse

public void inverse()
Description copied from class: Transformation
This method flags the transformation about it's state. If this transformation was inverse calling this method will result in a forward transformation and vice versa.

Overrides:
inverse in class Transformation

isIdentity

public boolean isIdentity()
Specified by:
isIdentity in class Transformation
Returns:
true if this transformation doesn't transform the incoming points. (e.g. is the id. matrix)

isInverseTransform

public boolean isInverseTransform()
Overrides:
isInverseTransform in class Transformation
Returns:
true if the doInverseTransform method should be called, false otherwise.

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org