ST_DWITHIN

functionsupportedCore SQL functions

docs.snowflake.com ↗

Geospatial functions

Returns TRUE if the minimum great circle distance between two points (two GEOGRAPHY objects) is within the specified distance. Otherwise, returns FALSE. If the parameters are GEOGRAPHY values that are not points (e.g. lines or polygons), this returns TRUE or FALSE based on the minimum great circle distance between the two closest points of the two values. Tip You can use the search optimization service to improve the performance of queries that call this function. For details, see Search optimization service.

Syntax

ST_DWITHIN( <geography_expression_1> , <geography_expression_2> , <distance_in_meters> )

Parameters

NameRequiredDescription
geography_expression_1requiredThe argument must be an expression of type GEOGRAPHY.
geography_expression_2requiredThe argument must be an expression of type GEOGRAPHY.
distance_in_metersrequiredThe argument must be an expression of type REAL. The distance is in meters.

Returns

Returns a BOOLEAN.

Usage notes