spatial.bbox
Procedure
Finds all geometry nodes in the given layer within the lower left and upper right coordinates of a box. A valid value for the coordinate is a:
-
JTS Coordinate
-
Neo4j Coordinate
-
Neo4j Point
-
Map with keys 'latitude' and 'longitude'
-
Map with keys 'lat' and 'lon'"
-
Node or Relationship with properties 'latitude' and 'longitude'
-
Node or Relationship with properties 'lat' and 'lon'
Input parameters
Name | Type | Default | Description |
---|---|---|---|
layerName |
STRING |
null |
The name of the layer |
min |
ANY |
null |
The lower left coordinate |
max |
ANY |
null |
The upper right coordinate |
Examples
Find geometries in a bounding box
CALL spatial.addPointLayer('geom')
CREATE (n:Node {id: 1, latitude:60.1,longitude:15.2})
WITH n CALL spatial.addNode('geom',n) YIELD node
RETURN node
Find node within bounding box
CALL spatial.bbox('geom',{lon:15.0,lat:60.0}, {lon:15.3, lat:61.0})
node |
---|
|