Package org.geotools.process.raster

Examples of org.geotools.process.raster.AreaGridProcess.execute()


    @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);
    }

    @Test(expected = ProcessException.class)
    public void testAreaGridParameters() throws Exception {
        logger.info("AREAGRIDPROCESS: Performing parameter test");
View Full Code Here


    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);
    }

    @Test
    public void testWorldArea() throws Exception {
        logger.info("AREAGRIDPROCESS: Performing process execute test");
View Full Code Here

    }


    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
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.