ROI roi = new ROIGeometry(simplifiedGeometry, false);
// run the stats via JAI
Statistic[] reqStatsArr = new Statistic[] { Statistic.MAX, Statistic.MIN,
Statistic.RANGE, Statistic.MEAN, Statistic.SDEV, Statistic.SUM };
final ZonalStatsOpImage zsOp = new ZonalStatsOpImage(cropped.getRenderedImage(),
classificationRaster, null, null, reqStatsArr, new Integer[] { band }, roi, null,
novalueRangeList);
return (ZonalStats) zsOp.getProperty(ZonalStatsDescriptor.ZONAL_STATS_PROPERTY);
} finally {
// dispose coverages
if (cropped != null) {
cropped.dispose(true);
}