// we add a custom feature collection so that we can convert the feature fromt the source feature type to the destination one
// A slightly faster implementation is to not create a new Feature each time in the iterator but wrap the
// source feature in a decorator that adapts the feature to the new Feature type.
// It is a more complicated example and you can see it in action in org.locationtech.udig.catalog.ui.export.FeatureWrapper
dest.addFeatures(new AdaptorFeatureCollection("converting",dest.getSchema()){
@Override
protected void closeIterator(Iterator arg0) {
((ConvertingIterator)arg0).iter.close();
}