Importing the OpenStreetMap files
OpenStreetMap is a powerhouse of data when it comes to geospatial data. It is a collaborative project to create a free, editable map of the world. OpenStreetMap provides geospatial data in the .osm
file format. To read more about .osm
files in general, check out http://wiki.openstreetmap.org/wiki/.osm.
In this recipe, you will learn how to import the .osm
files into the Neo4j graph database.
Getting ready
Perform the following steps to get started with this recipe:
Install Neo4j using the recipes from Chapter 1, Getting Started with Neo4j. This installation process will depend on your preference for your machine OS type.
Install the Neo4j Spatial plugin using the Installing the Neo4j Spatial extension, recipe from this chapter.
Restart the Neo4j graph database server:
$NEO4J_ROOT_DIR/bin/neo4j restart
How to do it...
Since the OSM file format is, by default, supported by the Neo4j Spatial extension, it is very easy to import data from it using the following steps...