You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this query below I try to see if polygon 1 intersects polygon 2 match (geoc:GeoCollection {id: "1234"})-[:HAS_ELEMENT]->(s:Shell) match (geoc)-[:HAS_ELEMENT]->()-[:HAS_ELEMENT]->(h:Hole) where not ((s)-[:HAS_ELEMENT]->(h)) WITH s.polygon as shell, h.polygon as hole return shell , hole , spatial.algo.intersection(hole,shell) as intersects , spatial.algo.intersection.sweepline(hole,shell) as intersectsSweep , spatial.algo.area(shell) as shellArea , spatial.algo.area(hole) as holeArea
In this example (just plain 2d) the shell is within the hole. the result of this call is empty:
this is the input:
shell polygon:
[point({srid:7203, x:6, y:5})
,point({srid:7203, x:9, y:5})
,point({srid:7203, x:8, y:10})
,point({srid:7203, x:6, y:5})
]
In this query below I try to see if polygon 1 intersects polygon 2
match (geoc:GeoCollection {id: "1234"})-[:HAS_ELEMENT]->(s:Shell) match (geoc)-[:HAS_ELEMENT]->()-[:HAS_ELEMENT]->(h:Hole) where not ((s)-[:HAS_ELEMENT]->(h)) WITH s.polygon as shell, h.polygon as hole return shell , hole , spatial.algo.intersection(hole,shell) as intersects , spatial.algo.intersection.sweepline(hole,shell) as intersectsSweep , spatial.algo.area(shell) as shellArea , spatial.algo.area(hole) as holeArea
In this example (just plain 2d) the shell is within the hole. the result of this call is empty:
this is the input:
shell polygon:
[point({srid:7203, x:6, y:5})
,point({srid:7203, x:9, y:5})
,point({srid:7203, x:8, y:10})
,point({srid:7203, x:6, y:5})
]
hole polygon:
[point({srid:7203, x:4, y:3})
,point({srid:7203, x:11, y:3})
,point({srid:7203, x:11, y:12})
,point({srid:7203, x:5, y:12})
,point({srid:7203, x:4, y:3})
]
background I want to find shell's which fit in a hole of another polygon...
The text was updated successfully, but these errors were encountered: