public class SimilarTransformBuilder extends ProjectiveTransformBuilder
[ 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'
A, P, XmtFactory| Constructor and Description | 
|---|
| SimilarTransformBuilder(List<MappedPosition> vectors)Creates SimilarTransformBuilder for the set of properties. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | fillAMatrix()Fills A matrix for m = (ATPA)-1 ATPx' equation | 
| int | getMinimumPointCount()Returns the minimum number of points required by this builder, which is 2. | 
| protected GeneralMatrix | getProjectiveMatrix()Returns the matrix for Projective transformation setup as Affine. | 
calculateLSM, computeMathTransform, fillPMatrix, fillXMatrix, getCoordinateSystemType, includeWeightsgetDimension, getErrorStatistics, getMappedPositions, getMathTransform, getName, getSourceCRS, getSourcePoints, getTargetCRS, getTargetPoints, getTransformation, printPoints, setMappedPositions, setSourcePoints, setTargetPoints, toStringpublic SimilarTransformBuilder(List<MappedPosition> vectors) throws IllegalArgumentException, MismatchedDimensionException, MismatchedReferenceSystemException
vectors - list of MappedPositionIllegalArgumentExceptionMismatchedDimensionExceptionMismatchedReferenceSystemExceptionprotected void fillAMatrix()
ProjectiveTransformBuilderfillAMatrix in class ProjectiveTransformBuilderpublic int getMinimumPointCount()
getMinimumPointCount in class ProjectiveTransformBuilderprotected GeneralMatrix getProjectiveMatrix()
[ a -b Tx ] [ b a Ty ] [ 0 0 1 ]
getProjectiveMatrix in class ProjectiveTransformBuilderCopyright © 1996–2019 Geotools. All rights reserved.