Description | The |
Syntax | GEO_DISTANCE( |
Output | number |
Variables
latitude1
: The latitude of the first point.longitude1
: The longitude of the first point.latitude2
: The latitude of the second point.longitude2
: The longitude of the second point.unit
(optional): The distance metric of the calculation. Values can be either 'km' or 'mi'. Default is 'km'.
Example
GEO_DISTANCE(`Lat1`, `Long1`, `Lat2`, `Long2`)
Lat1 | Long1 | Lat2 | Long2 | GEO_DISTANCE |
34.0309 | -118.263 | 34.0711 | -118.225 | 5.71207 |
34.0416 | -118.247 | 34.0711 | -118.225 | 3.851022 |
34.0936 | -118.276 | 34.0711 | -118.225 | 5.321648 |
34.0803 | -118.242 | 34.0711 | -118.225 | 1.88576 |
34.0312 | -118.237 | 34.0711 | -118.225 | 4.576836 |