geotools - Neo4j Spatial over REST through the JAVA API not working (for me) -



geotools - Neo4j Spatial over REST through the JAVA API not working (for me) -

i'm working on grails app on neo4j i'd export gis database.

looking @ examples how utilize neo4j in geoserver/udig appears spatial integration via embedded neo4j databases.

does know whether it's possible set things neo4j available on rest, can interface variety of places?

at first sight appears ought possible:

// works embedded database //def graphdb = new graphdatabasefactory().newembeddeddatabase("/tmp/foo.db"); // doesn't work rest database graphdb = new restgraphdatabase("http://localhost:7474/db/data"); transaction tx = graphdb.begintx() spatialdatabaseservice spatialservice = new spatialdatabaseservice(graphdb) simplepointlayer layer = spatialservice.createsimplepointlayer("points")

with embedded database, spatial index gets created fine. however, rest database, null pointer:

caused nullpointerexception: null ->> 149 | createcompiler in org.neo4j.cypher.executionengine - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 48 | <init> in '' | 59 | createinnerengine in org.neo4j.cypher.javacompat.executionengine | 43 | <init> in '' | 41 | getreferencenode in org.neo4j.gis.spatial.utilities.referencenodes | 78 | getspatialroot in org.neo4j.gis.spatial.spatialdatabaseservice | 114 | getlayer in '' | 259 | containslayer in '' | 303 | createlayer in '' | 287 | createsimplepointlayer in '' | 267 | createsimplepointlayer in '' | 37 | <init> in net.foo.db.neo4j.neo4jservice

the spatialdatabaseservice takes graphdatabaseservice, i'm confused why doesn't work rest one.

is bug or feature (or misunderstanding on part?)

i can, of course, utilize create index api create spatial index:

graphdb.index().fornodes( "points", ["provider": "spatial", "geometry_type": "point", "lat": "lat", "lon":"lon"])

so works, can't create new layer way.

the restgraphdatabase false database doesn't offer capabilities. made work in theory very wasteful each presumably embedded operation go on wire http requests.

install spatial plugin server , access via plugin rest methods.

see: http://neo4j-contrib.github.io/spatial/#spatial-server-plugin

neo4j geotools neo4j-spatial

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -