Distance
Calculates distance between two locations.
Variants
Distance(Location from, Location to)
Calculates distance between two locations on elliptic Earth.
Parameters
- from
- The location value to starting point.
- to
- The location value to ending point.
Returns
Numeric
Remarks
Result is returned in meters.
Examples
Distance(ToLocation(35.658068, 139.751599), ToLocation(41.836944, -87.684722))
returns the distance number 10162000 meters.
Distance(Location from, Location to, Text unit)
Calculates distance between two locations on elliptic Earth.
Parameters
- from
- The location value to starting point.
- to
- The location value to ending point.
- unit
- The result is returned according to the unit provided: "m" for meters, "km" for kilometers or "mi" for miles.
Returns
Numeric
Examples
Distance(ToLocation(35.658068, 139.751599), ToLocation(41.836944, -87.684722), "km")
returns the distance number 10162 kilometers.