@Test @Ignore public void testHarvestSpatialTwoReaders() throws Exception { File source = TestData.file(this.getClass(), "red_footprint_test"); File testDataDir = org.geotools.test.TestData.file(this, "."); File directory1 = new File(testDataDir, "redHarvest1"); File directory2 = new File(testDataDir, "redHarvest2"); if (directory1.exists()) { FileUtils.deleteDirectory(directory1); } if (directory2.exists()) { FileUtils.deleteDirectory(directory1); } FileUtils.copyDirectory(source, directory1); directory2.mkdirs(); for (File file : FileUtils.listFiles(directory1, new RegexFileFilter("red[^3].*"), null)) { assertTrue(file.renameTo(new File(directory2, file.getName()))); } URL harvestSingleURL = URLs.fileToUrl(directory1); ImageMosaicReader reader = new ImageMosaicReader(directory1, null); ImageMosaicReader reader2 = new ImageMosaicReader(directory1, null); for (File file : directory2.listFiles()) { assertTrue(file.renameTo(new File(directory1, file.getName()))); } reader.harvest(null, directory1, null); ReferencedEnvelope readEnvelope = new ReferencedEnvelope( 991000, 992000, 216000, 217000, reader2.getCoordinateReferenceSystem()); Rectangle rasterArea = new Rectangle(0, 0, 10, 10); GridCoverageReaderHelper helper = new GridCoverageReaderHelper(reader2, rasterArea, readEnvelope, null); ParameterValue<GridGeometry2D> ggParam = AbstractGridFormat.READ_GRIDGEOMETRY2D.createValue(); ggParam.setValue(new GridGeometry2D(new GridEnvelope2D(rasterArea), readEnvelope)); GridCoverage2D coverage = helper.readCoverage(new GeneralParameterValue[] {ggParam}); assertNotNull(coverage); coverage.dispose(true); reader.dispose(); reader2.dispose(); }
public GridCoverage2D readCoverage(final GeneralParameterValue[] params) throws IOException { return readSingleCoverage(params, requestedGridGeometry); }
GridCoverageReaderHelper { public GridCoverage2D readCoverage(final GeneralParameterValue[] params) throws IOException { return readSingleCoverage(params, requestedGridGeometry); } }
GridCoverageReaderHelper { public GridCoverage2D readCoverage(final GeneralParameterValue[] params) throws IOException { return readSingleCoverage(params, requestedGridGeometry); } GridCoverageReaderHelper(
            GridCoverage2DReader reader,
            Rectangle mapRasterArea,
            ReferencedEnvelope mapExtent,
            Interpolation interpolation);  GridCoverageReaderHelper(
            GridCoverage2DReader reader,
            Rectangle mapRasterArea,
            ReferencedEnvelope mapExtent,
            Interpolation interpolation,
            Hints hints); }
GridCoverageReaderHelper { public GridCoverage2D readCoverage(final GeneralParameterValue[] params) throws IOException { return readSingleCoverage(params, requestedGridGeometry); } GridCoverageReaderHelper(
            GridCoverage2DReader reader,
            Rectangle mapRasterArea,
            ReferencedEnvelope mapExtent,
            Interpolation interpolation);  GridCoverageReaderHelper(
            GridCoverage2DReader reader,
            Rectangle mapRasterArea,
            ReferencedEnvelope mapExtent,
            Interpolation interpolation,
            Hints hints); static boolean isReprojectingReader(GridCoverage2DReader reader); ReferencedEnvelope getReadEnvelope(); GridCoverage2D readCoverage(final GeneralParameterValue[] params); List<GridCoverage2D> readCoverages(
            final GeneralParameterValue[] readParams, ProjectionHandler handler); List<GridCoverage2D> readCoverages(
            final GeneralParameterValue[] readParams,
            ProjectionHandler handler,
            GridCoverageFactory gridCoverageFactory); }
GridCoverageReaderHelper { public GridCoverage2D readCoverage(final GeneralParameterValue[] params) throws IOException { return readSingleCoverage(params, requestedGridGeometry); } GridCoverageReaderHelper(
            GridCoverage2DReader reader,
            Rectangle mapRasterArea,
            ReferencedEnvelope mapExtent,
            Interpolation interpolation);  GridCoverageReaderHelper(
            GridCoverage2DReader reader,
            Rectangle mapRasterArea,
            ReferencedEnvelope mapExtent,
            Interpolation interpolation,
            Hints hints); static boolean isReprojectingReader(GridCoverage2DReader reader); ReferencedEnvelope getReadEnvelope(); GridCoverage2D readCoverage(final GeneralParameterValue[] params); List<GridCoverage2D> readCoverages(
            final GeneralParameterValue[] readParams, ProjectionHandler handler); List<GridCoverage2D> readCoverages(
            final GeneralParameterValue[] readParams,
            ProjectionHandler handler,
            GridCoverageFactory gridCoverageFactory);  }