public class AdvancedAffineBuilder extends MathTransformBuilder
| Modifier and Type | Field and Description |
|---|---|
static String |
PHIX
mark for key to specify phix - rotation constrain
|
static String |
PHIY
mark for key to specify phix - rotation constrain
|
static String |
SX
mark for key to specify sx - scale in x constrain
|
static String |
SXY
mark for key to specify sxy - skew constrain
|
static String |
SY
mark for key to specify sy - scale in y constrain
|
static String |
TX
mark for key to specify tx - translation in x constrain
|
static String |
TY
mark for key to specify ty - translation in y constrain
|
mtFactory| Constructor and Description |
|---|
AdvancedAffineBuilder(List<MappedPosition> vectors)
Constructs builder from set of GCPs
|
AdvancedAffineBuilder(List<MappedPosition> vectors,
AffineTransform2D affineTrans)
Constructs affine transform from GCPs and approximate values for calculation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearConstrains()
Clears all constrains
|
protected MathTransform |
computeMathTransform()
Calculates the math transform immediately.
|
protected GeneralMatrix |
getA()
Generates A matrix (Matrix of derivation of affine equation).
|
protected GeneralMatrix |
getB()
Fill matrix of derivations of constrains by affine parameters.
|
protected GeneralMatrix |
getL()
Fill L matrix.
|
double |
getMaxIterationDifference()
Returns difference that is required between steps in iteration
|
int |
getMinimumPointCount()
Returns the minimum number of points required by this builder.
|
int |
getNumberOfIterationSteps()
Return max number of iteration steps.
|
protected GeneralMatrix |
getProjectiveMatrix()
Calculates coefficients of Projective transformation matrix from geometric parameters.
|
protected GeneralMatrix |
getU()
Fill matrix of constrain values (e.g. for constrain skew = 0 the value is 0)
|
void |
setConstrain(String param,
double value)
Sets constrain that
param is equal to value. |
void |
setMaxIterationDifference(double dif)
Sets difference that is required between steps in iteration.
|
void |
setNumberOfIterationSteps(int steps)
Sets max number of iteration steps.
|
getCoordinateSystemType, getDimension, getErrorStatistics, getMappedPositions, getMathTransform, getName, getSourceCRS, getSourcePoints, getTargetCRS, getTargetPoints, getTransformation, printPoints, setMappedPositions, setSourcePoints, setTargetPoints, toStringpublic static final String SX
public static final String SY
public static final String SXY
public static final String PHIX
public static final String PHIY
public static final String TX
public static final String TY
public AdvancedAffineBuilder(List<MappedPosition> vectors) throws IllegalArgumentException, MismatchedDimensionException, MismatchedReferenceSystemException, FactoryException
vectors - GCPsIllegalArgumentExceptionMismatchedDimensionExceptionMismatchedReferenceSystemExceptionFactoryExceptionpublic AdvancedAffineBuilder(List<MappedPosition> vectors, AffineTransform2D affineTrans) throws IllegalArgumentException, MismatchedDimensionException, MismatchedReferenceSystemException, FactoryException
vectors - GCPsaffineTrans - approximate affine transformationMismatchedSizeExceptionMismatchedDimensionExceptionMismatchedReferenceSystemExceptionFactoryExceptionIllegalArgumentExceptionpublic void setConstrain(String param, double value)
param is equal to value. Be aware that the calculation
may diverge in the case you set some values that are not 'close' to approximate values. I the
case of divergence you can set approximate values using proper constructorparam - parameter name - set one of AdvancedAffineBuilder static variables.value - required valuepublic void clearConstrains()
protected GeneralMatrix getA()
protected GeneralMatrix getL()
public int getMinimumPointCount()
MathTransformBuildergetMinimumPointCount in class MathTransformBuilderprotected GeneralMatrix getB()
protected GeneralMatrix getU()
protected GeneralMatrix getProjectiveMatrix() throws FactoryException
FactoryExceptionprotected MathTransform computeMathTransform() throws FactoryException
MathTransformBuildercomputeMathTransform in class MathTransformBuilderMappedPosition.FactoryException - if the math transform can't be created.public double getMaxIterationDifference()
public void setMaxIterationDifference(double dif)
dif - public int getNumberOfIterationSteps()
public void setNumberOfIterationSteps(int steps)
steps - max number of iterations.Copyright © 1996–2019 Geotools. All rights reserved.