| java.lang.Object org.geotools.referencing.operation.builder.MathTransformBuilder org.geotools.referencing.operation.builder.ProjectiveTransformBuilder org.geotools.referencing.operation.builder.SimilarTransformBuilder
SimilarTransformBuilder | public class SimilarTransformBuilder extends ProjectiveTransformBuilder (Code) | | Builds
setup as Similar transformation from a list of
.
The The calculation uses least square method. The similar transform
equation:
[ x'] [ a -b Tx ] [ x ] [ a*x - b*y + Tx ]
[ y'] = [ b a Ty ] [ y ] = [ b*x + a*y + Ty ] In the case
that we have more identical points we can write it like this (in Matrix):
[ x'1 ] [ x1 -y1 1 0 ] [ a ]
[ x'2 ] [ x2 -y2 1 0 ] [ b ]
[ . ] [ . ] [ Tx ]
[ . ] [ . ] * [ Ty ]
[ x'n ] = [ xn yn 1 0 ]
[ y'1 ] [ y1 x1 0 1 ]
[ y'2 ] [ y2 x2 0 1 ]
[ . ] [ . ]
[ . ] [ . ]
[ y'n ] [ yn xn 0 1 ]
x' = A*m Using the least square method we get this result:
m = (ATA)-1 ATx'
since: 2.4 version: $Id: SimilarTransformBuilder.java 24925 2007-03-27 20:12:08Z jgarnett $ author: Jan Jezek |
SimilarTransformBuilder | public SimilarTransformBuilder(List vectors) throws MismatchedSizeException, MismatchedDimensionException, MismatchedReferenceSystemException(Code) | | Creates SimilarTransformBuilder for the set of properties. The
of
is expected.
Parameters: vectors - list of |
fillAMatrix | protected void fillAMatrix()(Code) | | |
getMinimumPointCount | public int getMinimumPointCount()(Code) | | Returns the minimum number of points required by this builder,
which is 2.
Returns the minimum number of points required by this builder,which is 2. |
getProjectiveMatrix | protected GeneralMatrix getProjectiveMatrix()(Code) | | Returns the matrix for Projective transformation setup as
Affine. The M matrix looks like this:
[ a -b Tx ]
[ b a Ty ]
[ 0 0 1 ]
Matrix M. |
Fields inherited from org.geotools.referencing.operation.builder.MathTransformBuilder | final protected MathTransformFactory mtFactory(Code)(Java Doc)
|
|
|