Package org.opengis.referencing.operation

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


        AffineTransform at = AffineTransform.getScaleInstance(0.5, 1);
        MathTransform2D  t = (MathTransform2D) ReferencingFactoryFinder.getMathTransformFactory(null)
                                            .createAffineTransform(new GeneralMatrix(at));
        coord = JTS.transform(coord, coord, t);
        assertEquals(new Coordinate(5, 10), coord);
        coord = JTS.transform(coord, coord, t.inverse());
        assertEquals(new Coordinate(10, 10), coord);
       
        CoordinateReferenceSystem crs = ReferencingFactoryFinder.getCRSFactory(null).createFromWKT(UTM_ZONE_10N);
        t = (MathTransform2D) ReferencingFactoryFinder.getCoordinateOperationFactory(null).createOperation(
                                            DefaultGeographicCRS.WGS84, crs).getMathTransform();
View Full Code Here


        CoordinateReferenceSystem crs = ReferencingFactoryFinder.getCRSFactory(null).createFromWKT(UTM_ZONE_10N);
        t = (MathTransform2D) ReferencingFactoryFinder.getCoordinateOperationFactory(null).createOperation(
                                            DefaultGeographicCRS.WGS84, crs).getMathTransform();
        coord = new Coordinate(-123, 55);
        coord = JTS.transform(coord, coord, t);
        coord = JTS.transform(coord, coord, t.inverse());
        assertEquals(-123, coord.x, EPS);
        assertEquals55, coord.y, EPS);
    }

    /*
 
View Full Code Here

        AffineTransform at = AffineTransform.getScaleInstance(0.5, 1);
        MathTransform2D t  = (MathTransform2D) ReferencingFactoryFinder.getMathTransformFactory(null)
                                            .createAffineTransform(new GeneralMatrix(at));
        envelope = JTS.transform(envelope, t);
        assertEquals(new Envelope(0, 5, 0, 10), envelope);
        envelope = JTS.transform(envelope, t.inverse());
        assertEquals(new Envelope(0, 10, 0, 10), envelope);
       
        envelope = JTS.transform(envelope, null, t, 10);
        assertEquals(new Envelope(0, 5, 0, 10), envelope);
        envelope = JTS.transform(envelope, null, t.inverse(), 10);
View Full Code Here

        envelope = JTS.transform(envelope, t.inverse());
        assertEquals(new Envelope(0, 10, 0, 10), envelope);
       
        envelope = JTS.transform(envelope, null, t, 10);
        assertEquals(new Envelope(0, 5, 0, 10), envelope);
        envelope = JTS.transform(envelope, null, t.inverse(), 10);
        assertEquals(new Envelope(0, 10, 0, 10), envelope);
       
        CoordinateReferenceSystem crs = ReferencingFactoryFinder.getCRSFactory(null).createFromWKT(UTM_ZONE_10N);
        t = (MathTransform2D) ReferencingFactoryFinder.getCoordinateOperationFactory(null).createOperation(
                                            DefaultGeographicCRS.WGS84, crs).getMathTransform();
View Full Code Here

        CoordinateReferenceSystem crs = ReferencingFactoryFinder.getCRSFactory(null).createFromWKT(UTM_ZONE_10N);
        t = (MathTransform2D) ReferencingFactoryFinder.getCoordinateOperationFactory(null).createOperation(
                                            DefaultGeographicCRS.WGS84, crs).getMathTransform();
        envelope = new Envelope(-123, -133, 55, 60);
        envelope = JTS.transform(envelope, t);
        envelope = JTS.transform(envelope, t.inverse());
        /*
         * Use a large tolerance factory for comparaisons because an accurate transformed envelope
         * is bigger than the envelope that we get if we transformed only the 4 corners, and the
         * inverse envelope way expand yet again the envelope for exactly the same reason.
         */
 
View Full Code Here

       */
      if (fallback!=null && fallback!=this) {
          this.toGrid = fallback.toGrid;
      } else try {
          final MathTransform2D transform = gridGeometry.getGridToCRS2D(PixelOrientation.UPPER_LEFT);
          toGrid = transform.inverse();
      } catch (NoninvertibleTransformException exception) {
          throw new IllegalArgumentException(exception);
      }
 
      final int left   = interpolation.getLeftPadding();
View Full Code Here

              height));
      final MathTransform2D fullTransform = (MathTransform2D) ProjectiveTransform.create(worldToScreen);
      // calculate spans
      try {
        final double[] spans = Decimator.computeGeneralizationDistances(
            fullTransform.inverse(),
            new Rectangle(
                width,
                height),
            pixelSize);
        final double cardinalityX = Math.log((spans[0] / 360)) / Math.log(2);
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.