LOGGER.error("Unable to create data store for shapefile: " + shapefile);
return false;
}
// config coverage props (srs)
final GSFeatureTypeEncoder featureTypeEncoder = new GSFeatureTypeEncoder();
featureTypeEncoder.setName(datasetName);
featureTypeEncoder.setTitle(datasetName);
// set destination srs
if (!srsNull) {
featureTypeEncoder.setSRS(srs);
} else {
// this under the assumption that when the destination srs is null the nativeCRS has an EPSG one so we force them to be the same
featureTypeEncoder.setSRS(nativeCRS);
}
// set native srs
if (!nativeSrsNull) {
featureTypeEncoder.setNativeCRS(nativeCRS);
}
featureTypeEncoder.setProjectionPolicy(policy);
if (!createResource(workspace, StoreType.DATASTORES, storeName, featureTypeEncoder)) {
LOGGER.error("Unable to create a coverage store for coverage: " + shapefile);
return false;
}