deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.crs.transformations.polynomial
Class LeastSquareApproximation

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

public class LeastSquareApproximation
extends PolynomialTransformation

LeastSquareApproximation is a polynomial transformation which uses the least square method to approximate a function given by some measured values.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $
See Also:
Serialized Form

Constructor Summary
LeastSquareApproximation(List<Double> firstParameters, List<Double> secondParameters, CoordinateSystem sourceCRS, CoordinateSystem targetCRS, float scaleX, float scaleY)
          Sets the id to EPSG::9645 ( General polynomial of degree 2 ).
LeastSquareApproximation(List<Double> firstParameters, List<Double> secondParameters, CoordinateSystem sourceCRS, CoordinateSystem targetCRS, float scaleX, float scaleY, Identifiable id)
           
 
Method Summary
 List<javax.vecmath.Point3d> applyPolynomial(List<javax.vecmath.Point3d> srcPts)
          The central method, which actually transforms the points by applying the implemented polynomial.
 float[][] createVariables(List<javax.vecmath.Point3d> originalPoints, List<javax.vecmath.Point3d> projectedPoints, int polynomalOrder)
           
 String getImplementationName()
           
 int getOrder()
           
 float getScaleX()
           
 float getScaleY()
           
 
Methods inherited from class org.deegree.crs.transformations.polynomial.PolynomialTransformation
doTransform, getFirstParams, getSecondParams, inverse, isIdentity, isInverseTransform
 
Methods inherited from class org.deegree.crs.transformations.Transformation
areInverse, createFromTo, doTransform, doTransform, 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

LeastSquareApproximation

public LeastSquareApproximation(List<Double> firstParameters,
                                List<Double> secondParameters,
                                CoordinateSystem sourceCRS,
                                CoordinateSystem targetCRS,
                                float scaleX,
                                float scaleY,
                                Identifiable id)
Parameters:
firstParameters - of the polynomial
secondParameters - of the polynomial
sourceCRS - of this transformation
targetCRS - of this transformation
scaleX - to apply to incoming data's x value, if 1 (or 0) no scale will be applied.
scaleY - to apply to incoming data's y value, if 1 (or 0) no scale will be applied.
id - an identifiable instance containing information about this transformation

LeastSquareApproximation

public LeastSquareApproximation(List<Double> firstParameters,
                                List<Double> secondParameters,
                                CoordinateSystem sourceCRS,
                                CoordinateSystem targetCRS,
                                float scaleX,
                                float scaleY)
Sets the id to EPSG::9645 ( General polynomial of degree 2 ).

Parameters:
firstParameters - of the polynomial
secondParameters - of the polynomial
sourceCRS - of this transformation
targetCRS - of this transformation
scaleX - to apply to incoming data's x value, if 1 (or 0) no scale will be applied.
scaleY - to apply to incoming data's y value, if 1 (or 0) no scale will be applied.
Method Detail

applyPolynomial

public List<javax.vecmath.Point3d> applyPolynomial(List<javax.vecmath.Point3d> srcPts)
                                            throws TransformationException
Description copied from class: PolynomialTransformation
The central method, which actually transforms the points by applying the implemented polynomial.

Specified by:
applyPolynomial in class PolynomialTransformation
Parameters:
srcPts - to transform
Returns:
the transformed points.
Throws:
TransformationException - if for some reason one of the incoming points could not be transformed.

getImplementationName

public String getImplementationName()
Specified by:
getImplementationName in class Transformation
Returns:
the name of the transformation.

createVariables

public float[][] createVariables(List<javax.vecmath.Point3d> originalPoints,
                                 List<javax.vecmath.Point3d> projectedPoints,
                                 int polynomalOrder)
Specified by:
createVariables in class PolynomialTransformation
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.

getOrder

public int getOrder()
Specified by:
getOrder in class PolynomialTransformation
Returns:
the order of the Polynomial used for this transformation.

getScaleX

public final float getScaleX()
Returns:
the scale which will be applied to the x value of all incoming data

getScaleY

public final float getScaleY()
Returns:
the scale which will be applied to the y value of all incoming data

deegree 2.3 (2010/04/09 10:10 build-4-official)

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