Distance Operations

Operands of different dimensions read the dimensions both of them have, see the section called “Operands of Different Dimensions”.

tDistance returns the distance between two values at each instant, as a temporal float, and nearestApproachDistance the smallest of these distances. distance and its set, span and span set forms return the distance between two values, and th3GridDistance the grid distance between two temporal H3 cells at each instant, as a temporal big integer.

tquadbinGridDistance and ts2GridDistance return the grid distance between two temporal QUADBIN or S2 cells in the same way.

CategoryOperatorPortable function
Distance<->tDistance(a, b)
 |=|nearestApproachDistance(a, b)
Distance (base / set / span / span set)<->distance / setDistance / spanDistance / spansetDistance (a, b)
Grid distance (cell index)<->th3GridDistance(a, b)
 <->tquadbinGridDistance(a, b)
 <->ts2GridDistance(a, b)