Package org.geotools.coverage.grid

Examples of org.geotools.coverage.grid.GridCoverage2D.dispose()


        // read parameters (get the params again since we altered the map to optimize the
        // coverage read)
        cinfo.getParameters().putAll(CoverageUtils.getParametersKVP(readParams));

        /// dispose coverage
        gc.dispose(true);
        if(gc.getRenderedImage() instanceof PlanarImage) {
            ImageUtilities.disposePlanarImageChain((PlanarImage) gc.getRenderedImage());
        }

        return cinfo;
View Full Code Here


            final GridCoverage2D gc = (GridCoverage2D) coverage;
            final RenderedImage image = gc.getRenderedImage();
            if(image instanceof PlanarImage) {
                ImageUtilities.disposePlanarImageChain((PlanarImage) image);
            }
            gc.dispose(true);
        }
    }

    @Override
    public String getName() {
View Full Code Here

                    GridCoverage2D cov = r.read(null);

                    g.setEnvelope(cov.getEnvelope2D());
                    g.setGrid(cov.getGridGeometry());

                    cov.dispose(false);

                    //compute time stamp
                    g.setTimestamp(timeHandler.computeTimestamp(g));

                    return g;
View Full Code Here

        } catch (PointOutsideCoverageException e) {
            // it's fine, users might legitimately query point outside, we just don't
            // return anything
        } finally {
            RenderedImage ri = coverage.getRenderedImage();
            coverage.dispose(true);
            if(ri instanceof PlanarImage) {
                ImageUtilities.disposePlanarImageChain((PlanarImage) ri);
            }
        }
        return Collections.singletonList(pixel);
View Full Code Here

            assertEquals( 1000.0, range.getMaximum(), DELTA);
        } finally {
            if (coverage != null) {
                try {
                    ImageIOUtilities.disposeImage(coverage.getRenderedImage());
                    coverage.dispose(true);
                } catch (Throwable t) {
                    // Does nothing;
                }
            }
            if (reader != null) {
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.