Package org.opengis.referencing.operation

Examples of org.opengis.referencing.operation.MathTransform.inverse()


        final CoordinateOperation       operation = opFactory.createOperation(sourceCRS, targetCRS);
        final MathTransform             transform = operation.getMathTransform();
        final int                       dimension = transform.getSourceDimensions();
        assertEquals("Source dimension", 3, dimension);
        assertEquals("Target dimension", 3, transform.getTargetDimensions());
        assertSame("Inverse transform", transform, transform.inverse().inverse());
        assertInterfaced(transform);
        /*
         * Construct an array of 850 random points. The first 8 points
         * are initialized to know values. Other points are left random.
         */
 
View Full Code Here


         * in longitude or latitude and 1 cm in height.
         */
        final double[] array1 = new double[array0.length];
        final double[] array2 = new double[array0.length];
        transform          .transform(array0, 0, array1, 0, array0.length/dimension);
        transform.inverse().transform(array1, 0, array2, 0, array1.length/dimension);
        assertPointsEqual("transform(Geographic --> Geocentric --> Geographic)", array0, array2,
                          new double[] {0.1/3600, 0.1/3600, 0.01});
        /*
         * Compare the distances between "special" points with expected distances.
         * This test the ellipsoid orthodromic distance computation as well.
View Full Code Here

        for (int i=0; i<calculatedPoints.length; i++) {
            assertEquals(dstPoints[i], calculatedPoints[i], precision);
        }

        // Inverse transform test
        mt.inverse().transform(dstPoints, 0, calculatedPoints, 0, dstPoints.length/2);
        for (int i=0; i<calculatedPoints.length; i++) {
            assertEquals(srcPoints[i], calculatedPoints[i], precision);
        }
    }
   
View Full Code Here

        assertEquals("false_easting",        0.0, param.parameter("false_easting"     ).doubleValue(), 1E-8);
        assertEquals("false_northing",       0.0, param.parameter("false_northing"    ).doubleValue(), 1E-8);

        final MathTransform transform = operation.getMathTransform();
        assertInterfaced(transform);
        assertTransformEquals2_2(transform.inverse(), 0, 0, 170, 50);
        assertTransformEquals2_2(transform, 170, 50, 0, 0);
    }

    /**
     * Tests a transformation that requires a datum shift with TOWGS84[0,0,0].
View Full Code Here

            originalEnvelope.getMinimum(0)+originalEnvelope.getSpan(0)/2,
            originalEnvelope.getMaximum(1)
            );
       
        final MathTransform cornerWorldToGrid = PixelTranslation.translate(expectedTx,PixelInCell.CELL_CENTER,PixelInCell.CELL_CORNER);
        final GeneralGridEnvelope expectedGridEnvelope = new GeneralGridEnvelope(CRS.transform(cornerWorldToGrid.inverse(), newEnvelope),PixelInCell.CELL_CORNER,false);
        final StringBuilder envelopeBuilder= new StringBuilder();
        envelopeBuilder.append(newEnvelope.getMinimum(0)).append(",");
        envelopeBuilder.append(newEnvelope.getMinimum(1)).append(",");
        envelopeBuilder.append(newEnvelope.getMaximum(0)).append(",");
        envelopeBuilder.append(newEnvelope.getMaximum(1));
View Full Code Here

                            ReprojectPage.this, "Target Geometry is not specified"));
                } else {
                    MathTransform mt = getTransform();
                    if (mt != null) {
                        try {
                            Geometry source = JTS.transform(target, mt.inverse());
                            sourceGeom.setModelObject(source);
                            at.addComponent(sourceGeom);
                        } catch (Exception e) {
                            error(e.getMessage());
                        }
View Full Code Here

            originalEnvelope.getMinimum(0)+originalEnvelope.getSpan(0)/2,
            originalEnvelope.getMaximum(1)
            );
       
        final MathTransform cornerWorldToGrid = PixelTranslation.translate(expectedTx,PixelInCell.CELL_CENTER,PixelInCell.CELL_CORNER);
        final GeneralGridEnvelope expectedGridEnvelope = new GeneralGridEnvelope(CRS.transform(cornerWorldToGrid.inverse(), newEnvelope),PixelInCell.CELL_CORNER,false);
        final StringBuilder envelopeBuilder= new StringBuilder();
        envelopeBuilder.append(newEnvelope.getMinimum(0)).append(",");
        envelopeBuilder.append(newEnvelope.getMinimum(1)).append(",");
        envelopeBuilder.append(newEnvelope.getMaximum(0)).append(",");
        envelopeBuilder.append(newEnvelope.getMaximum(1));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.