Examples of dispose()


Examples of org.geotools.coverage.grid.io.AbstractGridCoverageWriter.dispose()

      else{
        writer = new GeoTiffWriter(new File(m_sFilename));
      }
      GridCoverage2D gc = (GridCoverage2D) m_BaseDataObject;
      writer.write(gc.geophysics(true), null);
      writer.dispose();
    }catch (Exception e){
      e.printStackTrace();
    }

  }
View Full Code Here

Examples of org.geotools.coverage.grid.io.GranuleSource.dispose()

                    throw new WCS20Exception("Failed to load the coverage granules for covearge "
                            + ci.prefixedName(), e);
                } finally {
                    try {
                        if (source != null) {
                            source.dispose();
                        }
                    } catch (IOException e) {
                        LOGGER.log(Level.FINE, "Failed to dispose granule source", e);
                    }
                }
View Full Code Here

Examples of org.geotools.coverage.grid.io.GridCoverage2DReader.dispose()

                        final boolean removed = FileUtils.deleteQuietly(DataUtilities.urlToFile(rasterPath));
                    }
                } finally {
                    if (coverageReader != null) {
                        try {
                            coverageReader.dispose();
                        } catch (Throwable t) {
                            //Ignoring exceptions on disposing readers
                        }
                    }
                }
View Full Code Here

Examples of org.geotools.coverage.grid.io.StructuredGridCoverage2DReader.dispose()

            assertEquals(15, files.length);
            reader.delete(true);
            files = workDir.listFiles();
            assertEquals(0, files.length);
        } finally {
            reader.dispose();
        }
    }

    @Test
    public void testReaderDeleteNoGranules() throws Exception {
View Full Code Here

Examples of org.geotools.coverage.io.CoverageAccess.dispose()

                    LOGGER.log(Level.WARNING, t.getLocalizedMessage(), t);
                }
            } finally {
                if (access != null) {
                    try {
                        access.dispose();
                    } catch (Throwable t) {
                        // Does nothing
                    }
                }
            }
View Full Code Here

Examples of org.geotools.coverage.io.CoverageSource.dispose()

            if (coverages != null && !coverages.isEmpty()) {
                Iterator<String> keysIt = coverages.keySet().iterator();
                while (keysIt.hasNext()) {
                    String key = keysIt.next();
                    CoverageSource sourceCov = coverages.get(key);
                    sourceCov.dispose();
                }
            }
            coverages.clear();
            coverages = null;
        }
View Full Code Here

Examples of org.geotools.coverage.io.catalog.CoverageSlicesCatalog.dispose()

            assertTrue(!indexes.isEmpty());
        } catch (Exception e) {
            t.rollback();
        } finally {
            if (sliceCat != null) {
                sliceCat.dispose();
            }

            t.close();

            FileUtils.deleteDirectory(parentLocation);
View Full Code Here

Examples of org.geotools.coverage.io.netcdf.NetCDFReader.dispose()

            grid.evaluate(nodataPoint, result_2);
            Assert.assertTrue(Float.isNaN(result_2[0]));
        } finally {
            if (reader != null) {
                try {
                    reader.dispose();
                } catch (Throwable t) {
                    // Does nothing
                }
            }
        }
View Full Code Here

Examples of org.geotools.coverageio.BaseGridCoverage2DReader.dispose()

//                    writer.write(image);
                   
                   
                    writer.dispose();
                    gc.dispose(true);
                    reader.dispose();
                }
            }
        }
    }
}
View Full Code Here

Examples of org.geotools.data.DataAccess.dispose()

        } catch (Exception e) {
            LOGGER.log(Level.WARNING, "Import process failed", e);
            summary.end(e);
        } finally {
            if(da != null)
                da.dispose();
        }
    }

    public ImportSummary getSummary() {
        return summary;
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.