[Neo4j] neo4j and GeoServer

Peter Neubauer peter.neubauer at neotechnology.com
Sun Dec 5 12:39:27 CET 2010

Neo4j Spatial let's you do this easily, guess Craig will describe how
to do it best in the GIS-way of things.

We are thinking about a "simple" API which is doing what you describe,
via the Neo4j Index API, see
for an example. That would take care of all spatial internals once the
index config is set up. Craig is working on such an interface. Until
then, look at https://github.com/neo4j/neo4j-spatial/blob/300f4d1d1fbb92d6252d5be6dc334250c9514bc7/src/test/java/org/neo4j/gis/spatial/TestSearch.java
for an example of searching with Neo4j Spatial.

Does this make things clearer?


/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.

On Sun, Dec 5, 2010 at 12:33 PM, Gian Luca Farina Perseu
<farinaperseu at gmail.com> wrote:
> Thanks to Anne and Craig for their posts.
> I understand that for my purpouse Neo4j libraries are uncessary for me.
> Craig (and excuse me to Anne for the intrusion), could you tell me how
> to managa at best some simple geo coordinates (lat e long) as Neo4j
> nodes ?
> I only need to store 2 properties (lat e long) some some nodes, then
> to retrieve the nearest points inside a box area with a center defined
> by a lat/long node ....
> Which is the best algorithm to do this ?
> Can I put lat e long as double property in a node, than find it by a
> lucene search ( lat between x and y lat, long between x and y long) ?
> Thank you for your support !
> Gianluca.
> On Sun, Dec 5, 2010 at 12:12 PM, Craig Taverner <craig at amanzi.com> wrote:
>> Hi Paul,
>> There is a wiki page at
>> http://wiki.neo4j.org/content/Neo4j_Spatial_in_GeoServer
>> <http://wiki.neo4j.org/content/Neo4j_Spatial_in_GeoServer>This describes
>> briefly how to setup GeoServer so that the Neo4j and Neo4j Spatial libraries
>> are in the classpath and then how to expose layers from Neo4j in GeoServer.
>> However, it assumes you used Neo4j Spatial features to create the layers in
>> the database in the first place. This must be done with Java code (or in the
>> case of the wiki page example, use the included test cases to create test
>> layers). I suggest run through the case described in the wiki page, and then
>> review the test code used to create the layers in neo4j and see if that
>> answers your questions.
>> But I can also say that the answer to the question on 'how do we define the
>> nodes properties' is that it is 'up to you'. We provide an extensible
>> mechanism so that you can use whatever graph structure you want to create
>> spatial data and provide an adapter to expose that as geometries to the GIS.
>> To make life easier we have a few built in adapters you can pick if you do
>> not want to build your own. There is a WKB adapter that stores the
>> geometries as WKB in a single property of a node, there is a lat/long one
>> that only supports points on one node, and there is a simple sub-graph one
>> that allows polygons in sub-graphs, and finally the most complex one we have
>> is the OSM model that supports the entire open streetmap graph in a very
>> similar structure to OSM itself, but exposed as multiple layers to the GIS.
>> Regards, Craig
>> On Sun, Dec 5, 2010 at 11:11 AM, Anne Ancey <2ae.archi at orange.fr> wrote:
>>> Hello,
>>> I'm interested in documentation concerning the integration of neo4j in
>>> GeoServer.
>>> How do we define the Nodes properties to be mapped in geographical data in
>>> GeoServer ?
>>> Regards,
>>> Paul Lambert
>>> _______________________________________________
>>> Neo4j mailing list
>>> User at lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>> _______________________________________________
>> Neo4j mailing list
>> User at lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
> _______________________________________________
> Neo4j mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

More information about the User mailing list