Axel, I just pushed a first version of a Neo4j Spatial server plugin to github, see
https://github.com/neo4j/neo4j-spatial/blob/f9e75ac62867ecd3fc178f01cfc8bbb40abda3ff/src/main/java/org/neo4j/gis/spatial/server/plugin/SpatialPlugin.java Basically, you copy all dependencies and the neo4j-spatial JARs (get them with "mvn dependency:copy-dependencies" into target/dependency) into $NEO$J_SERVER/plugins and you should get something like [~] $curl -H "Accept: application/json" http://localhost:7474/db/data/ { "extensions-info" : "http://localhost:7474/db/data/ext", "node" : "http://localhost:7474/db/data/node", "node-index" : "http://localhost:7474/db/data/index/node", "relationship-index" : "http://localhost:7474/db/data/index/relationship", "reference_node" : "http://localhost:7474/db/data/node/0", "extensions" : { "GetAll" : { "get_all_nodes" : "http://localhost:7474/db/data/ext/GetAll/graphdb/get_all_nodes", "getAllRelationships" : "http://localhost:7474/db/data/ext/GetAll/graphdb/getAllRelationships" }, "SpatialPlugin" : { "addPointToLayer" : "http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addPointToLayer" } } } And then you add stuff with [~] $curl -H "Accept: application/json" -d "node=http://localhost:7474/db/data/node/0&layer=buildings" http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addPointToLayer [ { "outgoing_relationships" : "http://localhost:7474/db/data/node/0/relationships/out", "data" : { "name" : "Fredrik" }, "traverse" : "http://localhost:7474/db/data/node/0/traverse/{returnType}", "all_typed_relationships" : "http://localhost:7474/db/data/node/0/relationships/all/{-list|&|types}", "property" : "http://localhost:7474/db/data/node/0/properties/{key}", "self" : "http://localhost:7474/db/data/node/0", "properties" : "http://localhost:7474/db/data/node/0/properties", "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/0/relationships/out/{-list|&|types}", "incoming_relationships" : "http://localhost:7474/db/data/node/0/relationships/in", "extensions" : { "ShortestPath" : { "shortestPath" : "http://localhost:7474/db/data/ext/ShortestPath/node/0/shortestPath" }, "DepthTwo" : { "nodesOnDepthTwo" : "http://localhost:7474/db/data/ext/DepthTwo/node/0/nodesOnDepthTwo", "relationshipsOnDepthTwo" : "http://localhost:7474/db/data/ext/DepthTwo/node/0/relationshipsOnDepthTwo", "pathsOnDepthTwo" : "http://localhost:7474/db/data/ext/DepthTwo/node/0/pathsOnDepthTwo" } }, "create_relationship" : "http://localhost:7474/db/data/node/0/relationships", "all_relationships" : "http://localhost:7474/db/data/node/0/relationships/all", "incoming_typed_relationships" : "http://localhost:7474/db/data/node/0/relationships/in/{-list|&|types}" } ] Of course, this just creates the layer and returns the original node, but still, looking at the db give us [~] $neo4j-shell :/Users/peterneubauer/program/neo4j-server/lib/geronimo-jta_1.1_spec-1.1.1.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-examples-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-graph-algo-0.7-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-ha-0.5-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-index-1.2-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-kernel-1.2-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-lucene-index-0.2-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-management-1.2-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-online-backup-0.7-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-remote-graphdb-0.8-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-shell-1.2-1.2.M06.jar:/Users/peterneubauer/program/neo4j-server/lib/neo4j-udc-0.1-1.2.M06-neo4j.jar:/Users/peterneubauer/program/neo4j-server/lib/netty-3.2.1.Final.jar:/Users/peterneubauer/program/neo4j-server/lib/org.apache.servicemix.bundles.jline-0.9.94_1.jar:/Users/peterneubauer/program/neo4j-server/lib/org.apache.servicemix.bundles.lucene-3.0.1_2.jar:/Users/peterneubauer/program/neo4j-server/lib/protobuf-java-2.3.0.jar NOTE: Remote Neo4j graph database service 'shell' at port 1337 Welcome to the Neo4j Shell! Enter 'help' for a list of commands neo4j-sh (Fredrik,0)$ ls *name =[Fredrik] (me) --[KNOWS]-> (2) (me) --[SPATIAL]-> (34) neo4j-sh (Fredrik,0)$ ls 34 *type =[spatial] (34) --[LAYER]-> (35) (34) --[LAYER]-> (38) (34) <-[SPATIAL]-- (me) neo4j-sh (Fredrik,0)$ ls 38 *ctime =[1293647341655] *geomencoder =[org.neo4j.gis.spatial.WKBGeometryEncoder] *layer =[buildings] *layer_class =[org.neo4j.gis.spatial.EditableLayerImpl] (38) <-[LAYER]-- (34) (38) --[RTREE_METADATA]-> (39) (38) --[RTREE_ROOT]-> (40) So the layer is there :) Feel free to tinker around with this and add meaningful stuff to it! Cheers, /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 Thu, Nov 18, 2010 at 8:57 PM, Peter Neubauer <[email protected]> wrote: > Alex, > sounds great, don't hesitate to get back to the list with question and > suggestions! > > Cheers, > > /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 Wed, Nov 17, 2010 at 6:23 PM, Axel Morgner <[email protected]> wrote: >> Currently, I'm still busy with a customer project, but when open >> sourcing the software end of the year, I'll document it. >> >> Am 16.11.2010 00:01, schrieb Peter Neubauer: >>> Axel, >>> nice it worked out for you! Would be great if you could write up a >>> small blog or so on this, and give us some feedback on what to improve >>> to make the component more usable. WDYT? >>> >>> Cheers, >>> >>> /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 Mon, Nov 15, 2010 at 10:03 PM, Axel Morgner<[email protected]> wrote: >>>> On 02.11.2010 14:52, Craig Taverner wrote: >>>>>> Adding neo4j spatial to the picture should enable the CMS handling geo >>>>>> data objects without adding to much complexity (I hope). >>>>> OK. I think I'm beginning to get an idea of what you want. You have a CMS, >>>>> and some of the data is geolocated, in the sense that you know what >>>>> countries it is associated with, and perhaps you even have relationships >>>>> to >>>>> 'country' nodes (or other nodes) representing locations. Now you want to >>>>> use >>>>> Neo4j Spatial to perform simple spatial queries on this. >>>> Your analysis is correct and brilliant. :-) >>>> >>>> In my case, the CMS payload data itself (like HTML, Images, Videos, CSS, >>>> JS, Blogs etc.) is stored in neo4j nodes. But logging data, too, of course. >>>> >>>>> I could imagine something like: >>>>> >>>>> 'give me all countries in the specified region (bounding box) and include >>>>> the number of pages as an attribute of the result set'bute? >>>> Right now I'm using the SearchIntersectWindow class to determine which >>>> countries are needed to display within a certain global region. The >>>> countries data is loaded as a set of GeoJSON files via Javascript (using >>>> Polymaps), so neo4j spatial does only provide the country names. >>>> >>>>> I think you should either use the original shapefiles and the >>>>> existing ShapefileImporter or move to OSM data models for connected >>>>> topologies. >>>>> >>>>> A GeoJSON importer is a nice idea, but not worth the effort if you already >>>>> have shapefiles. >>>> Indeed! I ended up with using the shapefile importer, using neo4j >>>> spatial to serve geodata nodes which are then connected on-the-fly with >>>> geo-tagged CMS data. >>>> >>>> Your comments and suggestions helped me a lot, so I just wanted to say >>>> thanks again. >>>> >>>> Axel >>>> >>>> >> >> _______________________________________________ >> Neo4j mailing list >> [email protected] >> https://lists.neo4j.org/mailman/listinfo/user >> > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

