A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/functions/st_dwithin below:

ST_DWITHIN | Snowflake Documentation

Reference Function and stored procedure reference Geospatial ST_DWITHIN
Categories:

Geospatial functions

ST_DWITHIN

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> )

Copy

Arguments
geography_expression_1

The argument must be an expression of type GEOGRAPHY.

geography_expression_2

The argument must be an expression of type GEOGRAPHY.

distance_in_meters

The argument must be an expression of type REAL. The distance is in meters.

Returns

Returns a BOOLEAN.

Usage notes Examples

This returns TRUE because the distance in meters between two points 1 degree apart along the equator is less than 150,000 meters:

SELECT ST_DWITHIN (ST_MAKEPOINT(0, 0), ST_MAKEPOINT(1, 0), 150000);
+-------------------------------------------------------------+
| ST_DWITHIN (ST_MAKEPOINT(0, 0), ST_MAKEPOINT(1, 0), 150000) |
|-------------------------------------------------------------|
| True                                                        |
+-------------------------------------------------------------+

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4