Skip to main content
Calculate the haversine/great-circle distance between two geometry columns using a given radius. SQL reference: ST_DistanceSphere

Signature

Parameters

ColumnOrName
required
Geometry column to use in the calculation.
ColumnOrName
required
Other geometry column to use in the calculation.
Optional[Union[ColumnOrName, float]]
default:"6371008.0"
Radius of the sphere, defaults to 6371008.0

Returns

Column
Two-dimensional haversine/great-circle distance between a and b as a double column. Unit is meter.