// CollectionFeatureSource source = new CollectionFeatureSource(simpleFeatureCollection);
//
// return source;
// }
CollectionDataStore store = new CollectionDataStore(collection);
String typeName = store.getTypeNames()[0];
try {
return store.getFeatureSource(typeName);
} catch (IOException e) {
throw new IllegalArgumentException("CollectionDataStore inconsistent, "
+ " ensure type name "+typeName+" is the same for all features", e);
}
}