Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


server plugin zip #54

bazo opened this Issue · 24 comments

7 participants


in Using the Neo4j Spatial Server plugin section of the readme it says that Neo4j Spatial is also packaged as a ZIP file that can be unzipped into the Neo4j Server /plugin directory.

where can i find this plugin?


Added as github download.


thanks, but i can't get it to work. i'm trying out the examples from here it could use some formatting, though :) anyway, when i run the first curl request i get a lot of errors like

curl: (3) [globbing] unmatched brace at pos 2,curl: (6) Couldn't resolve host 'relationship_index', or HTTP ERROR 404 Problem accessing /db/data/index/relationship,. Reason: not found, curl: (6) Couldn't resolve host 'node', Couldn't resolve host 'relationship_types' and so on. 

i copied all the files from the zip into the plugins folder and restarted the server, is there anything else i should do?


@bazo I guess you just copied and pasted the example. The JSON-Object after the first curl line is supposed to be the answer of the server. It lists the available extensions.
$ curl http://localhost:7474/db/data/
If you installed the Spatial Plugin correctly you will find it under the "extensions" property and you can continue to query like
$ curl -d "layer=test" http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
to create a layer.


you're right, i tried to run all the curl commands. it is hard to distinguish what is a command and what a response when it's all in one line and i'm not really used to curl.

what i would really like to see is some simple, language agnostic example how to add coordinates to an entity and then query by proximity or somehting. all i could find are java examples dealing with complex maps and stuff which are really outside of my scope.


curl -d "layer=test" http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer gives me exception that Mandatory argument layer is not supplied


I can't really tell what the problem is then. I am using Neo4j 1.8RC1 and the server plugins I downloaded today from this repo. The layer parameter is obviously given and I can execute the query just fine.

Here is a short demonstration how to create three points in a layer and query them via a bounding box.

# Looking for available extensions
curl -v http://localhost:7474/db/data/

# Creating layer
curl -d "layer=test" http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer

# Creating three points from Well-known text format
curl -v http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addGeometryWKTToLayer -H "Content-Type: application/json" -d '{"geometry":"POINT(10 10)", "layer":"test"}'
curl -v http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addGeometryWKTToLayer -H "Content-Type: application/json" -d '{"geometry":"POINT(10 11)", "layer":"test"}'
curl -v http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addGeometryWKTToLayer -H "Content-Type: application/json" -d '{"geometry":"POINT(9 10)", "layer":"test"}'

# Checking the bounding box
# Result is Array of two (boarders are excluded from bbox)
curl -v http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/findGeometriesInBBox -H "Content-Type: application/json" -d '{"minx":9.0,"maxx":11.0,"miny":9.0,"maxy":12.0,"layer":"test"}'

You can also curl the Spatial API without any parameter to get a JSON object which gives some information which parameters are required.

curl http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addGeometryWKTToLayer

ok, let's say i want to find all entities near 10,10 how would i do that? btw creating the layer doesnt work on my 1.8.M06


@bentrm thanks for the excellent example! Now I know my installation is working. (using the


I would love to! Will get on it soon. /bookmarked


actually my colleague is the one who found the file and passed it to my via sneakerware. I am unable to find it online. I know the first response on this thread is that the zips are files in github, but a link would certainly help me locate them. Please! :)

@svzdvd svzdvd closed this

how do we get/build ?


I'll be running neo4j 1.9 enterprise.. So I can click on Tags and download then run 'mvn clean package' and I'll be good to go?


Unrelated question: Are there any docs on integrating spatial into a pre-existing graph? There was a 'part 1' spatial blog post on the neo4j blog back in 2011 that said 'keep your eyes peeled, we're comign out with more blog posts soon on x, y, z' and sadly there haven't been any.

Say I have preexisting nodes and relationships with properties, and I have their lat/long's stored in mongo. My plan is to attach the lat/long as properties on the nodes in neo4j.. but I dont understand how I can then run my gremlin traversals, and at the same time filter on nodes with spatial.. ?



Hello Peter, I've been scouring the web and I'm not the only person with my question.. however its impossible to find an example that helps use the spatial library in the way i've described...


@jrhone i've been askin exactly the same question myself for almost a year now and haven't found the answer yet. i have not seen a single geospatial query. your best bet for now is to use mongo, where this kind of queries are trivial


Here is a good resource of just adding external data to spatial,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.