spatial.closest
Procedure
Finds all geometry nodes in the layer within the distance to the given coordinate
Signature
spatial.closest(layerName :: STRING, coordinate :: ANY, distanceInKm :: FLOAT) :: (node :: NODE)
Input parameters
| Name | Type | Default | Description |
|---|---|---|---|
layerName |
STRING |
null |
The name of the layer |
coordinate |
ANY |
null |
A valid value for the coordinate is a:
|
distanceInKm |
FLOAT |
null |
The distance in kilometers within which to search for geometries |
Examples
Add multiple WKT geometries to a layer
CALL spatial.addLayer('geom','geohash','lon:lat')
CALL spatial.addWKTs('geom',[ "POINT (15.2 60.1)", "POINT (25.2 30.1)" ])
| node |
|---|
|
|
CALL spatial.closest('geom',{lon:15.0, lat:60.0}, 1.0)
| node |
|---|
|