Git Product home page Git Product logo

neo4j-contrib / spatial Goto Github PK

View Code? Open in Web Editor NEW
777.0 80.0 191.0 8.52 MB

Neo4j Spatial is a library of utilities for Neo4j that faciliates the enabling of spatial operations on data. In particular you can add spatial indexes to already located data, and perform spatial operations on the data like searching for data within specified regions or within a specified distance of a point of interest. In addition classes are provided to expose the data to geotools and thereby to geotools enabled applications like geoserver and uDig.

Home Page: http://neo4j-contrib.github.io/spatial

License: Other

Makefile 0.02% Scheme 52.13% Shell 0.14% HTML 0.09% Java 46.85% Python 0.11% Ruby 0.66%
neo4j neo4j-database geoserver spatial-data neo4j-spatial-plugin gis postgis geotools procedures neo4j-procedures hacktoberfest

spatial's Issues

previousGeomNode points to deleted node when tx is rolled back

In EditableLayerImpl (https://github.com/neo4j/spatial/blob/master/src/main/java/org/neo4j/gis/spatial/EditableLayerImpl.java) there's a local cache for the last geometry node added to a spatial index layer.

In case of a rollback of the root transaction in which a geometry node was added, this cache will still point to a non-comitted node, so any later access to previousGeomNode leads to a NotFoundException in addGeomNode here:

previousGeomNode.createRelationshipTo(geomNode, SpatialRelationshipTypes.NEXT_GEOM);

which makes the layer index completely unwritable because there's no way to reset previousGeomNode.

A quick fix would to disable caching (see #60). This might have an impact on performance because the last added node would have been determined each time, but I wasn't able to create a better solution today.

private Node addGeomNode(Geometry geom, String[] fieldsName, Object[] fields) {

    Node geomNode = getDatabase().createNode();
    Node previousGeomNode = null; // local

    [...]

Maybe the whole thing in addGeomNode can be further optimized, e.g. with a Cypher query. It seems to be a traversal over all geometries being iterated afterwards just to find the previously added node.

Another solution perhaps would be to synchronize the cached node with transaction stuff, but that seems a fairly amount of work to me.

no index provider 'lucene' found

I get this when running 'mvn install'

OSM-Import[points:true\u002C batch:false]: one-street.osm(org.neo4j.gis.spatial.TestOSMImport$1): No index provider 'lucene' found.

shouldn't there be a dependency in the pom for this?

Upload neo4j-spatial on Maven central

In order to use the neo4j-spatial artifacts, the Neo4j Snapshot Maven Repository must be used, because neo4j-spatial is not on Maven central. That introduces additional moving parts, and may not be possible in all environments.

It would make sense to upload the neo4j-spatial to Maven central, along with the other neo4j artifacts. The fact that it's a 0.x version already communicates the fact that it's not a stable/production ready release, so stability should not be a concern here.

Also, I'm guessing this has to be done at some point anyways, so the earlier the better.

Any plans to do this, perhaps in the not too distant future?

build doesn't work out of the box

For some reason I couldn't get the mvn build work with the geotools 2.7-M3 version.
Putting it to 2.7-SNAOSHOT did the trick. Apart of the version, non geotools people might be helpless here. Just to let you know.

DataSourceName of SpatialIndexProvider is null

Hi,
I was getting this weird exception when I was running a spatial integration test:
Exception in thread "Thread-4" java.lang.NullPointerException
at org.neo4j.kernel.IndexManagerImpl$IndexCreatorThread.run(IndexManagerImpl.java:229)
Investigating it seems that the implementation of SpatialIndexImplementation - getDataSourceName is:
@Override
public String getDataSourceName() {
return null;
}
And, in IndexManagerImpl, when the new IndexCreatorThread is started, this does:
String dataSourceName = getIndexProvider( provider ).getDataSourceName();
XaDataSource dataSource = graphDbImpl.getConfig().getTxModule().getXaDataSourceManager().getXaDataSource( dataSourceName );

So essentially it doesn't find the datasource and fails with a NPE;
I am using neo4j 1.6.1 and neo4j-spatial 0.7 (not SNAPSHOT) and spring-data-neo4j 2.0.1.RELEASE

OutOfMemoryError: PermGen space

Hi,

After following the README for getting mapserver running with Neo4J-spatial, I see this error as soon as I log in as admin:

07 Sep 21:11:30 ERROR [wicket.Session] - Exception when detaching/serializing page
java.lang.OutOfMemoryError: PermGen space

The command I'm running is:

mvn jetty:run -Pneo4j

Mapserver seems to start-up just fine, but the login bombs it out.

Is there a way to bump up memory? Is this expected?

LayerNodeIndex only supports Point[lat/long, WKT]

The settings of LayerNodeIndex only allows the following configurations:

Points with Lat/Long sourced from properties (named at will)
Points sourced from a WKT property (named at will) [But will accept any geometry, in practice]
Any geometry sourced from a WKB property named "" (expected non-functional)

I think it should support the following:

  • Points with Lat/Long sourced from properties (named at will)
  • Any geometry from a WKT property (named at will)
  • Any geometry from a WKB property (named at will)

Plus, maybe:

  • Points from a WKT property (named at will)
  • Points from a WKB property (named at will)

Currently, Points from WKT are implemented the same as any geometry (uses WKTPropertyEncoder), and the Point nature of the index seems otherwise unused. Separating WKT/WKB points from any geometry therefore seems unnecessary.

see https://groups.google.com/forum/#!topic/neo4j/SIxUsF2EExc "neo4j-spatial: Creating a WKT-based index for polygon geometries"

Pull request to follow.

Build Failure

Hi,

After the 1.7 update I'm getting a build failure. Here's the full message:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6:21.366s
[INFO] Finished at: Sat Apr 28 02:06:12 BST 2012
[INFO] Final Memory: 11M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project neo4j-spatial: Could not resolve dependencies for project org.neo4j:neo4j-spatial:jar:0.8-SNAPSHOT: Could not find artifact org.neo4j:neo4j-lucene-index:jar:1.7-SNAPSHOT in osgeo (http://download.osgeo.org/webdav/geotools/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Geospatial queries fail with a NullPointerException if no nodes with spatial indexes have been created

If a neo4j database gets started with no nodes (or no nodes with geospatial properties), and a geospatial query is run against the database, the query will fail with a NullPointerException:

java.lang.NullPointerException
at org.neo4j.gis.spatial.pipes.GeoPipeline.startNearestNeighborLatLonSearch(GeoPipeline.java:363)
at org.neo4j.gis.spatial.indexprovider.LayerNodeIndex.query(LayerNodeIndex.java:249)
at org.neo4j.gis.spatial.indexprovider.LayerNodeIndex.query(LayerNodeIndex.java:291)
at org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun$createStartPipe$3.appl
y(IndexQueryBuilder.scala:83)
at org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun$createStartPipe$3.appl
y(IndexQueryBuilder.scala:81)
at org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$1.apply(StartPipe.scala:38)
at org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$1.apply(StartPipe.scala:37)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
at scala.collection.immutable.List.flatMap(List.scala:45)
at org.neo4j.cypher.internal.pipes.StartPipe.createResults(StartPipe.scala:37)
at org.neo4j.cypher.internal.pipes.SlicePipe.createResults(SlicePipe.scala:32)
at org.neo4j.cypher.internal.pipes.ColumnFilterPipe.createResults(ColumnFilterPipe.scala:39)
at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$4$$anonfun$apply$2.apply(ExecutionPlanImpl.scala:95)
at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$4$$anonfun$apply$2.apply(ExecutionPlanImpl.scala:95)

test failure (mvn install)

Hi peter,

I get the following failures when running "mvn install" against the current 0.9-SNAPSHOT.
I guess the cause for this problem is not on my side. If so, correct me ;)

Results :

Failed tests:   finding_the_plugin(org.neo4j.gis.spatial.SpatialPluginFunctionalTest): Wrong response status. response: {
  querying_with_cypher(org.neo4j.gis.spatial.SpatialPluginFunctionalTest): Wrong response status. response: {

Tests run: 92, Failures: 2, Errors: 0, Skipped: 0

Here the respective surefire report:

-------------------------------------------------------------------------------
Test set: org.neo4j.gis.spatial.SpatialPluginFunctionalTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 6.838 sec <<< FAILURE!
finding_the_plugin(org.neo4j.gis.spatial.SpatialPluginFunctionalTest)  Time elapsed: 1.372 sec  <<< FAILURE!
java.lang.AssertionError: Wrong response status. response: {
  "message" : "No such ServerPlugin: \"SpatialPlugin\"",
  "exception" : "org.neo4j.server.plugins.PluginLookupException: No such ServerPlugin: \"SpatialPlugin\"",
  "stacktrace" : [ "org.neo4j.server.plugins.PluginManager.describeAll(PluginManager.java:149)", "org.neo4j.server.rest.web.ExtensionService.extensionList(ExtensionService.java:292)", "org.neo4j.server.rest.web.ExtensionService.getExtensionList(ExtensionService.java:106)", "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)", "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)", "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)", "java.lang.reflect.Method.invoke(Method.java:616)", "com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)", "com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)", "com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)", "com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)", "com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)", "com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)", "com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)", "com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)", "com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)", "com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)", "com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)", "com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)", "com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)", "com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)", "com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)", "javax.servlet.http.HttpServlet.service(HttpServlet.java:820)", "org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)", "org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)", "org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)", "org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)", "org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)", "org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)", "org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)", "org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)", "org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)", "org.mortbay.jetty.Server.handle(Server.java:326)", "org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)", "org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)", "org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)", "org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)", "org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)", "org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)", "org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)" ]
} expected:<200> but was:<404>
    at org.junit.Assert.fail(Assert.java:93)
    at org.junit.Assert.failNotEquals(Assert.java:647)
    at org.junit.Assert.assertEquals(Assert.java:128)
    at org.junit.Assert.assertEquals(Assert.java:472)
    at org.neo4j.server.rest.RESTDocsGenerator.retrieveResponse(RESTDocsGenerator.java:337)
    at org.neo4j.server.rest.RESTDocsGenerator.retrieveResponseFromRequest(RESTDocsGenerator.java:268)
    at org.neo4j.server.rest.RESTDocsGenerator.get(RESTDocsGenerator.java:214)
    at org.neo4j.gis.spatial.SpatialPluginFunctionalTest.finding_the_plugin(SpatialPluginFunctionalTest.java:48)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.neo4j.test.TestData$1.evaluate(TestData.java:137)
    at org.neo4j.test.TestData$1.evaluate(TestData.java:137)
    at org.junit.rules.RunRules.evaluate(RunRules.java:18)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
querying_with_cypher(org.neo4j.gis.spatial.SpatialPluginFunctionalTest)  Time elapsed: 0.089 sec  <<< FAILURE!
java.lang.AssertionError: Wrong response status. response: {
  "message" : "No such ServerPlugin: \"SpatialPlugin\"",
  "exception" : "org.neo4j.server.plugins.PluginLookupException: No such ServerPlugin: \"SpatialPlugin\"",
  "stacktrace" : [ "org.neo4j.server.plugins.PluginManager.extension(PluginManager.java:123)", "org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:164)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:299)", "org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:121)", "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)", "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)", "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)", "java.lang.reflect.Method.invoke(Method.java:616)", "com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)", "com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)", "com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)", "com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)", "com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)", "com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)", "com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)", "com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)", "com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)", "com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)", "com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)", "com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)", "com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)", "com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)", "com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)", "javax.servlet.http.HttpServlet.service(HttpServlet.java:820)", "org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)", "org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)", "org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)", "org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)", "org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)", "org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)", "org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)", "org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)", "org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)", "org.mortbay.jetty.Server.handle(Server.java:326)", "org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)", "org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)", "org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)", "org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)", "org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)", "org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)", "org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)" ]
} expected:<200> but was:<404>
    at org.junit.Assert.fail(Assert.java:93)
    at org.junit.Assert.failNotEquals(Assert.java:647)
    at org.junit.Assert.assertEquals(Assert.java:128)
    at org.junit.Assert.assertEquals(Assert.java:472)
    at org.neo4j.server.rest.RESTDocsGenerator.retrieveResponse(RESTDocsGenerator.java:337)
    at org.neo4j.server.rest.RESTDocsGenerator.retrieveResponseFromRequest(RESTDocsGenerator.java:298)
    at org.neo4j.server.rest.RESTDocsGenerator.post(RESTDocsGenerator.java:225)
    at org.neo4j.gis.spatial.SpatialPluginFunctionalTest.post(SpatialPluginFunctionalTest.java:74)
    at org.neo4j.gis.spatial.SpatialPluginFunctionalTest.querying_with_cypher(SpatialPluginFunctionalTest.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.neo4j.test.TestData$1.evaluate(TestData.java:137)
    at org.neo4j.test.TestData$1.evaluate(TestData.java:137)
    at org.junit.rules.RunRules.evaluate(RunRules.java:18)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)

Rgds,
Robert

Neo4j in geoserver doesn't read correctly the test data neostore.id

I'm using this configuration

  • Geoserver V 2.1.1
  • Geotools 2.7.2 (rev 37473)

With plugin neo4j .war into tomcat6 and lib into WEB-INF :

activation-1.1.jar
aopalliance-1.0.jar
avalon-framework-api-4.3.1.jar
avalon-framework-impl-4.3.1.jar
batik-anim-1.7.jar
batik-awt-util-1.7.jar
batik-bridge-1.7.jar
batik-css-1.7.jar
batik-dom-1.7.jar
batik-ext-1.7.jar
batik-gvt-1.7.jar
batik-parser-1.7.jar
batik-script-1.7.jar
batik-svg-dom-1.7.jar
batik-svggen-1.7.jar
batik-transcoder-1.7.jar
batik-util-1.7.jar
batik-xml-1.7.jar
bcmail-jdk14-138.jar
bcprov-jdk14-138.jar
cglib-nodep-2.1_3.jar
common-2.6.0.jar
commons-beanutils-1.7.0.jar
commons-codec-1.2.jar
commons-collections-3.1.jar
commons-dbcp-1.3.jar
commons-digester-1.7.jar
commons-fileupload-1.2.1.jar
commons-httpclient-3.1.jar
commons-io-1.3.2.jar
commons-jxpath-1.3.jar
commons-lang-2.1.jar
commons-logging-1.1.1.jar
commons-pool-1.5.3.jar
commons-validator-1.1.4.jar
com.noelios.restlet-1.0.8.jar
com.noelios.restlet.ext.servlet-1.0.8.jar
com.noelios.restlet.ext.simple-1.0.8.jar
ecore-2.6.1.jar
ehcache-1.6.2.jar
ezmorph-1.0.6.jar
fop-0.94.jar
freemarker-2.3.13.jar
geronimo-jta_1.1_spec-1.1.1.jar
gt-api-2.7.2.jar
gt-arcgrid-2.7.2.jar
gt-coverage-2.7.2.jar
gt-cql-2.7.2.jar
gt-data-2.7.2.jar
gt-epsg-hsql-2.7.2.jar
gt-geotiff-2.7.2.jar
gt-graph-2.7.2.jar
gt-gtopo30-2.7.2.jar
gt-image-2.7.2.jar
gt-imageio-ext-gdal-2.7.2.jar
gt-imagemosaic-2.7.2.jar
gt-jdbc-2.7.2.jar
gt-jdbc-postgis-2.7.2.jar
gt-main-2.7.2.jar
gt-metadata-2.7.2.jar
gt-opengis-2.7.2.jar
gt-property-2.7.2.jar
gt-referencing-2.7.2.jar
gt-render-2.7.2.jar
gt-shapefile-2.7.2.jar
gt-shapefile-renderer-2.7.2.jar
gt-svg-2.7.2.jar
gt-temporal-2.7.2.jar
gt-validation-2.7.2.jar
gt-wfs-2.7.2.jar
gt-wms-2.7.2.jar
gt-xml-2.7.2.jar
gt-xsd-core-2.7.2.jar
gt-xsd-fes-2.7.2.jar
gt-xsd-filter-2.7.2.jar
gt-xsd-gml2-2.7.2.jar
gt-xsd-gml3-2.7.2.jar
gt-xsd-ows-2.7.2.jar
gt-xsd-sld-2.7.2.jar
gt-xsd-wcs-2.7.2.jar
gt-xsd-wfs-2.7.2.jar
gwc-2.1.1.jar
gwc-core-1.2.6.jar
gwc-diskquota-1.2.6.jar
gwc-georss-1.2.6.jar
gwc-gmaps-1.2.6.jar
gwc-kml-1.2.6.jar
gwc-rest-1.2.6.jar
gwc-tms-1.2.6.jar
gwc-ve-1.2.6.jar
gwc-wms-1.2.6.jar
gwc-wmts-1.2.6.jar
h2-1.1.119.jar
hsqldb-1.8.0.7.jar
htmlvalidator-1.2.jar
imageio-ext-arcgrid-1.0.8.jar
imageio-ext-customstreams-1.0.8.jar
imageio-ext-gdalarcbinarygrid-1.0.8.jar
imageio-ext-gdal-bindings-1.4.5b.jar
imageio-ext-gdaldted-1.0.8.jar
imageio-ext-gdalecw-1.0.8.jar
imageio-ext-gdalecwjp2-1.0.8.jar
imageio-ext-gdalehdr-1.0.8.jar
imageio-ext-gdalenvihdr-1.0.8.jar
imageio-ext-gdalerdasimg-1.0.8.jar
imageio-ext-gdalframework-1.0.8.jar
imageio-ext-gdalkakadujp2-1.0.8.jar
imageio-ext-gdalmrsid-1.0.8.jar
imageio-ext-gdalmrsidjp2-1.0.8.jar
imageio-ext-gdalnitf-1.0.8.jar
imageio-ext-geocore-1.0.8.jar
imageio-ext-imagereadmt-1.0.8.jar
imageio-ext-tiff-1.0.8.jar
imageio-ext-utilities-1.0.8.jar
itext-2.1.5.jar
jai_codec-1.1.3.jar
jai_core-1.1.3.jar
jai_imageio-1.1.jar
jdom-1.0.jar
je-4.1.7.jar
jettison-1.0.1.jar
json-lib-2.1-jdk13.jar
json-lib-2.2.3-jdk15.jar
json-simple-1.1.jar
jsr-275-1.0-beta-2.jar
jts-1.11.jar
jt-utils-1.1.1.jar
jt-vectorbinarize-1.1.1.jar
junit-4.8.2.jar
log4j-1.2.14.jar
mail-1.4.jar
main-2.1.1.jar
neo4j-kernel-1.4.jar
neo4j-lucene-index-1.4.jar
neo4j-spatial-0.6-SNAPSHOT.jar
net.opengis.ows-2.7.2.jar
net.opengis.wcs-2.7.2.jar
net.opengis.wfs-2.7.2.jar
org.json-2.0.jar
org.restlet-1.0.8.jar
org.restlet.ext.freemarker-1.0.8.jar
org.restlet.ext.json-1.0.8.jar
org.restlet.ext.spring-1.0.8.jar
org.simpleframework-3.1.3.jar
org.w3.xlink-2.7.2.jar
oro-2.0.8.jar
osm-test-data-20100819.jar
ows-2.1.1.jar
ows-2.1.1-tests.jar
picocontainer-1.2.jar
platform-2.1.1.jar
postgresql-8.4-701.jdbc3.jar
rest-2.1.1.jar
restconfig-2.1.1.jar
servlet-api-2.4.jar
shp-test-data-20100819.jar
slf4j-api-1.5.8.jar
slf4j-log4j12-1.4.2.jar
spring-aop-2.5.5.jar
spring-beans-2.5.5.jar
spring-context-2.5.5.jar
spring-context-support-2.5.5.jar
spring-core-2.5.5.jar
spring-jdbc-2.5.5.jar
spring-security-core-2.0.6.RELEASE.jar
spring-security-core-tiger-2.0.6.RELEASE.jar
spring-support-2.0.8.jar
spring-tx-2.5.5.jar
spring-web-2.5.5.jar
spring-webmvc-2.5.5.jar
stax-1.2.0.jar
stax-api-1.0.1.jar
vecmath-1.3.2.jar
wcs1_0-2.1.1.jar
wcs1_1-2.1.1.jar
wcs-2.1.1.jar
web-core-2.1.1.jar
web-demo-2.1.1.jar
web-gwc-2.1.1.jar
web-security-2.1.1.jar
web-wcs-2.1.1.jar
web-wfs-2.1.1.jar
web-wms-2.1.1.jar
wfs-2.1.1.jar
wicket-1.4.12.jar
wicket-extensions-1.4.12.jar
wicket-ioc-1.4.12.jar
wicket-spring-1.4.12.jar
wms-2.1.1.jar
xalan-2.7.0.jar
xercesImpl-2.6.2.jar
xml-apis-1.3.04.jar
xml-apis-ext-1.3.04.jar
xml-apis-xerces-2.7.1.jar
xmlgraphics-commons-1.2.jar
xpp3-1.1.3.4.O.jar
xpp3_min-1.1.4c.jar
xsd-2.6.0.jar
xstream-1.3.1.jar

Neo4 run into geoserver normaly,
After construction of neo4j test with this command : mvn test -Dtest=TestDynamicLayers
I have this osm layer into neo4j db : 1311178267339 (dl here if you want to test http://dl.dropbox.com/u/3026820/1311178267339.tar.gz )

I'm trying to load neostore.id with this parameter into geoserver neo4j store panel "URL connection parameters" :
file:/home/srey/TRAVAUX/THESE/REPOSITORY_GIT/neo4j-spatial/target/var/neo4j-db/1311178267339/neostore.id

I have this error :
Error creating data store, check the parameters. Error message: Could not acquire data access 'Neo4j-Spatial Test'

So i think this tutorial is outdated : http://wiki.neo4j.org/content/Neo4j_Spatial_in_GeoServer
And i'm really sorry because i can visualize neo4 data with geoserver :-/
Do you have an idea ? How can i resolve this problem ?
Thanks a lot

geoserver plugin error when creating new store

Hi,

I am able to get the geoserver plugin installed, and geoserver displays the neo4j-spatial data store option. However, when I configure a new data store and attempt to save, nothing happens. If I navigate to the data source listing in geoserver, I don't see my new neo4j data source. When I try to create again, I get this:

Error creating data store, check the parameters. Error message: Unable to lock store [/Applications/GeoServer.app/Contents/Resources/Java/neo4jdb/neostore.relationshiptypestore.db.names], this is usually caused by another Neo4j kernel already running in this JVM for this particular store

I've tried this on an empty directory, and an existing neo4j-spatial index directory.

special chars mess up checkout

Special characters like in: "förstadsgatan" in LayersTest get messed up in my checkout. Even if that could be a setting of mine, I would suggest to keep them out of the code.

They produce stuff like:
Coordinate crossing_bygg_förstadsgatan = new Coordinate( 13.0171471,
55.6074148 );
Coordinate[] waypoints_förstadsgatan = {
new Coordinate( 13.0201511, 55.6066846 ),
crossing_bygg_förstadsgatan };

Which obviously doesn't compile.

Failing dependencies (pom.xml) / image-processing broken when using 0.9SNAPSHOT

Hi,

when I add neo4j-spatial to my pom.xml[1], i get the following error on resolving dependencies:

Some projects fail to be resolved
Impossible to resolve dependencies of tiramisu#gastronom;0.0.1-SNAPSHOT unresolved dependency: jgridshift#jgridshift;1.0: not found
download failed: javax.media#jai_core;1.1.3!jai_core.jar

I get a similar error when adding neo4j-spatial-0.8([2]).

This error is annoying on the one hand, on the other hand it breaks my image-processing.
Following error appears when I am using "ImageIO.write()", which works fine without having neo4j-spatial-0.9SNAPSHOT in the pom.xml:

java.lang.NoClassDefFoundError: javax/media/jai/widget/ScrollingImagePanel
at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageWriterSpi.onRegistration(TIFFImageWriterSpi.java:145)
at javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:715)
at javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:302)
at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:211)
at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
at javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
at javax.imageio.ImageIO.<clinit>(ImageIO.java:65)
at domain.services.QRCodeService.createQRCode(QRCodeService.java:26)
[...]

For time being, i am unsing neo4j-spatial 0.8 to avoid the image-processing problem.

As far as I can see, this issue is caused by your dependency to geotools. Maybe it's a solution to exclude geotools image-processing.

[1]

org.neo4j
neo4j-spatial
0.9-SNAPSHOT

[2]
download failed: javax.media#jai_core;1.1.3!jai_core.jar

server plugin zip

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?

ClassNotFoundException in LayerNodeIndex

neo4j-spatial (0.8 release) has a mandatory dependency on GremlinGroovyPipeline in com.tinkerpop.gremlin.groovy, but in the pom.xml, the dependency is only of type 'provided'.

This leads to a CNFE here:

java.lang.NoClassDefFoundError: com/tinkerpop/gremlin/groovy/GremlinGroovyPipeline
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.neo4j.gis.spatial.indexprovider.LayerNodeIndex.query(LayerNodeIndex.java:237)

Home brew installer

In the same fashion as Neo4j.

Perhaps related - the current tests do not run on a Mac OS X Lion 10.7.2 MacBook Pro with 8GB memory (varying errors on different runs).

build failure

I am trying to build neo4j-spatial

but

[INFO]

[INFO] BUILD FAILURE

[INFO]

[INFO] Total time: 36:36.406s
[INFO] Finished at: Sun Mar 11 22:34:38 KST 2012
[INFO] Final Memory: 9M/17M

[INFO]

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-
plugin:2.9:test (default-test) on project neo4j-spatial: There are
test failures.
[ERROR]
[ERROR] Please refer to C:\dev\neo4j_udig\neo4j\spatial\target
\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

maven version problem??

in pom.xml

  <plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <!-- <version>2.7.1</version> -->
        <version>2.7.1</version>
    <configuration>
      <argLine>-server -Xms512m -Xmx2500m -XX:+UseConcMarkSweepGC</argLine>
    </configuration>
  </plugin>

is this not problem?

Build failure due to asm dependency

This isn't a problem with neo4j spatial, but is causing the build to fail. I've resolved the issue by manually altering my m2 repository to include the correct asm-3.1.pom and asm-3.1.jar in /asm/3.1 and adding /asm-parent/3.1/asm-parent-3.1.pom. These files were available from the asm website.

Cheers,

_Chris

Note: This occurred using maven 2.

findClosestPointsTo(Coordinate, double) not honoring user-supplied distance

While implementing a function on top of SimplePointLayer I found a flaw in the above function. The second parameter (distance) is never used but the function always searches with a fixed radius of 10km. The fix is quite easy:

SearchPointsWithinOrthodromicDistance distanceQuery = new SearchPointsWithinOrthodromicDistance(point, distance, true);

[cf. https://github.com/neo4j/neo4j-spatial/blob/master/src/main/java/org/neo4j/gis/spatial/SimplePointLayer.java#L48]

My workaround for this issue was to reimplement the following function in user-space:
List findClosestPoints(SearchPointsWithinOrthodromicDistance)

BR,
Tilman

non batch OSM parser

Is there a 'non batch' OSM inserter? There were allusions to this but I can't seem to find any and the OSMBatchInserter blows up with an out-of-memory exception with a large number of Nodes/Ways. I'd be happy to use ruby or python but can't seem to get those setup either.

Bug in SearchClosest

Hi!

I think having detected a bug in SearchClosest, namely the onIndexReference() - method seems not to be correct since it
excludes Geometries which could be nearer than another Geometry.

public final void onIndexReference(Node geomNode) {
Envelope geomEnvelope = getEnvelope(geomNode);
if (searchWindow == null || geomEnvelope.intersects(searchWindow)) {
onEnvelopeIntersection(geomNode, geomEnvelope);
}
}

Problem is that if envelops do not intersect, onEnvelopeIntersection() method is not entered.

I currently play around with neo4j and i occassionally found a case where a geometry which does not intersect with Envelope is the nearer.

In my case I created a very short Linestring, a very long Linestring and a point from which the distance to the small Linestring is shorter than to the long Linestring.

Problem is that the envelope of the short linestring does not intersect with the search window, but the envelope of the long Linestring does and so the long Linestring wins, which is not correct.

The short LineString is "LINESTRING(16.3493032 48.199882,16.3479487 48.1997337)"
The long LineString is "LINESTRING(16.3178388 48.1979135,16.3195494 48.1978011,16.3220815 48.197824,16.3259696 48.1978297,16.3281211 48.1975952,16.3312482 48.1968743,16.3327931 48.1965196,16.3354641 48.1959911,16.3384376 48.1959609,16.3395792 48.1960223,16.3458708 48.1970974,16.3477719 48.1975147,16.348008 48.1975665,16.3505572 48.1984533,16.3535613 48.1994545,16.3559474 48.2011765,16.3567056 48.2025723,16.3571261 48.2038308,16.3578393 48.205176)"
The Point is 16.348243, 48.199678

regards

neo4jgraph

Refactor LayerNode Index

Simplify lookup methods by putting the behavior into different classes.

Implement putIfAbsent, make sure that remove removes the node.

Improve exception handling (e.g. in remove)

Poor Performance for EditableLayerImpl#addGeomNode

EditableLayerImpl#addGeomNode finds the last geo node in the traversal path. For longer paths where there are a large number of nodes in the layer, the logic to traverse the entire path just to find the last node will result in unacceptable performance. Using a postorderBreadthFirst ordering will vastly improve the performace, as the levels are selected starting at the deepest depths.

See https://github.com/bm3780/spatial/commit/60accf4d8cb3310f327edb0e2233ae15a9a1426b for changes.

LayerNodeIndex#add operation should be idempotent

org.neo4j.gis.spatial.indexprovider.LayerNodeIndex#add doesn't seem to conform to the org.neo4j.graphdb.index.Index#add interface specifications:

"Adds a key/value pair for entity to the index. If that key/value pair for the entity is already in the index it's up to the implementation to make it so that such an operation is idempotent."

In my tests, calling LayerNodeIndex#add N number of times for the same Node resulted in N number of nodes being added to the corresponding Spatial Layer for that index.

geoserver plugin installation issue

I can't get the neo4j-geoserver plugin to work (GeoServer 2.1.4, MacOS) when I follow the instructions on the main page, GeoServer starts up, and in the console are errors (errors pasted below). The only way I got this to work is to copy the neo4j lib contents (from the downloaded distribution) into GeoServer WEB-INF/lib, then copy ONLY the neo4j-spatial-0.9-SNAPSHOT.jar into GeoServer WEB-INF/lib. So maybe this is just a documentation issue?

-- in the geoserver UI console after starting:

  • GEOSERVER_DATA_DIR: /Applications/GeoServer.app/Contents/Resources/Java/data_dir
    Loaded style 'burg'
    Loaded style 'capitals'
    Loaded style 'cite_lakes'
    Loaded style 'dem'
    Loaded style 'giant_polygon'
    Loaded style 'grass'
    Loaded style 'green'
    Loaded style 'line'
    Loaded style 'poi'
    Loaded style 'point'
    Loaded style 'poly_landmarks'
    Loaded style 'polygon'
    Loaded style 'pophatch'
    Loaded style 'population'
    Loaded style 'rain'
    Loaded style 'raster'
    Loaded style 'restricted'
    Loaded style 'simple_roads'
    Loaded style 'simple_streams'
    Loaded style 'tiger_roads'
    Loaded default workspace cite
    Loaded workspace 'cite'
    Loaded workspace 'it.geosolutions'
    Loaded workspace 'nurc'
    Loaded workspace 'sde'
    Loaded workspace 'sf'
    Loaded workspace 'tiger'
    Loaded workspace 'topp'
    Loaded store 'arcGridSample', enabled
    Loaded coverage store 'arcGridSample'
    Invocation of destroy method failed on bean with name 'geoServerLoader': java.lang.NullPointerException
    Context initialization failed

When I visit http://localhost:8080/geoserver/web, I get:

HTTP ERROR: 503

SERVICE_UNAVAILABLE
RequestURI=/geoserver/web

Somehow neo4j spatial is creating invalid relationships between its data nodes

The following exception occured when I was trying to update a node with spatial data:

org.neo4j.graphdb.NotFoundException: More than one relationship[RTREE_REFERENCE, INCOMING] found for NodeImpl#14271

This is using neo4j-spatial v0.8 with neo4j 1.7.

Node 14271 has these properties:

id: 14270
bbox: [-112.36,33.45,-112.36,33.45]
wkt: "POINT (-112.36 33.45)"
gtype: 1

It had two incoming RTREE_REFERENCE relationships to nodes with the bbox property:

bbox: [-112.36,33.45,-112.07,33.45]

The other one I deleted, so that the app would work properly, but it had a bbox value slightly different, but one that would enclose the point in node 14271.

I don't have a test that will reproduce this, and I frankly have no idea how it happened. I could NOT reproduce this on my own after I deleted the second relationship.

Build failure constructing jars

Hi

I get a build failure (message below) on OSX Mountain Lion using commit 208f841. I have tried building with both Java 1.6 and 1.7. I am using maven 2 from Mac Ports.

Thanks!

[INFO] Building jar: /Users/weber/Desktop/Work/sources/spatial/target/neo4j-spatial-0.9-SNAPSHOT-javadoc.jar
[INFO] [jar:test-jar {execution: attach-test-jar-for-mvn-2}]
[INFO] Building jar: /Users/weber/Desktop/Work/sources/spatial/target/neo4j-spatial-0.9-SNAPSHOT-tests.jar
[INFO] [jar:test-jar {execution: attach-test-jar}]
-----------------------------------------------------
this realm = app0.child-container[org.neo4j.build.plugins:docs-maven-plugin:5]
urls[0] = file:/Users/weber/.m2/repository/org/neo4j/build/plugins/docs-maven-plugin/5/docs-maven-plugin-5.jar
urls[1] = file:/Users/weber/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
urls[2] = file:/Users/weber/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
urls[3] = file:/Users/weber/.m2/repository/org/apache/maven/shared/maven-filtering/1.0/maven-filtering-1.0.jar
urls[4] = file:/Users/weber/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.4/plexus-build-api-0.0.4.jar
urls[5] = file:/Users/weber/.m2/repository/org/twdata/maven/mojo-executor/2.0/mojo-executor-2.0.jar
urls[6] = file:/Users/weber/.m2/repository/org/codehaus/plexus/plexus-archiver/1.2/plexus-archiver-1.2.jar
urls[7] = file:/Users/weber/.m2/repository/org/codehaus/plexus/plexus-io/1.0.1/plexus-io-1.0.1.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8


this realm = plexus.core
urls[0] = file:/opt/local/share/java/maven2/lib/maven-2.2.1-uber.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
-----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.neo4j.build.plugins:docs-maven-plugin:5:assemble': Unable to load the mojo 'org.neo4j.build.plugins:docs-maven-plugin:5:assemble' in the plugin 'org.neo4j.build.plugins:docs-maven-plugin'. A required class is missing: org/codehaus/plexus/util/Scanner
org.codehaus.plexus.util.Scanner
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 44 seconds
[INFO] Finished at: Sun Aug 26 15:46:50 SAST 2012
[INFO] Final Memory: 83M/123M
[INFO] ------------------------------------------------------------------------

FilterCQL failure

org.neo4j.gis.spatial.pipes.filtering.FilterCQL doesn't seem to behave as expected.

After creating a filter like this...
FilterCQL filter = new FilterCQL(osmLayer,"highway is not null and geometryType(the_geom) = 'LineString'" );

...operations with the filter filter.hasNext() gives null. Using the same cql for a dynamic layer works.

Gremlin spatial query not returning results

This works:

POST /db/data/ext/SpatialPlugin/graphdb/findGeometriesInLayer {"layer":"UsersWorld","minx":"-71.070231297681","maxx":"-71.091167203206","miny":"42.351920260159","maxy":"42.375030765981"}

This does not:

http> POST /db/data/ext/GremlinPlugin/graphdb/execute_script {"script":"g.idx('UsersWorld').get('bbox','[-71.070231297681, 42.351920260159, -71.091167203206, 42.375030765981]')"}
==> 200 OK
==> "javax.script.ScriptException: java.lang.NullPointerException"

Help!

Unable to build older version on fresh Maven / Java installation

Until the latest version of Neo4j Spatial builds, we're using an older checkout (and building against Neo4j 1.6) -- however, on a fresh Java & Maven installation on our deployment server, it refuses to build, citing a dependency error. The full output is at https://gist.github.com/2551961 -- the offending POM (http://maven.glassfish.org/content/groups/glassfish/net/java/jvnet-parent/1/jvnet-parent-1.pom) seems to have been moved by Oracle?

Can anyone help with this?

docs?

is there something somewhere? I couldn't find anything but the Readme.

thanks

DynamicLayer.restrictLayerProperties and related methods deleted

I was needing to add features similar to the restrictLayerProperties feature I added a month ago, and found, to my horror, that the code was missing. On a search of the github history, I found that about 30-40 lines of nice code was deleted from DynamicLayer.java on the 7th September by Peter as part of RTree refactoring. The commit is at fa3214b#diff-7

I will see if I can recover the old code, but I am very curious as to why this feature was deleted. Is it possible that someone did the RTree refactoring on an old branch, and merged that into master without first merging from master?

Enhance Spatial Index testing

make sure this is tested:

curl -X POST http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer -H "Content-Type:application/json" -d '{"layer":"geom", "lat":"lat", "lon":"lon"}'
curl -X POST http://localhost:7474/db/data/node -H "Content-Type:application/json" -H "Accept:application/json" -d '{"lon": 15.2, "lat": 60.1}'
curl -X POST -H "Content-Type:application/json" -d '{"layer":"geom","node":"http://localhost:7474/db/data/node/5"}' http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addNodeToLayer
curl -X POST -H "Content-Type:application/json" -d '{"layer":"geom","minx":15.0,"maxx":15.3,"miny":60.0,"maxy":60.2}' http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/findGeometriesInLayer

curl -X POST -H "Content-Type:application/json" -d '{"query":"start n = node:geom('bbox:[15.0,15.3,60.0,60.2]') return n"}' http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/CypherPlugin/query

Build failure

Hi,
I make a git clone of master default branch, after an mvn install, here the log of error :

[INFO] Compiling 129 source files to /home/srey/TRAVAUX/THESE/REPOSITORY_GIT/spatial/target/classes
java.io.FileNotFoundException: META-INF/services/org.neo4j.kernel.KernelExtension
at com.sun.tools.javac.processing.JavacFiler.getResource(JavacFiler.java:464)
at org.neo4j.kernel.impl.annotations.AnnotationProcessor.addTo(AnnotationProcessor.java:148)
at org.neo4j.kernel.impl.annotations.ServiceProcessor.process(ServiceProcessor.java:48)
at org.neo4j.kernel.impl.annotations.AnnotationProcessor.process(AnnotationProcessor.java:72)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:793)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:722)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1700(JavacProcessingEnvironment.java:97)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1029)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1163)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1106)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
at com.sun.tools.javac.main.Main.compile(Main.java:417)
at com.sun.tools.javac.main.Main.compile(Main.java:331)
at com.sun.tools.javac.main.Main.compile(Main.java:322)
at com.sun.tools.javac.Main.compile(Main.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161)
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/srey/TRAVAUX/THESE/REPOSITORY_GIT/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[39,0] error: Internal error: java.io.FileNotFoundException: META-INF/services/org.neo4j.kernel.KernelExtension
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.758s
[INFO] Finished at: Sun Apr 01 17:40:58 CEST 2012
[INFO] Final Memory: 35M/228M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project neo4j-spatial: Compilation failure
[ERROR] /home/srey/TRAVAUX/THESE/REPOSITORY_GIT/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[39,0] error: Internal error: java.io.FileNotFoundException: META-INF/services/org.neo4j.kernel.KernelExtension
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project neo4j-spatial: Compilation failure
/home/srey/TRAVAUX/THESE/REPOSITORY_GIT/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[39,0] error: Internal error: java.io.FileNotFoundException: META-INF/services/org.neo4j.kernel.KernelExtension

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
/home/srey/TRAVAUX/THESE/REPOSITORY_GIT/spatial/src/main/java/org/neo4j/gis/spatial/indexprovider/SpatialIndexProvider.java:[39,0] error: Internal error: java.io.FileNotFoundException: META-INF/services/org.neo4j.kernel.KernelExtension

at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more

[ERROR]
[ERROR]

index on wkt property not removed cleanly

(http://groups.google.com/group/neo4j/browse_thread/thread/630dc8ce8c87cf06)

it seems when deleteing a node containing a wkt property the wkt property is not removed from the index, even the node is cleanly removed from the DB. This might result in a NotFoundException in case of spatial search execution as nodes will be returned which actually are no more present in the DB.

Workaround/hack: catch NotFoundException and treat this as a common bahavior..

cheers, Florian;

Add SpatialPlugin#findGeometriesWithinDistance

Currently, there is no way to use Cypher or Gremlin to search the Spatial Index for all geo nodes within a distance. See discussion topic for more details. http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Using-Webadmin-Console-to-Execute-Spatial-Cypher-Query-tp3500531p3500531.html;cid=1321303030769-259

As a workaround, having this ability via the SpatialPlugin would be beneficial.

I've already taken a shot at adding this capability here -> https://github.com/bm3780/spatial/blob/master/src/main/java/org/neo4j/gis/spatial/server/plugin/SpatialPlugin.java

I've updated the SpatialPluginTests here ->
https://github.com/bm3780/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/ServerPluginTest.java

Unable to load the same OSM data in two different layers.

Exception:

java.util.NoSuchElementException: More than one element in org.neo4j.index.impl.lucene.LuceneIndex$1@7b7d1256. First element is 'Node[14]' and the second element is 'Node[2042]'
    at org.neo4j.helpers.collection.IteratorUtil.singleOrNull(IteratorUtil.java:116)
    at org.neo4j.index.impl.lucene.IdToEntityIterator.getSingle(IdToEntityIterator.java:88)
    at org.neo4j.index.impl.lucene.IdToEntityIterator.getSingle(IdToEntityIterator.java:1)
    at org.neo4j.gis.spatial.osm.OSMImporter$OSMGraphWriter.getOSMNode(OSMImporter.java:917)
    at org.neo4j.gis.spatial.osm.OSMImporter$OSMGraphWriter.getOSMNode(OSMImporter.java:727)
    at org.neo4j.gis.spatial.osm.OSMImporter$OSMWriter.createOSMWay(OSMImporter.java:575)
    at org.neo4j.gis.spatial.osm.OSMImporter.importFile(OSMImporter.java:1480)
    at org.neo4j.gis.spatial.osm.OSMImporter.importFile(OSMImporter.java:1314)
    at org.neo4j.gis.spatial.osm.OSMImporter.importFile(OSMImporter.java:1306)

The following Lucene search finds more than one Node and throws an exception. Only the Node inside the current Layer should be returned:

            Node node = changesetNodes.get(osmId);
            if (node == null) {
                logNodeFoundFrom("node-index");
                return indexFor("node").get("node_osm_id", osmId).getSingle();
            } else {
                logNodeFoundFrom("changeset");
                return node;
            }

Spatial index (LayerNodeIndex) cannot be retrieved with IndexManager.forNodes(indexName, customConfiguration)

Obtaining a pre-existing spatial index (LayerNodeIndex) with IndexManager.forNodes(indexName, customConfiguration) throws an IllegalArgumentException.

This is due to SpatialIndexProvider.configMatches(stringStringMap, stringStringMap1) returning false no matter what the parameters.

see https://groups.google.com/forum/#!topic/neo4j/SIxUsF2EExc "neo4j-spatial: Creating a WKT-based index for polygon geometries"

Pull request to follow

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.