Package org.geotools.process.raster

Examples of org.geotools.process.raster.AreaGridProcess


    private static final Logger logger = Logging.getLogger(AreaGridProcessTest.class);

    @Test(expected = ProcessException.class)
    public void testAreaGridCRS() throws Exception {
        logger.info("AREAGRIDPROCESS: Performing CRS test");
        AreaGridProcess process = new AreaGridProcess();
        ReferencedEnvelope envelope = new ReferencedEnvelope(-180, 180, -90, 90, null);
        process.execute(envelope, -2, 10);
    }
View Full Code Here


    }

    @Test(expected = ProcessException.class)
    public void testAreaGridParameters() throws Exception {
        logger.info("AREAGRIDPROCESS: Performing parameter test");
        AreaGridProcess process = new AreaGridProcess();
        CoordinateReferenceSystem crs = org.geotools.referencing.crs.DefaultGeographicCRS.WGS84;
        ReferencedEnvelope envelope = new ReferencedEnvelope(-180, 180, -90, 90, crs);
        process.execute(envelope, -2, 10);
    }
View Full Code Here

        assertEquals(0, (area - sum) / area, 0.001);
    }


    private double computeTotalArea(int width, int height, ReferencedEnvelope envelope) {
        AreaGridProcess process = new AreaGridProcess();
        GridCoverage2D grid = process.execute(envelope, width, height);
        assertEquals(envelope, new ReferencedEnvelope(grid.getEnvelope()));
        assertEquals(width, grid.getGridGeometry().getGridRange().getSpan(0));
        assertEquals(height, grid.getGridGeometry().getGridRange().getSpan(1));
       
        double sum = 0.0;
View Full Code Here

TOP

Related Classes of org.geotools.process.raster.AreaGridProcess

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.