Skip to main content

proximity (Stream Processor)

Determines if the specified object or location is within the radius of another object. Returns false when the object moves out of the specified radius.

Syntax

<BOOL> geo:proximity(<STRING> id, <DOUBLE> longitude, <DOUBLE> latitude, <STRING> geo.json.geometry.fence, <DOUBLE> radius)

Query Parameters

NameDescriptionPossible Data TypesOptionalDynamic
idID of the specified object.STRINGNoNo
longitudeLongitude of the geo location.DOUBLENoNo
latitudeLatitude of the geo location.DOUBLENoNo
geo.json.geometry.fenceString that contains geometry type and coordinates for a GeoJSON geometry fence.STRINGNoNo
radiusProximity distance (radial).DOUBLENoNo

Example

geo:proximity(1, 0, 0, 110574.61087757687)

This example returns true because the coordinates are within the given radius.