params.parameter("rangesType").setValue(Range.Type.EXCLUDE); //$NON-NLS-1$
params.parameter("rangeLocalStats").setValue(false); //$NON-NLS-1$
}
final GridCoverage2D coverage = (GridCoverage2D) op.doOperation(params,null);
final ZonalStats zstats = (ZonalStats) coverage
.getProperty(ZonalStatsDescriptor.ZONAL_STATS_PROPERTY);
double min = zstats.statistic(Statistic.MIN).results().get(0).getValue();
double max = zstats.statistic(Statistic.MAX).results().get(0).getValue();
return new double[]{min,max};