private void importShapefileDatabase(String shpPath, String dbPath, String layerName) throws ShapefileException, FileNotFoundException, IOException {
GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(dbPath).setConfig(Neo4jTestCase.LARGE_CONFIG ).newGraphDatabase();
ShapefileImporter importer = new ShapefileImporter(graphDb, new ConsoleListener(), 10000, true);
importer.setFilterEnvelope(makeFilterEnvelope());
importer.importFile(shpPath, layerName, Charset.forName("UTF-8"));
graphDb.shutdown();
}
private Envelope makeFilterEnvelope() {
Envelope filterEnvelope = new Envelope();
filterEnvelope.expandToInclude(new Coordinate(-71.00, 42.10));