Package org.geotools.gce.imagemosaic

Examples of org.geotools.gce.imagemosaic.ImageMosaicReader.dispose()


            it.close();
        } finally {
            if(it != null) {
                it.close();
            }
            reader.dispose();
        }
    }
   
    @Test
    public void testReHarvest() throws Exception {
View Full Code Here


            assertEquals(1, f.getAttribute("imageindex"));
            assertEquals("2013-03-01T01:00:00.000Z", ConvertersHack.convert(f.getAttribute("time"), String.class));
            it.close();
           
            // close the reader and re-open it
            reader.dispose();
            reader = format.getReader(mosaic);
            source = reader.getGranules("O3", true);
           
            // wait a bit, we have to make sure the old indexes are recognized as old
            Thread.sleep(1000);
View Full Code Here

            it.close();
        } finally {
            if(it != null) {
                it.close();
            }
            reader.dispose();
        }
    }

    @Test
    public void testHarvestHDF5Data() throws IOException {
View Full Code Here

            it.close();
        } finally {
            if(it != null) {
                it.close();
            }
            reader.dispose();
        }
    }

    @Test
    @Ignore
View Full Code Here

            assertEquals("NO2", names[0]);
        } finally {
            if (it != null) {
                it.close();
            }
            reader.dispose();
        }
    }

    @Test
    public void testHarvest3Gome() throws IOException {
View Full Code Here

            it.close();
        } finally {
            if (it != null) {
                it.close();
            }
            reader.dispose();
        }
    }
   
    @Test
    public void testReadCoverageGome() throws IOException {
View Full Code Here

            assertEquals(-180, envelope.getMinimum(1), 0d);
            assertEquals(180, envelope.getMaximum(1), 0d);

            // check we can read a coverage out of it
            coverage = reader.read(null);
            reader.dispose();

            // Checking we can read again from the coverage once it has been configured.
            reader = format.getReader(mosaic);
            coverage = reader.read(null);
            assertNotNull(coverage);
View Full Code Here

        } finally {
            if(coverage != null) {
                ImageUtilities.disposePlanarImageChain((PlanarImage) coverage.getRenderedImage());
                coverage.dispose(true);
            }
            reader.dispose();
        }
    }

    @Test
    public void testAuxiliaryFileHasRelativePath() throws IOException {
View Full Code Here

                IOUtils.closeQuietly(inStream);
            }
            if (reader != null) {
                try {

                    reader.dispose();
                } catch (Throwable t) {
                    // Ignore exception on close attempt
                }
            }
        }
View Full Code Here

            assertEquals(2, reader.getGridCoverageNames().length);

            File[] files = mosaic.listFiles();
            assertEquals(15, files.length);
           
            reader.dispose();
            reader = format.getReader(mosaic);
           
            reader.delete(false);
            files = mosaic.listFiles();
            assertEquals(1, files.length);
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.