Reference material for ST_DISTANCE function
ST_DISTANCE
function calculates the shortest distance, measured as a geodesic arc between two GEOGRAPHY
objects, measured in meters. It models the earth as a perfect sphere with a fixed radius of 6,371,008 meters.
If either input is empty, ST_DISTANCE
will return NULL
.
Parameter | Description | Supported input types |
---|---|---|
<geo1> | The first GEOGRAPHY object to calculate the distance between. | GEOGRAPHY |
<geo2> | The second GEOGRAPHY object to calculate the distance between. | GEOGRAPHY |
ST_DISTANCE
returns a value of type DOUBLE PRECISION
.
result (DOUBLE PRECISION) |
---|
5574863.932096738 |