ST_DWITHIN
functionsupportedCore SQL functionsReturns 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
| Name | Required | Description |
|---|---|---|
geography_expression_1 | required | The argument must be an expression of type GEOGRAPHY. |
geography_expression_2 | required | The argument must be an expression of type GEOGRAPHY. |
distance_in_meters | required | The argument must be an expression of type REAL. The distance is in meters. |
Returns
Returns a BOOLEAN.
Usage notes
- Returns NULL if any input is NULL.