@Test public void testRequestInHoleNoData() throws Exception { File mosaicSource = TestData.file(this, "rgba"); File targetRgba = new File("target", "rgba"); FileUtils.deleteQuietly(targetRgba); FileUtils.copyDirectory(mosaicSource, targetRgba); Arrays.stream( targetRgba.listFiles( (f, n) -> n.startsWith("rgba") || n.startsWith("sample_image"))) .forEach(f -> f.delete()); URL testMosaicUrl = fileToUrl(targetRgba); Properties properties = new Properties(); properties.put(Prop.NO_DATA, "0"); try (FileOutputStream fos = new FileOutputStream(new File(targetRgba, "indexer.properties"))) { properties.store(fos, null); } GridCoverage2D coverage = testMosaicHoleOn(testMosaicUrl); assertNoData(coverage, 0d); }
@Override public synchronized void delete(boolean deleteData) throws IOException { String[] coverageNames = getGridCoverageNames(); for (String coverageName : coverageNames) { removeCoverage(coverageName, deleteData, true); } dispose(); granuleCatalog.drop(); if (deleteData) { final File[] list = parentDirectory.listFiles(); if (list != null) { for (File file : list) { FileUtils.deleteQuietly(file); } } } else { finalizeCleanup(); } }
ImageMosaicReader extends AbstractGridCoverage2DReader implements StructuredGridCoverage2DReader { @Override public synchronized void delete(boolean deleteData) throws IOException { String[] coverageNames = getGridCoverageNames(); for (String coverageName : coverageNames) { removeCoverage(coverageName, deleteData, true); } dispose(); granuleCatalog.drop(); if (deleteData) { final File[] list = parentDirectory.listFiles(); if (list != null) { for (File file : list) { FileUtils.deleteQuietly(file); } } } else { finalizeCleanup(); } } }
ImageMosaicReader extends AbstractGridCoverage2DReader implements StructuredGridCoverage2DReader { @Override public synchronized void delete(boolean deleteData) throws IOException { String[] coverageNames = getGridCoverageNames(); for (String coverageName : coverageNames) { removeCoverage(coverageName, deleteData, true); } dispose(); granuleCatalog.drop(); if (deleteData) { final File[] list = parentDirectory.listFiles(); if (list != null) { for (File file : list) { FileUtils.deleteQuietly(file); } } } else { finalizeCleanup(); } } ImageMosaicReader(Object source, Hints uHints);  ImageMosaicReader(Object source); }
ImageMosaicReader extends AbstractGridCoverage2DReader implements StructuredGridCoverage2DReader { @Override public synchronized void delete(boolean deleteData) throws IOException { String[] coverageNames = getGridCoverageNames(); for (String coverageName : coverageNames) { removeCoverage(coverageName, deleteData, true); } dispose(); granuleCatalog.drop(); if (deleteData) { final File[] list = parentDirectory.listFiles(); if (list != null) { for (File file : list) { FileUtils.deleteQuietly(file); } } } else { finalizeCleanup(); } } ImageMosaicReader(Object source, Hints uHints);  ImageMosaicReader(Object source); RasterManager getRasterManager(String name); @Override String[] getGridCoverageNames(); Format getFormat(); GridCoverage2D read(GeneralParameterValue[] params); GridCoverage2D read(String coverageName, GeneralParameterValue[] params); @Override int getGridCoverageCount(); @Override synchronized void dispose(); @Override String[] getMetadataNames(); @Override String[] getMetadataNames(String coverageName); @Override String getMetadataValue(final String name); @Override String getMetadataValue(String coverageName, final String name); @Override Set<ParameterDescriptor<List>> getDynamicParameters(); @Override Set<ParameterDescriptor<List>> getDynamicParameters(String coverageName); boolean isParameterSupported(Identifier name); @Override double[] getReadingResolutions(OverviewPolicy policy, double[] requestedResolution); @Override double[] getReadingResolutions(
            String coverageName, OverviewPolicy policy, double[] requestedResolution); boolean isParameterSupported(String coverageName, Identifier parameterName); @Override GranuleSource getGranules(String coverageName, final boolean readOnly); @Override boolean isReadOnly(); @Override void createCoverage(String coverageName, SimpleFeatureType indexSchema); @Override boolean removeCoverage(String coverageName, final boolean delete); @Override GeneralEnvelope getOriginalEnvelope(); @Override GeneralEnvelope getOriginalEnvelope(String coverageName); @Override GridEnvelope getOriginalGridRange(); @Override GridEnvelope getOriginalGridRange(String coverageName); @Override MathTransform getOriginalGridToWorld(PixelInCell pixInCell); @Override MathTransform getOriginalGridToWorld(String coverageName, PixelInCell pixInCell); @Override CoordinateReferenceSystem getCoordinateReferenceSystem(); @Override CoordinateReferenceSystem getCoordinateReferenceSystem(String coverageName); @Override ImageLayout getImageLayout(); @Override ImageLayout getImageLayout(String coverageName); @Override double[][] getResolutionLevels(); @Override double[][] getResolutionLevels(String coverageName); @Override List<HarvestedSource> harvest(String defaultCoverage, Object source, Hints hints); @Override List<DimensionDescriptor> getDimensionDescriptors(String coverageName); @Override synchronized void delete(boolean deleteData); @Override ResourceInfo getInfo(String coverageName); @Override ServiceInfo getInfo(); ExecutorService getMultiThreadedLoader(); DatasetLayout getDatasetLayout(); }
ImageMosaicReader extends AbstractGridCoverage2DReader implements StructuredGridCoverage2DReader { @Override public synchronized void delete(boolean deleteData) throws IOException { String[] coverageNames = getGridCoverageNames(); for (String coverageName : coverageNames) { removeCoverage(coverageName, deleteData, true); } dispose(); granuleCatalog.drop(); if (deleteData) { final File[] list = parentDirectory.listFiles(); if (list != null) { for (File file : list) { FileUtils.deleteQuietly(file); } } } else { finalizeCleanup(); } } ImageMosaicReader(Object source, Hints uHints);  ImageMosaicReader(Object source); RasterManager getRasterManager(String name); @Override String[] getGridCoverageNames(); Format getFormat(); GridCoverage2D read(GeneralParameterValue[] params); GridCoverage2D read(String coverageName, GeneralParameterValue[] params); @Override int getGridCoverageCount(); @Override synchronized void dispose(); @Override String[] getMetadataNames(); @Override String[] getMetadataNames(String coverageName); @Override String getMetadataValue(final String name); @Override String getMetadataValue(String coverageName, final String name); @Override Set<ParameterDescriptor<List>> getDynamicParameters(); @Override Set<ParameterDescriptor<List>> getDynamicParameters(String coverageName); boolean isParameterSupported(Identifier name); @Override double[] getReadingResolutions(OverviewPolicy policy, double[] requestedResolution); @Override double[] getReadingResolutions(
            String coverageName, OverviewPolicy policy, double[] requestedResolution); boolean isParameterSupported(String coverageName, Identifier parameterName); @Override GranuleSource getGranules(String coverageName, final boolean readOnly); @Override boolean isReadOnly(); @Override void createCoverage(String coverageName, SimpleFeatureType indexSchema); @Override boolean removeCoverage(String coverageName, final boolean delete); @Override GeneralEnvelope getOriginalEnvelope(); @Override GeneralEnvelope getOriginalEnvelope(String coverageName); @Override GridEnvelope getOriginalGridRange(); @Override GridEnvelope getOriginalGridRange(String coverageName); @Override MathTransform getOriginalGridToWorld(PixelInCell pixInCell); @Override MathTransform getOriginalGridToWorld(String coverageName, PixelInCell pixInCell); @Override CoordinateReferenceSystem getCoordinateReferenceSystem(); @Override CoordinateReferenceSystem getCoordinateReferenceSystem(String coverageName); @Override ImageLayout getImageLayout(); @Override ImageLayout getImageLayout(String coverageName); @Override double[][] getResolutionLevels(); @Override double[][] getResolutionLevels(String coverageName); @Override List<HarvestedSource> harvest(String defaultCoverage, Object source, Hints hints); @Override List<DimensionDescriptor> getDimensionDescriptors(String coverageName); @Override synchronized void delete(boolean deleteData); @Override ResourceInfo getInfo(String coverageName); @Override ServiceInfo getInfo(); ExecutorService getMultiThreadedLoader(); DatasetLayout getDatasetLayout(); static final String UNSPECIFIED; }