org.deegree.cs.transformations.polynomial
Class LeastSquareApproximation

java.lang.Object
  extended by org.deegree.cs.CRSIdentifiable
      extended by org.deegree.cs.transformations.Transformation
          extended by org.deegree.cs.transformations.polynomial.PolynomialTransformation
              extended by org.deegree.cs.transformations.polynomial.LeastSquareApproximation

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: 26722 $, $Date: 2010-09-13 23:09:30 +0200 (Mo, 13. Sep 2010) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Constructor Summary
LeastSquareApproximation(java.util.List<java.lang.Double> firstParameters, java.util.List<java.lang.Double> secondParameters, CoordinateSystem sourceCRS, CoordinateSystem targetCRS, float scaleX, float scaleY)
          Sets the id to EPSG::9645 ( General polynomial of degree 2 ).
LeastSquareApproximation(java.util.List<java.lang.Double> firstParameters, java.util.List<java.lang.Double> secondParameters, CoordinateSystem sourceCRS, CoordinateSystem targetCRS, float scaleX, float scaleY, CRSIdentifiable id)
           
 
Method Summary
 java.util.List<javax.vecmath.Point3d> applyPolynomial(java.util.List<javax.vecmath.Point3d> srcPts)
          The central method, which actually transforms the points by applying the implemented polynomial.
 float[][] createVariables(java.util.List<javax.vecmath.Point3d> originalPoints, java.util.List<javax.vecmath.Point3d> projectedPoints, int polynomalOrder)
           
 java.lang.String getImplementationName()
           
 int getOrder()
           
 float getScaleX()
           
 float getScaleY()
           
 
Methods inherited from class org.deegree.cs.transformations.polynomial.PolynomialTransformation
doTransform, getFirstParams, getSecondParams, inverse, isIdentity, isInverseTransform
 
Methods inherited from class org.deegree.cs.transformations.Transformation
areInverse, canTransform, contains, copyTransformation, createFromTo, doTransform, doTransform, equalOnCRS, equals, getSourceCRS, getSourceDimension, getTargetCRS, getTargetDimension, getTransformationName, getTransformationPath, setSourceCRS
 
Methods inherited from class org.deegree.cs.CRSIdentifiable
addAreaOfUse, addName, checkForNullObject, checkForNullObject, checkForNullObject, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hashCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LeastSquareApproximation

public LeastSquareApproximation(java.util.List<java.lang.Double> firstParameters,
                                java.util.List<java.lang.Double> secondParameters,
                                CoordinateSystem sourceCRS,
                                CoordinateSystem targetCRS,
                                float scaleX,
                                float scaleY,
                                CRSIdentifiable 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(java.util.List<java.lang.Double> firstParameters,
                                java.util.List<java.lang.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 java.util.List<javax.vecmath.Point3d> applyPolynomial(java.util.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 java.lang.String getImplementationName()
Specified by:
getImplementationName in class Transformation
Returns:
the name of the transformation.

createVariables

public float[][] createVariables(java.util.List<javax.vecmath.Point3d> originalPoints,
                                 java.util.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


Copyright © 2011. All Rights Reserved.