/* Output the staged features to Shapefile */
final File shapeDir = Files.createTempDir();
File shapeFile = new File(shapeDir, shpName + ".shp");
LOG.debug("writing out shapefile {}", shapeFile);
ShapefileDataStore outStore = new ShapefileDataStore(shapeFile.toURI().toURL());
outStore.createSchema(contourSchema);
/* "FeatureSource is used to read features, the subclass FeatureStore is used for
* read/write access. The way to tell if a File can be written to in GeoTools is to use an
* instanceof check. */
SimpleFeatureStore featureStore = (SimpleFeatureStore) outStore.getFeatureSource();
featureStore.addFeatures(contourFeatures);