spatial.getLayerBoundingBox
Procedure
Returns the bounding box of the layer
Signature
spatial.getLayerBoundingBox(name :: STRING) :: (minX :: FLOAT, minY :: FLOAT, maxX :: FLOAT, maxY :: FLOAT, crs :: STRING)
Output parameters
Name | Type | Description |
---|---|---|
minX |
FLOAT |
|
minY |
FLOAT |
|
maxX |
FLOAT |
|
maxY |
FLOAT |
|
crs |
STRING |
The CRS in geotools format, e.g. WGS84(DD) |
Examples
Get the bounding box of a layer
CALL spatial.addPointLayer('bbox_layer', 'rtree', 'wgs84') YIELD node
node |
---|
|
Add points at opposite corners
CREATE (n1:Point {latitude: 60.0, longitude: 15.0, name: 'southwest'})
CREATE (n2:Point {latitude: 61.0, longitude: 16.0, name: 'northeast'})
WITH n1, n2
CALL spatial.addNode('bbox_layer', n1) YIELD node as added1
WITH n2, added1
CALL spatial.addNode('bbox_layer', n2) YIELD node as added2
RETURN added1, added2
CALL spatial.getLayerBoundingBox('bbox_layer') YIELD minX, minY, maxX, maxY, crs
crs | maxX | maxY | minX | minY |
---|---|---|---|---|
WGS84(DD)a |
[source] ---- 16.0 ---- |
|
|
|