问题标签 [neo4j-spatial]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
238 浏览

neo4j - 将节点添加到层时,Neo4j 空间服务器错误 500

我正在使用 Neo4j 2.2.2 的 Spatial 插件,并按照http://neo4j-contrib.github.io/spatial/#spatial-layers指南创建了空间索引。

我有预先存在的未连接节点,具有多个标签“DB_2”和“地址”以及属性“名称”、“隆”和“纬度”,当我尝试将这些节点添加到空间索引时出现错误但如果我创建一个没有任何标签的节点,只有“lon”和“lat”属性,它似乎可以正常工作而没有任何错误。

我不确定它是否与我的节点标签或属性有关,因为我无法从指南或其他示例中找到任何暗示这可能是一个问题的迹象。

提前感谢您的帮助!

0 投票
1 回答
215 浏览

neo4j - 如何更新 Neo4j 地理空间索引?

很简单,这个问题或答案在我看过的任何地方都不存在。

目标是重新索引节点以更新其纬度和经度属性。

我用来在 neo4j 中完成地理空间操作的插件称为Spatial


这是我的设置

我创建了一个pointlayer:


然后我创建一个几何空间索引:


我终于将节点添加到索引中:


我有一个关于如何完成重新索引的理论。首先,我会从地理空间索引中删除该节点,然后重新添加它。但我担心这可能会搞砸一些事情。我在其他地方读到删除索引然后添加它们会产生问题。

重新索引节点的正确方法是什么?

0 投票
1 回答
618 浏览

neo4j - 距离内的 Neo4J Spatial 仅返回完全匹配

使用以下脚本将数据添加到 neo4j。数据添加成功,但查询有问题。仅当我给出数据库中节点的确切纬度和经度时,该查询才有效。任何其他坐标都会导致空集。

示例节点:A 29.6490287781 -98.4621124268 B 30.2107849121 -95.7507781982

START n=node:geom('withinDistance:[29.6490287781, -98.4621124268, 50.0]') RETURN n 返回节点 A 但

START n=node:geom('withinDistance:[29.6490287780, -98.4621124260, 50.0]') RETURN n 返回空集

0 投票
1 回答
109 浏览

neo4j - Neo4j 空间密码 insideDistance 查询使用来自先前查询的结果的纬度/经度

我正在尝试在第二个 withinDistance 中使用withinDistance查询的结果。

我有 2 个空间索引,房屋和 POI(兴趣点)。我正在尝试找到符合某些参数的房屋,然后在每个房屋周围找到 POI。

这是我到目前为止所拥有的,但我不知道如何在第二个 withinDistance 查询中传递house.lonhouse.lat作为参数

额外问题:POI 链接到 POI_Type 节点,如何按类型返回每个 House 周围的 POI 计数?

干杯:)

0 投票
0 回答
24 浏览

neo4j - Neo4j 空间索引交叉链接......它是如何发生的,我该如何解决?

我有一个包含大约 150 万个节点的大型 Neo4J 空间数据库。

我注意到空间索引已损坏 - 一些节点是交叉链接的:

返回:

我认为空间索引节点应该有一个 RTREE_REFERENCE。我的怎么可能有两个。数据库中有大约 115 个此类节点存在此问题。

0 投票
3 回答
2063 浏览

openstreetmap - How to run Neo4j with OSM and Neo4jSpatial?

Hello i'm new in neo4j and i would like to use OSM + Neo4j Spatial. I have a maven project and my Neo4j version is 2.3.0-M01

I have a simple code just for importing an OSM file but it displays some errors in the import files: GraphDatabaseService, EmbeddedGraphDatabase and BatchInserter.

May be my problem is with the versions, because i'm using Neo4j 2.3-M01, but i don't know exactly how should i set the versions e.g. here

My pom.xml is based on https://github.com/neo4j-contrib/spatial/blob/master/pom.xml

Plus:

You can have a look into my git repository https://github.com/amhg/OSM

Thank you in advance!

0 投票
1 回答
113 浏览

neo4j - Neo4j Spatial 使用 MATCH 子句

我正在使用 neo4j 空间 withinDistance 函数。我为此找到的所有文档都使用了 START 子句。

我想使用neo4j 推荐的较新的 MATCH 子句。这也是因为我想使用不适用于 START 的 USING INDEX 子句。我的问题是如何用 MATCH 编写以下行。

开始 h = node:geom('withinDistance:[-41.23,174.79, 20.0]')

0 投票
1 回答
103 浏览

neo4j - Neo4J HA 与 Neo4J 空间

所以我刚刚建立了一个 HA 环境,其中我有一个主服务器和一个使用 Neo4J 嵌入式与该集群通信的应用程序实例。如果两个数据库的状态相同,一切似乎都可以正常工作。

但是,如果我从我的从属实例中删除所有数据,并让它加入集群,我希望集群中的数据传播到从属实例中。相反,我得到了似乎是 Neo4J 空间的错误。我的应用程序中有 Neo4J 空间,并且服务器插件安装在主服务器端。

我得到的堆栈跟踪示例:

2015-10-19 15:10:27.096+0000 ERROR [org.neo4j]: Exception when stopping org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556 org.neo4j.gis.spatial.indexprovider.SpatialIndexImplementation.stop()V java.lang.AbstractMethodError: org.neo4j.gis.spatial.indexprovider.SpatialIndexImplementation.stop()V at org.neo4j.kernel.lifecycle.Lifecycles$1.stop(Lifecycles.java:55) at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.stop(Lifecycle.java:75) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:185) at org.neo4j.kernel.NeoStoreDataSource.stop(NeoStoreDataSource.java:1160) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.impl.transaction.state.DataSourceManager.stop(DataSourceManager.java:137) at org.neo4j.kernel.ha.cluster.SwitchToSlave.stopServicesAndHandleBranchedStore(SwitchToSlave.java:521) at org.neo4j.kernel.ha.cluster.SwitchToSlave.checkDataConsistency(SwitchToSlave.java:357) at org.neo4j.kernel.ha.cluster.SwitchToSlave.executeConsistencyChecks(SwitchToSlave.java:316) at org.neo4j.kernel.ha.cluster.SwitchToSlave.switchToSlave(SwitchToSlave.java:219) at org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher$2.run(HighAvailabilityModeSwitcher.java:328) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) at org.neo4j.helpers.NamedThreadFactory$2.run(NamedThreadFactory.java:99) 2015-10-19 15:10:27.102+0000 ERROR [org.neo4j]: Lifecycle exception Failed to transition component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556' from STOPPED to SHUTTING_DOWN. Please see attached cause exception org.neo4j.kernel.lifecycle.LifecycleException: Failed to transition component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556' from STOPPED to SHUTTING_DOWN. Please see attached cause exception at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:559) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:200) at org.neo4j.kernel.NeoStoreDataSource.stop(NeoStoreDataSource.java:1160) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.impl.transaction.state.DataSourceManager.stop(DataSourceManager.java:137) at org.neo4j.kernel.ha.cluster.SwitchToSlave.stopServicesAndHandleBranchedStore(SwitchToSlave.java:521) at org.neo4j.kernel.ha.cluster.SwitchToSlave.checkDataConsistency(SwitchToSlave.java:357) at org.neo4j.kernel.ha.cluster.SwitchToSlave.executeConsistencyChecks(SwitchToSlave.java:316) at org.neo4j.kernel.ha.cluster.SwitchToSlave.switchToSlave(SwitchToSlave.java:219) at org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher$2.run(HighAvailabilityModeSwitcher.java:328) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) at org.neo4j.helpers.NamedThreadFactory$2.run(NamedThreadFactory.java:99) Caused by: java.lang.AbstractMethodError: org.neo4j.gis.spatial.indexprovider.SpatialIndexImplementation.shutdown()V at org.neo4j.kernel.lifecycle.Lifecycles$1.shutdown(Lifecycles.java:64) at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.shutdown(Lifecycle.java:81) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:555) ... 18 more 2015-10-19 15:10:27.103+0000 ERROR [org.neo4j]: Chained lifecycle exception Component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556' failed to stop. Please see attached cause exception. org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556' failed to stop. Please see attached cause exception. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:532) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:185) at org.neo4j.kernel.NeoStoreDataSource.stop(NeoStoreDataSource.java:1160) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.impl.transaction.state.DataSourceManager.stop(DataSourceManager.java:137) at org.neo4j.kernel.ha.cluster.SwitchToSlave.stopServicesAndHandleBranchedStore(SwitchToSlave.java:521) at org.neo4j.kernel.ha.cluster.SwitchToSlave.checkDataConsistency(SwitchToSlave.java:357) at org.neo4j.kernel.ha.cluster.SwitchToSlave.executeConsistencyChecks(SwitchToSlave.java:316) at org.neo4j.kernel.ha.cluster.SwitchToSlave.switchToSlave(SwitchToSlave.java:219) at org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher$2.run(HighAvailabilityModeSwitcher.java:328) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) at org.neo4j.helpers.NamedThreadFactory$2.run(NamedThreadFactory.java:99) Caused by: java.lang.AbstractMethodError: org.neo4j.gis.spatial.indexprovider.SpatialIndexImplementation.stop()V at org.neo4j.kernel.lifecycle.Lifecycles$1.stop(Lifecycles.java:55) at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.stop(Lifecycle.java:75) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) ... 19 more

Neo4j Spatial 是否支持跨实例复制?或者更具体地说,将空间索引恢复到首次加入集群的新空实例?

0 投票
0 回答
61 浏览

neo4j - Neo4j 空间搜索窗口性能

我正在尝试可视化大量空间图数据,但是当用户在地图上平移时,具有约 100k 节点/边的初步结果看起来不够快,无法进行查询和渲染。

在我的 Neo4j 空间索引层(简单点层)上进行以下空间查询,查询大约需要 2-10 秒。

我的实际数据大约是 5000 万个节点/边。我可以做些什么来从具有大量节点/边缘的 Neo4j 空间中获得响应式(例如不到 1 秒)查询性能?

我正在使用 Neo4j 2.3.0 和 Neo4j Spatial 0.15-neo4j-2.2.3

0 投票
1 回答
133 浏览

neo4j - Neo4j 空间 0.14-neo4j-2.2.3 geotools 依赖问题

我正在尝试将 neo4j-spatial-0.14-neo4j-2.2.3 与 neo4j 2.2.5 一起使用,并且在创建 SpatialDatabaseService 时遇到以下问题。

这是堆栈跟踪。显然它看起来像一个版本兼容性问题。

问题似乎出在 gt-metadata jar 上。我没有将它直接包含在我的 POM 中。它是通过 neo4j-spatial 添加的依赖项。

任何专家都可以建议 neo4j-spatial 的兼容版本吗?

谢谢