FeatureJSON reader = new FeatureJSON();
reader.setFeatureType(featureType);
FeatureIterator<SimpleFeature> it = reader.streamFeatureCollection(file);
while(it.hasNext()) {
SimpleFeature f = it.next();
bounds.include(f.getBounds());
}
ft.setNativeBoundingBox(bounds);
LayerInfo layer = catalog.getFactory().createLayer();
layer.setResource(ft);