O'Reilly logo

Learning Neo4j 3.x - Second Edition by Rik Van Bruggen, Jérôme Baton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The tougher way to import data 

Another way to import an OSM file is to face the perils of Maven and Java on the command line. To get the sources of Neo4j spatial on your machine and build it, use the following query:

git clone git://github.com/neo4j-contrib/spatial.git
cd spatial
mvn clean install -DskipTests=true

Then, after getting the file you need (get the .bz2 archive and unpack the .som file within), type the following on the command line:

mvn dependency:copy-dependencies
java -cp target/classes:target/dependency/* org.neo4j.gis.spatial.osm.OSMImporter new-osm-db bigBigFile.osm 

This will create a new database: a full file hierarchy in a new folder named new-osm-db. This can prove useful to create a new graph without stopping one's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required