Builder builder = new Builder(new File("./gcpswld.txt"));
System.out.println("klokan------------------------------------------------------");
transformTest(getMT(), builder.getMappedPositions());
AdvancedAffineBuilder aab = new AdvancedAffineBuilder(builder.getMappedPositions());
aab.setConstrain(aab.SXY, 0);
// aab.setNumberOfIterationSteps(200);
// aab.setMaxIterationDifference(0.0000001);
System.out.println("Ja------------------------------------------------------");
transformTest(aab.getMathTransform(), builder.getMappedPositions());
AffineToGeometric a2g2 = new AffineToGeometric((AffineTransform2D)aab.getMathTransform());
System.out.println("Parametry------------------------------------------------------");
System.out.println("xrot "+a2g2.getXRotation()*180/Math.PI);
System.out.println("tX "+a2g2.getXTranslate());
System.out.println("tY "+a2g2.getYTranslate());
System.out.println("sx "+a2g2.getXScale());
System.out.println("sy "+a2g2.getYScale());
System.out.println("sxy "+a2g2.getSkew());
System.out.println(aab.getMathTransform());
System.out.println("Afinita------------------------------------------------------");
AffineTransformBuilder atb = new AffineTransformBuilder(builder.getMappedPositions());
// transformTest(atb.getMathTransform(), builder.getMappedPositions());