distance

Returns the distance between two geometries.

This is the smallest distance between any point on the first geometry and any point on the second geometry. If the two geometries intersect, the distance will be 0.

Parameter 1 - any geometry.

Parameter 2 - another geometry.

Returns: the minimum distance between the two geometries in dataset units.

Note: This function does not currently fully support 3D geometries. Any 3D geometries will be projected down to 2 dimensions