Distance
The Distance function computes the as-the-crow-flies distance between a source and destination identified by latitude and longitude.
1. Syntax
DISTANCE(d0,d1,d2,d3,s0)
2. Input
The Distance function requires the following input series:
- d0 - The latitude of the starting location.
- d1 - The longitude of the starting location.
- d2 - The latitude of the ending location.
- d3 - The longitude of the starting location.
3. Parameters
The Distance function accepts the following parameters:
- s0 - Specifies unit to use for the result. 0 for kilometers, 1 for miles. The default is 0.
4. Output
The Distance function generates the following output:
- The Distance result set, consisting of distances between each pair of coordinates in kilometers or miles as specified above.