//Init Neo4j database
GraphDatabaseService db = new EmbeddedGraphDatabase(NEO4J_FOLDER);
//Import OSM data into the Neo4j database
new OsmImporter(db).importXML(OSM_MAP);
//Optimize previously loaded database
GlobalGraphOperations graphOperations = GlobalGraphOperations.at(db);
System.out.printf("BEFORE OPTIMIZE nodes = %d ways = %d \n", nodesCount(graphOperations), relCount(graphOperations));