Database - Plateful/plateful-mobile GitHub Wiki
Download Spatial Plugin for Neo4j on Server
-
Get into directory
cd /var/lib/neo4j/plugins
-
Download file in directory
sudo wget "https://raw.githubusercontent.com/neo4j-contrib/m2/master/releases/org/neo4j/neo4j-spatial/0.13-neo4j-2.1.2/neo4j-spatial-0.13-neo4j-2.1.2-server-plugin.zip"
-
Unzip plugins in directory
sudo unzip neo4j-spatial-0.13-neo4j-2.1.2-server-plugin.zip
Setup Spatial R-Tree
-
Create a simple point layer
curl -X POST -d '{"layer":"geom","lat":"lat","lon":"lon"}' --header "Content-Type:application/json" http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer ```
-
Add a spatial index
curl -X POST -d '{"name":"geom","config" {"provider":"spatial","geometry_type":"point","lat":"lat","lon":"lon"}}' --header "Content-type:application/json" http://localhost:7474/db/data/index/node/ ```
Restarting Database
- Log into [email protected]
- cd /var/lib/neo4j/bin
- Check if neo4j is running: sudo ./neo4j status
- If neo4j is not running: sudo ./neo4j start
- If there is another process: pkill [process #]
- If needed: sudo ./neo4j start