|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectMathTransformBuilder
AdvancedAffineBuilder
public class AdvancedAffineBuilder
Builder for affine transformation with possibility to set several constrains for affine parameters that will be respected during calculation. This is convenient for example to use when you want affine transformation with skew parameter equal to zero. Development carried out thanks to R&D grant DC08P02OUK006 - Old Maps Online (www.oldmapsonline.org) from Ministry of Culture of the Czech Republic
modules/library/referencing (gt-referencing.jar)
Field Summary | |
---|---|
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 |
Fields inherited from class MathTransformBuilder |
---|
mtFactory |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public 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
Constructor Detail |
---|
public AdvancedAffineBuilder(List<MappedPosition> vectors) throws MismatchedSizeException, MismatchedDimensionException, MismatchedReferenceSystemException, FactoryException
vectors
- GCPs
MismatchedSizeException
MismatchedDimensionException
MismatchedReferenceSystemException
FactoryException
public AdvancedAffineBuilder(List<MappedPosition> vectors, AffineTransform2D affineTrans) throws MismatchedSizeException, MismatchedDimensionException, MismatchedReferenceSystemException, FactoryException
vectors
- GCPsaffineTrans
- approximate affine transformation
MismatchedSizeException
MismatchedDimensionException
MismatchedReferenceSystemException
FactoryException
Method Detail |
---|
public 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 constructor
param
- parameter name - set one of AdvancedAffineBuilder static variables.value
- required valuepublic void clearConstrains()
protected GeneralMatrix getA()
protected GeneralMatrix getL()
public int getMinimumPointCount()
MathTransformBuilder
getMinimumPointCount
in class MathTransformBuilder
protected GeneralMatrix getB()
protected GeneralMatrix getU()
protected GeneralMatrix getProjectiveMatrix() throws FactoryException
FactoryException
protected MathTransform computeMathTransform() throws FactoryException
MathTransformBuilder
computeMathTransform
in class MathTransformBuilder
MappedPosition
.
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |