neo4j-spatial

org.neo4j.kernel.GraphDatabaseQueryService No dependency satisfies interface

南楼画角 提交于 2019-12-10 18:08:25
问题 I am just writing a simple program where I am uploading my GTFS files to Neo4j Spatial. I believe it's some configuration error or some problem with Neo4j-spatial libraries, which is why I am not uploading my code which is quite basic as specified here: I imported all the required libraries of neo4j: <dependency> <groupId>org.neo4j</groupId> <artifactId>neo4j</artifactId> <version>3.2.8</version> </dependency> <dependency> <artifactId>neo4j-spatial</artifactId> <groupId>org.neo4j</groupId>

Using Neo4J Spatial Cypher queries with other conditions

懵懂的女人 提交于 2019-12-08 02:22:01
问题 I am using Neo4J Spatial cypher queries to find users in a 25KM radius, and among them find those who have the same hometown as I do. I used the following query: START u=node(5),node=node:geom('withinDistance:[17.3,78.3,25.0]') MATCH (u)-[:hometown]->()<-[:hometown]-(o) RETURN o; This query doesn't work the way I intended. It identifies all user nodes in the given radius and executes the same MATCH query, which is specific to user with node ID 5, for each of those nodes. Splitting this

Using Neo4J Spatial Cypher queries with other conditions

六眼飞鱼酱① 提交于 2019-12-06 12:21:09
I am using Neo4J Spatial cypher queries to find users in a 25KM radius, and among them find those who have the same hometown as I do. I used the following query: START u=node(5),node=node:geom('withinDistance:[17.3,78.3,25.0]') MATCH (u)-[:hometown]->()<-[:hometown]-(o) RETURN o; This query doesn't work the way I intended. It identifies all user nodes in the given radius and executes the same MATCH query, which is specific to user with node ID 5, for each of those nodes. Splitting this problem into two parts, this is what I would like to combine. First part, identify all users in a 25 KM

How do I create a spacial index in neo4j using only cypher?

老子叫甜甜 提交于 2019-12-04 05:26:21
问题 I want to play with neo4j and spacial indexes. I can't find any documentation that demonstrates how to do this through cypher, only through the REST API. Is it possibly to create spacial indexes through Cypher, say in the neo4j web console? 回答1: There is currently no way to create a spatial index using Cypher. You can either use java API or a REST call, see docs at http://neo4j-contrib.github.io/spatial/#rest-api-create-a-spatial-index for details. Since Neo4j browser allows to send HTTP POST

How to add list of nodes to a SpatialLayer

老子叫甜甜 提交于 2019-12-04 05:10:54
问题 I'm new to Neo4j and cypher. I have many nodes, that i want to add to a spatial layer. This is what i tried with cypher : Creating Nodes from a csv file load csv with headers from "file:///green_tripdata_2015-02.csv" as line create(pl:pickup_location{lat:line.Pickup_latitude,lon:line.Pickup_longitude}); Spatial Layer Creation CALL spatial.addPointLayer('nyc'); and then : MATCH (pl:pickup_location) WITH collect(pl) AS pickup CALL spatial.addNodes('nyc',pickup) YIELD count RETURN count and i

How to add list of nodes to a SpatialLayer

徘徊边缘 提交于 2019-12-02 07:53:33
I'm new to Neo4j and cypher. I have many nodes, that i want to add to a spatial layer. This is what i tried with cypher : Creating Nodes from a csv file load csv with headers from "file:///green_tripdata_2015-02.csv" as line create(pl:pickup_location{lat:line.Pickup_latitude,lon:line.Pickup_longitude}); Spatial Layer Creation CALL spatial.addPointLayer('nyc'); and then : MATCH (pl:pickup_location) WITH collect(pl) AS pickup CALL spatial.addNodes('nyc',pickup) YIELD count RETURN count and i get this error : Neo.ClientError.Statement.PropertyNotFound: NODE[397] has no property with propertyKeyId

neo4j-spatial: What is the official way to delete a node from a spatial index?

一曲冷凌霜 提交于 2019-12-02 06:36:02
问题 My question is most certainly a duplicate of Neo4j Spatial - How To Delete A Node, but it has not yet been solved. To my understanding removing a node from a spatial index is currently not implemented (not documented) within the neo4j-spatial-plugin. Now my questions would be: "How do I do this myself?" I can see all the nodes of the index, but how do I query that very node that refers to the node I want to delete? And furthermore: May I just delete that node from the index without harming

Getting the max record with different values using cypher

二次信任 提交于 2019-12-02 05:41:49
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: MATCH (asset:Asset{name:'Asset Name'})-[]-(ara:AssetRiskAssessment) WITH asset, ara CALL spatial

neo4j-spatial: What is the official way to delete a node from a spatial index?

ⅰ亾dé卋堺 提交于 2019-12-02 05:12:49
My question is most certainly a duplicate of Neo4j Spatial - How To Delete A Node , but it has not yet been solved. To my understanding removing a node from a spatial index is currently not implemented (not documented) within the neo4j-spatial-plugin. Now my questions would be: "How do I do this myself?" I can see all the nodes of the index, but how do I query that very node that refers to the node I want to delete? And furthermore: May I just delete that node from the index without harming anything else? Thanks :-) Mit Bhatt Yes. You are correct. As this link says,this is a known issue and

Error in creating spatial Index using Spring Data neo4j

眉间皱痕 提交于 2019-12-01 22:08:07
问题 I'm working on Neo4j Spring Data project and wants to perform some spatial related operation on nodes. Entity Class @NodeEntity public class User { @GraphId Long id; private String fname; private String lname; private String uname; private String pwd; private Double latitude, longitude; @Indexed(indexType = IndexType.POINT, indexName = "geom") private String wkt; public void setLocation(Double lon, Double lat) { this.wkt = String.format("POINT( %.2f %.2f )", lon, lat); } @RelatedTo(type =