org.deegree.crs.transformations.polynomial
Class LeastSquareApproximation
java.lang.Object
org.deegree.crs.Identifiable
org.deegree.crs.transformations.Transformation
org.deegree.crs.transformations.polynomial.PolynomialTransformation
org.deegree.crs.transformations.polynomial.LeastSquareApproximation
- All Implemented Interfaces:
- java.io.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(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,
Identifiable 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.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 |
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,
Identifiable id)
- Parameters:
firstParameters
- of the polynomialsecondParameters
- of the polynomialsourceCRS
- of this transformationtargetCRS
- of this transformationscaleX
- 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 polynomialsecondParameters
- of the polynomialsourceCRS
- of this transformationtargetCRS
- of this transformationscaleX
- 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.
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 projectionprojectedPoints
- the 'function' valuespolynomalOrder
- 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
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org