The Distance()
function returns the geographical distance (in kilometers - as the crow flies) between two points of (latitude
,longitude
).
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns the geographical distance (in kilometers - in a straight line) between two geographical points.
Returns Invalid expression
if one of the parameter values is not a valid number.
Name | Type | Required | Description |
---|---|---|---|
Function call | Result |
---|---|
Distance(52.370216, 4.895168, -37.814, 14496332)
16545.7337
latitude1
numeric
a geographic coordinate that specifies the north–south position of a point on the Earth's surface in decimal degrees.
longtitude1
numeric
a geographic coordinate that specifies the east-west position of a point on the Earth's surface decimal degrees.
latitude2
numeric
a geographic coordinate that specifies the north–south position of a point on the Earth's surface in decimal degrees.
longtitude2
numeric
a geographic coordinate that specifies the east-west position of a point on the Earth's surface decimal degrees.