Package org.opengis.coverage.grid

Examples of org.opengis.coverage.grid.GridCoverage


        MockHttpServletResponse response = postAsServletResponse(root(), xml);
        // System.out.println(response.getOutputStreamContent());
        InputStream is = getBinaryInputStream(response);
       
        ArcGridFormat format = new ArcGridFormat();
        GridCoverage gc = format.getReader(is).read(null);
       
        GridCoverage original = getCatalog().getCoverageByName(getLayerId(MockData.TASMANIA_DEM)).getGridCoverage(null, null);
        scheduleForDisposal(original);
       
        // check the envelope did not change
        assertEquals(original.getEnvelope().getMinimum(0), gc.getEnvelope().getMinimum(0), EPS);
        assertEquals(original.getEnvelope().getMinimum(1), gc.getEnvelope().getMinimum(1), EPS);
        assertEquals(original.getEnvelope().getMaximum(0), gc.getEnvelope().getMaximum(0), EPS);
        assertEquals(original.getEnvelope().getMaximum(1), gc.getEnvelope().getMaximum(1), EPS);
       
        // check this has been resized properly
        GridEnvelope originalRange = original.getGridGeometry().getGridRange();
        GridEnvelope resultRange = gc.getGridGeometry().getGridRange();
        assertEquals(originalRange.getSpan(0) * 2, resultRange.getSpan(0));
        assertEquals(originalRange.getSpan(1) * 2, resultRange.getSpan(1));
    }
View Full Code Here


        return raw;
    }
   
    public void testDomainSubsetRxRy() throws Exception {
      // get base  coverage
        final GridCoverage baseCoverage = catalog.getCoverageByName(TASMANIA_BM.getLocalPart()).getGridCoverage(null, null);
        final AffineTransform2D expectedTx = (AffineTransform2D) baseCoverage.getGridGeometry().getGridToCRS();       
        final GeneralEnvelope originalEnvelope = (GeneralEnvelope) baseCoverage.getEnvelope();
        final GeneralEnvelope newEnvelope=new GeneralEnvelope(originalEnvelope);
        newEnvelope.setEnvelope(
            originalEnvelope.getMinimum(0),
            originalEnvelope.getMaximum(1)-originalEnvelope.getSpan(1)/2,
            originalEnvelope.getMinimum(0)+originalEnvelope.getSpan(0)/2,
View Full Code Here

TOP

Related Classes of org.opengis.coverage.grid.GridCoverage

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.