Package org.geotools.coverage.io

Examples of org.geotools.coverage.io.RasterLayout.toRectangle()


            VariableAdapter.UnidataSpatialDomain spatialDomain = (UnidataSpatialDomain) source.getSpatialDomain();
            GridEnvelope2D gridRange = spatialDomain.getGridGeometry().getGridRange2D();
            RasterLayout rasterElement = spatialDomain.getRasterElements(false, null).iterator().next();
            SampleModel sampleModel = new BandedSampleModel(DataBuffer.TYPE_DOUBLE, (int)gridRange.getWidth(), (int)gridRange.getHeight(), 1);
            ColorModel colorModel = ImageIOUtilities.createColorModel(sampleModel);
            Rectangle rect = rasterElement.toRectangle();
            ImageLayout layout = new ImageLayout(rect.x, rect.y, rect.width, rect.height);
            layout.setSampleModel(sampleModel);
            layout.setColorModel(colorModel);
            return layout;
           
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.