FileDataStore srcStore = null;
try {
// read the shape file and put it into a SimpeFeatureCollection
srcStore = createDatastore(srcShapeFile);
SimpleFeatureSource featureSource = srcStore.getFeatureSource();
SimpleFeatureCollection sfc = (SimpleFeatureCollection) featureSource.getFeatures();
return enrichAndAddFeatures(sfc, dstPg, layer, year, month, day, true);
} catch (IOException ex) {
throw new PostGisException("Error copying features: " + ex.getMessage(), ex);
} finally {
quietDisposeStore(srcStore);