neo4j-spatial

Add new Geometries to an osm file in Neo4J

▼魔方 西西 提交于 2021-02-11 11:46:13
问题 Hi im trying to add some restaurants to an importet .osm file. So I want to save the restaurants as new Point Geometries and connect them at the right point with the existing osm graph. Later I want to read out all resturants and find the nearest restaurant from any given point. So should I add the restaurants in a new layer? And is there an easy way to connect the restaurants with the graph at the right geogaphical point?? Thanks for answers Greetings 回答1: There are two options: Edit the

Add new Geometries to an osm file in Neo4J

谁都会走 提交于 2021-02-11 11:46:06
问题 Hi im trying to add some restaurants to an importet .osm file. So I want to save the restaurants as new Point Geometries and connect them at the right point with the existing osm graph. Later I want to read out all resturants and find the nearest restaurant from any given point. So should I add the restaurants in a new layer? And is there an easy way to connect the restaurants with the graph at the right geogaphical point?? Thanks for answers Greetings 回答1: There are two options: Edit the

neo4j spatial contain search

醉酒当歌 提交于 2020-01-09 10:32:37
问题 i'm trying to develop a web service able to give me back the name of the administrative area that contains a given gps position. I have already developed a java application able to insert some polygons (administrative areas of my country) in neo4j using spatial plugin and Java API. Then, giving a gps position, i'm able to get the name of the polygon that contains it. Now i'm trying to do the same using REST API of Neo4j (instead of java api) but i'm not able to find any example. So my

Adding millions of nodes to neo4j spatial layer using cypher and apoc

半世苍凉 提交于 2020-01-04 06:50:28
问题 I have a data set of 3.8million nodes and I'm trying to load all of these into Neo4j spatial. The nodes are going into a simple point layer, so have the required latitude and longitude fields. I've tried: MATCH (d:pointnode) WITH collect(d) as pn CALL spatial.addNodes("point_geom", pn) yield count return count But this just keeps spinning without anything happening. I've also tried (I've been running the next query all on one line, but I've just split it up for ease of reading): CALL apoc

Adding millions of nodes to neo4j spatial layer using cypher and apoc

ⅰ亾dé卋堺 提交于 2020-01-04 06:50:27
问题 I have a data set of 3.8million nodes and I'm trying to load all of these into Neo4j spatial. The nodes are going into a simple point layer, so have the required latitude and longitude fields. I've tried: MATCH (d:pointnode) WITH collect(d) as pn CALL spatial.addNodes("point_geom", pn) yield count return count But this just keeps spinning without anything happening. I've also tried (I've been running the next query all on one line, but I've just split it up for ease of reading): CALL apoc

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

六月ゝ 毕业季﹏ 提交于 2020-01-04 05:51:07
问题 I'm working on a Grails app over Neo4J which I'd like to also export as a GIS database. Looking at the examples for how to use neo4j in GeoServer/uDig it appears that the Spatial integration is only via embedded neo4j databases. Does anyone know whether it's possible to set things up so that my Neo4J is available over REST, so that I can interface to it from a variety of places? At first sight it appears that it ought to be possible: // Works with this embedded database //def graphDb = new

Getting the max record with different values using cypher

三世轮回 提交于 2019-12-31 04:19:45
问题 I have a graph with spatial data using the spatial plugin. This graph has "Threat Zones" (Polygons) which can be on top of the other so they also have a z-index property. Each "Threat Zone" is attached to 1 to N threat scenarios, sometimes multiple "Threat Zones" are attached to the same threat scenario, with different properties. I'm trying to get the top threat zone for each threat scenario, based on the z-index, for a specific location. This is my current query which is almost perfect:

Neo4j Spatial: can't run spatial

↘锁芯ラ 提交于 2019-12-24 13:22:04
问题 I have been trying to work with Neo4j Spatial for my project, but I can't make it work. With limited documentation and examples I figured out how to load OSM map to the database. But to check if it is loaded, I am trying to execute a spatial query. While trying to run my code I get this error: import.java:69: error: cannot access GremlinGroovyPipeline .startIntersectSearch(layer, bbox) ^ class file for com.tinkerpop.gremlin.groovy.GremlinGroovyPipeline not found I understand what's wrong (it

Neo4j-spatial importing OSM missmatching vertices found

眉间皱痕 提交于 2019-12-24 12:39:04
问题 This is my method to import osmdata: private void importOSM(String osm){ OSMImporter importer = new OSMImporter(osm); importer.setCharset(Charset.forName("UTF-8")); try{ importer.importFile(graphDb,osm,false,5000,true); importer.reIndex(graphDb,10000); }catch(Exception e){ System.out.println("__________Import Error!! "+e.getMessage()); e.printStackTrace(); } } When I import an osmdata I get this: Mismatching vertices size for Polygon:Node[1799298]: 1 != 2 Mismatching vertices size for

Adding 5834580 of node to Spatial Layer

不羁的心 提交于 2019-12-24 07:24:08
问题 I am trying to create an R-TREE of 5834580 of nodes. I found in this question a similair problem and i tried it's solution, so this is my code : call apoc.periodic.commit("MATCH (pl:pickup_location) WITH collect(pl) AS pickup CALL spatial.addNodes('nyc',pickup) YIELD count RETURN count",{limit:1000}) however, since yesterday the computer didn't finish loading the result. today, i tried the second answer with iterate : CALL apoc.periodic.iterate( "MATCH (pl:pickup_location) RETURN pl", "CALL