Package org.geotools.referencing.crs

Examples of org.geotools.referencing.crs.DefaultDerivedCRS


  public void run() throws IOException {

    WarpTransform2D warpTransform = new WarpTransform2D(srcCoords, dstCoords, 1);

    // create a DefaultDerivedCRS for the CRS of the image
    DefaultDerivedCRS derivedCRS = new DefaultDerivedCRS("imageCRS", this.crsTarget, warpTransform, //$NON-NLS-1$
          DefaultCartesianCS.GENERIC_2D);
    // now create a gridcoverage for the new warped image
    GridCoverageFactory factory = new GridCoverageFactory();
    ReferencedEnvelope ref = new ReferencedEnvelope(0, image.getWidth(null), 0, image.getHeight(null), derivedCRS);
View Full Code Here


            System.out.println(trans.getSourceDimensions());
            System.out.println(trans.getTargetDimensions());

            /* Make New reference System */
            CoordinateReferenceSystem gridCRS = new DefaultDerivedCRS(
                    Collections.singletonMap(IdentifiedObject.NAME_KEY, "gridCRS"),
                    new DefaultOperationMethod(trans),
                    coverage.getCoordinateReferenceSystem(),
                    trans,
                    DefaultCartesianCS.GENERIC_2D);
View Full Code Here

    protected static GridCoverage2D rotate(final GridCoverage2D coverage, final double angle) {
        final AffineTransform atr = AffineTransform.getRotateInstance(Math.toRadians(angle));
        atr.concatenate(getAffineTransform(coverage));
        final MathTransform tr = ProjectiveTransform.create(atr);
        CoordinateReferenceSystem crs = coverage.getCoordinateReferenceSystem();
        crs = new DefaultDerivedCRS("Rotation " + angle + "°", crs, tr, crs.getCoordinateSystem());
        return project(coverage, crs, null, null, true);
    }
View Full Code Here

    {
        final AffineTransform atr = AffineTransform.getTranslateInstance(5, 5);
        atr.concatenate(getAffineTransform(coverage));
        final MathTransform tr = ProjectiveTransform.create(atr);
        CoordinateReferenceSystem crs = coverage.getCoordinateReferenceSystem();
        crs = new DefaultDerivedCRS("Translated", crs, tr, crs.getCoordinateSystem());
        assertEquals(asCRS,
                showProjected(coverage, crs, null, hints, useGeophysics));

        // Same operation, given the translation in the GridGeometry argument rather than the CRS.
        final GridGeometry2D gg = new GridGeometry2D(null, tr, null);
View Full Code Here

         */
        final AffineTransform gridToCRS = AffineTransform.getRotateInstance(Math.PI / 4.0);
        gridToCRS.concatenate(getAffineTransform(source));
        final MathTransform tr = ProjectiveTransform.create(gridToCRS);
        CoordinateReferenceSystem crs = source.getCoordinateReferenceSystem();
        crs = new DefaultDerivedCRS("Rotated CRS", crs, tr, crs.getCoordinateSystem());
        final GridCoverage2D rotated = project(source, crs, null, null, true);
        /*
         * Preparing the crop. We want to get a rectangle that is locate at the
         * center of this coverage envelope that is large 1/4 f the original
         * width and tall 1/4 of the original height.
View Full Code Here

TOP

Related Classes of org.geotools.referencing.crs.DefaultDerivedCRS

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.