if (!(descriptor instanceof ParameterDescriptor))
continue;
// get name and default value
final ParameterDescriptor desc = (ParameterDescriptor) descriptor;
final ReferenceIdentifier name = desc.getName();
final Object value = desc.getDefaultValue();
// //
//
// Requested GridGeometry2D parameter
//
// //
if (descriptor.getName().equals(
AbstractGridFormat.READ_GRIDGEOMETRY2D.getName())) {
if (value == null)
continue;
final GridGeometry2D gg = (GridGeometry2D) value;
requestedBBox = new ReferencedEnvelope((Envelope) gg.getEnvelope2D());
requestedRasterArea = gg.getGridRange2D().getBounds();
requestedGridToWorld = (AffineTransform) gg.getGridToCRS2D();
continue;
}
if (name.equals(ImageCollectionFormat.BACKGROUND_VALUES.getName())) {
if (value == null)
continue;
backgroundValues = (double[]) value;
continue;
}
// //
//
// Use JAI ImageRead parameter
//
// //
if (name.equals(AbstractGridFormat.USE_JAI_IMAGEREAD.getName())) {
if (value == null)
continue;
readType = ((Boolean) value) ? ReadType.JAI_IMAGEREAD
: ReadType.DIRECT_READ;
continue;
}
// //
//
// Overview Policy parameter
//
// //
if (name.equals(AbstractGridFormat.OVERVIEW_POLICY.getName())) {
if (value == null)
continue;
overviewPolicy = (OverviewPolicy) value;
continue;
}
if (name.equals(ImageCollectionFormat.SUGGESTED_TILE_SIZE.getName())) {
final String suggestedTileSize = (String) value;
// Preliminary checks on parameter value
if ((suggestedTileSize != null) && (suggestedTileSize.trim().length() > 0)) {