Package org.geotools.referencing.operation.matrix

Examples of org.geotools.referencing.operation.matrix.GeneralMatrix


         */
        Geometry decimate(Geometry geom) {
          DefaultMathTransformFactory f= new DefaultMathTransformFactory();
            MathTransform xform=null;
      try {
        xform = f.createAffineTransform(new GeneralMatrix(worldToScreen.createInverse()));
        Decimator decimator=new Decimator(xform,mapArea);
              geom=decimator.decimate(geom);
      } catch (FactoryException e1) {
       
      } catch (NoninvertibleTransformException e1) {
View Full Code Here


         */
        Geometry decimate(Geometry geom) {
          DefaultMathTransformFactory f= new DefaultMathTransformFactory();
            MathTransform xform=null;
      try {
        xform = f.createAffineTransform(new GeneralMatrix(worldToScreen.createInverse()));
        Decimator decimator=new Decimator(xform,mapArea);
              geom=decimator.decimate(geom);
      } catch (FactoryException e1) {
       
      } catch (NoninvertibleTransformException e1) {
View Full Code Here

                matrix[4] = tx.get( "scaleY") != null ? tx.get( "scaleY") : matrix[4];
                matrix[5] = tx.get( "translateY") != null ? tx.get( "translateY") : matrix[5];
                matrix[8] = 1.0;
               
                MathTransform gridToCRS = new DefaultMathTransformFactory()
                    .createAffineTransform( new GeneralMatrix(3,3,matrix));
                coverage.setGrid( new GridGeometry2D(range,gridToCRS,crs) );
            }
            else {
                coverage.setGrid( new GridGeometry2D( range, gridEnvelope ) );
            }
View Full Code Here

        System.out.println(a2g3.getSkew());
        System.out.println(atb.getMathTransform());*/
    }

    public static MathTransform getMT() throws FactoryException {
        GeneralMatrix M = new GeneralMatrix(3, 3);

        /**
         * Fill the metrix
         */
        double[] m0 = { 0.112804514325, 0.0307621213335, -106.676236219 };
        double[] m1 = { 0.0411346319449  , -0.084359723001, 7.8014489685 };
        double[] m2 = { 0, 0, 1 };
        M.setRow(0, m0);
        M.setRow(1, m1);
        M.setRow(2, m2);

        MathTransform mt = ProjectiveTransform.create(M);

        return mt;
    }
View Full Code Here

TOP

Related Classes of org.geotools.referencing.operation.matrix.GeneralMatrix

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.