return file;
}
public File exportLayer(String layerName, File file) throws Exception {
file = checkFile(file);
ShapefileDataStoreFactory factory = new ShapefileDataStoreFactory();
Map<String, Serializable> create = new HashMap<String, Serializable>();
URL url = file.toURI().toURL();
create.put("url", url);
create.put("create spatial index", Boolean.TRUE);
create.put("charset", "UTF-8");
ShapefileDataStore shpDataStore = (ShapefileDataStore) factory.createNewDataStore(create);
CoordinateReferenceSystem crs = null;
try (Transaction tx = neo4jDataStore.beginTx()) {
SimpleFeatureType featureType = neo4jDataStore.getSchema(layerName);
GeometryDescriptor geometryType = featureType.getGeometryDescriptor();
crs = geometryType.getCoordinateReferenceSystem();