earthDistance

Returns the great circle distance between two points on the surface of the Earth.

Function from earthdistance extension, earth_distance(p1, p2) in SQL.