params.parameter("ranges").setValue(inclusionRanges);
params.parameter("rangesType").setValue(rangesType);
params.parameter("rangeLocalStats").setValue(isLocal);
final GridCoverage2D coverage = (GridCoverage2D) op.doOperation(params, null);
final ZonalStats stats = (ZonalStats) coverage
.getProperty(ZonalStatsDescriptor.ZONAL_STATS_PROPERTY);
final Map<Statistic, List<Result>> statsMap = new HashMap<Statistic, List<Result>>();
for (Statistic statistic : statistis) {
final List<Range> inclRanges = CollectionFactory.list();
inclRanges.addAll(inclusionRanges);
List<Result> statsResult = stats.ranges(inclRanges).statistic(statistic)
.results();
statsMap.put(statistic, statsResult);
}
feature2StatisticsMap.put(fid, statsMap);
}