Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-22-2021 12:06 AM
dockerized neo4j@4.2.3 using node driver
Hi,
I'm running into a weird issue.
I have a list of points (hundreds) and a list of polygons (less than 10).
I'm trying to receive a list of points intersecting with one or more polygons.
During initialization I'm creating the polygons layer
CALL spatial.addWKTLayer("polygon-layer", "wkt")
CALL spatial.addWKT("polygon-layer", ...)
First try:
I have created a list of CALL spatial.intersects("polygon-layer", "POINT(... ...)")
queries and ran them through node's Promise.all
It worked great and this is my fallback for now
Second try:
In order to improve performance I have tried running all queries together using apoc.cypher.parallel
The issue - after initializing the service, it doesnt work untill I run a different query
The following query :
CALL apoc.cypher.parallel('CALL spatial.intersects("polygon-layer", $point) YIELD node RETURN node',{ point: ["POINT(35.71880578994751 31.74001693725586)","POINT(30.867290496826172 35.14275312423706)"] },"point")
Yields
Failed to invoke procedure `apoc.cypher.parallel`: Caused by: org.neo4j.graphdb.security.AuthorizationViolationException: Set property for property 'totalGeometryCount' is not allowed for user 'neo4j' with FULL overridden by READ overridden by READ.
After running
CALL spatial.intersects("polygon-layer", "POINT(35.71880578994751 31.74001693725586)")
which works great
The EXACT query above which didnt work before
CALL apoc.cypher.parallel('CALL spatial.intersects("polygon-layer", $point) YIELD node RETURN node',{ point: ["POINT(35.71880578994751 31.74001693725586)","POINT(30.867290496826172 35.14275312423706)"] },"point")
Now works and yields the result
{
"node": {
"identity": 4,
"labels": [],
"properties": {
"wkt": "POLYGON ((35.5225 32.0438, 35.8108 32.0238, 35.7 31.372, 35.4 31.3775, 35.5225 32.0438))",
"gtype": 3,
"bbox": [
35.4,
31.372,
35.8108,
32.0438
]
}
}
}
which is what im expecting.
Any clues ?
All the sessions of the conference are now available online