Package org.geotools.coverage.grid

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


                + finalRes, actual.getMinY() + finalRes);
        result = ((int[]) mosaic.evaluate(point))[0];
        Assert.assertNotEquals(nodata, result, TOLERANCE);

        // Coverage and RenderedImage disposal
        mosaic.dispose(true);
        resampled.dispose(true);
        disposeCoveragePlanarImage(mosaic);
        disposeCoveragePlanarImage(resampled);
    }
View Full Code Here


                + finalRes, actual.getMinY() + finalRes);
        result = ((int[]) mosaic.evaluate(point))[0];
        Assert.assertNotEquals(nodata, result, TOLERANCE);

        // Coverage and RenderedImage disposal
        mosaic.dispose(true);
        resampled.dispose(true);
        disposeCoveragePlanarImage(mosaic);
        disposeCoveragePlanarImage(resampled);
    }
View Full Code Here

                - finalRes, expected.getMinY() + finalRes);
        result = ((byte[]) mosaic.evaluate(point))[0];
        Assert.assertNotEquals(nodata, result, TOLERANCE);

        // Coverage and RenderedImage disposal
        mosaic.dispose(true);
        disposeCoveragePlanarImage(mosaic);
    }

    // Test which takes an input file, extracts 4 coverages from it, shifts them in order to created a replication.
    @Test
View Full Code Here

        point = new DirectPosition2D(mosaic.getCoordinateReferenceSystem(), -540 + res, -84);
        result = ((byte[]) mosaic.evaluate(point))[0];
        Assert.assertNotEquals(nodata, result, TOLERANCE);

        // Coverage and RenderedImage disposal
        mosaic.dispose(true);
        disposeCoveragePlanarImage(mosaic);
    }

    @AfterClass
    public static void finalStep() {
View Full Code Here

                }
            } catch (Exception e) {
            }
            try {
                if (covClassificator != null) {
                    covClassificator.dispose(true);
                }
            } catch (Exception e) {
            }
            try {
                if (iterator != null) {
View Full Code Here

            IOUtils.closeQuietly(in);
        }
    }
   
    // dispose
    coverage.dispose(true);
    reader.dispose();

   
    //build an absolute index and then make it run
            CatalogBuilderConfiguration c2 = new CatalogBuilderConfiguration();
View Full Code Here

    Assert.assertNotNull(coverage);
    PlanarImage.wrapRenderedImage( coverage.getRenderedImage()).getTiles();
   
   
    // dispose
        coverage.dispose(true);
        reader.dispose()
        }
  }
 
 
View Full Code Here

        // read parameters
        cinfo.getParameters().putAll(/*CoverageUtils.getParametersKVP(format.getReadParameters())*/ parameters);

        /// dispose coverage
        gc.dispose(true);

        return cinfo;
    }

    List<CoverageDimensionInfo> getCoverageDimensions(GridSampleDimension[] sampleDimensions) {
View Full Code Here

                        novalueRangeList);
                return (ZonalStats) zsOp.getProperty(ZonalStatsDescriptor.ZONAL_STATS_PROPERTY);
            } finally {
                // dispose coverages
                if (cropped != null) {
                    cropped.dispose(true);
                }
            }

        }
    }
View Full Code Here

        } catch (ParseException e) {
            throw new RuntimeException(e);
        } finally {
            if (coverage != null) {
                try {
                    coverage.dispose(true);
                } catch (Throwable t) {
                    // Does nothing
                }
            }
        }
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.