final List<GeoWaveData<GridCoverage>> coverages = new ArrayList<GeoWaveData<GridCoverage>>();
coverages.add(new GeoWaveData<GridCoverage>(
adapter,
primaryIndexId,
coverage));
return new Wrapper(
coverages.iterator()) {
@Override
public void close()
throws IOException {
reader.dispose();
}
};
}
else {
LOGGER.warn("Null grid coverage from file '" + input.getAbsolutePath() + "' for discovered geotools format '" + format.getName() + "'");
}
}
catch (final IOException e) {
LOGGER.warn(
"Unable to read grid coverage of file '" + input.getAbsolutePath() + "' for discovered geotools format '" + format.getName() + "'",
e);
}
return new Wrapper(
Collections.emptyIterator());
}