public void writeFeaturesAsRaster(
final FeatureCollection<SimpleFeatureType, SimpleFeature> features,
final MapLayer layer, final int order) throws IOException,
AbortedException {
Style style = layer.getStyle();
try {
SimpleFeatureType featureType = features.getSchema();
setUpWriterHandler(featureType);
FeatureTypeStyle[] fts = style.getFeatureTypeStyles();
processStylersRaster(features, fts, layer, order);
LOGGER.fine("encoded " + featureType.getTypeName().toString());
} catch (NoSuchElementException ex) {
throw new DataSourceException(ex.getMessage(), ex);
} catch (IllegalAttributeException ex) {