Skip to content

Instantly share code, notes, and snippets.

@ikwattro
Created September 28, 2012 08:30
Show Gist options
  • Save ikwattro/3798644 to your computer and use it in GitHub Desktop.
Save ikwattro/3798644 to your computer and use it in GitHub Desktop.
adding neo4j server spatial plugin
#install the plugin
cp $NEO4J_SPATIAL_HOME/target/neo4j-spatial-XXXX-server-plugin.zip
$NEO4J_HOME/plugins
cd unzip neo4j-spatial-XXXX-server-plugin.zip -d $NEO4J_HOME/plugins
#start the server
$NEO4J_HOME/bin/neo4j start
curl http://localhost:7474/db/data/
{ "relationship_index" : "http://localhost:7474/db/data/index/relationship", "node" : "http://localhost:7474/db/data/node", "relationship_types" : "http://localhost:7474/db/data/relationship/types", "extensions_info" : "http://localhost:7474/db/data/ext", "node_index" : "http://localhost:7474/db/data/index/node", "reference_node" : "http://localhost:7474/db/data/node/0", "extensions" : { "SpatialPlugin" : { "addSimplePointLayer" : "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer", "addNodeToLayer" : "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addNodeToLayer" } } }
curl -d "layer=test" http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer Creating new layer 'test' unless it already exists [ { "outgoing_relationships" : "http://localhost:7474/db/data/node/2/relationships/out", "data" : { "layer_class" : "org.neo4j.gis.spatial.EditableLayerImpl", "layer" : "test", "geomencoder" : "org.neo4j.gis.spatial.encoders.SimplePointEncoder", "ctime" : 1304444390349 }, "traverse" : "http://localhost:7474/db/data/node/2/traverse/{returnType}", "all_typed_relationships" : "http://localhost:7474/db/data/node/2/relationships/all/{-list|&|types}", "property" : "http://localhost:7474/db/data/node/2/properties/{key}", "self" : "http://localhost:7474/db/data/node/2", "properties" : "http://localhost:7474/db/data/node/2/properties", "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/2/relationships/out/{-list|&|types}", "incoming_relationships" : "http://localhost:7474/db/data/node/2/relationships/in", "extensions" : { }, "create_relationship" : "http://localhost:7474/db/data/node/2/relationships", "all_relationships" : "http://localhost:7474/db/data/node/2/relationships/all", "incoming_typed_relationships" : "http://localhost:7474/db/data/node/2/relationships/in/{-list|&|types}" } ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment