Distance Operations

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

The temporal distance operator, denoted <->, computes the distance at each instant of the intersection of the temporal extents of their arguments and results in a temporal float. Computing temporal distance is useful in many mobility applications. For example, a moving cluster (also known as convoy or flock) is defined as a set of objects that move close to each other for a long time interval. This requires to compute temporal distance between two moving objects.

A temporal point with linear interpolation takes as its other argument a temporal point, a point, or, when it is planar and 2D, a geometry of any other type. A temporal point of any other interpolation, an instant included, has a value at its instants only, and takes any geometry or geography, its distance at each instant being the distance of the point to it. Notice that the temporal types only consider linear interpolation between values, while the distance is a root of a quadratic function. Therefore, the temporal distance operator gives a linear approximation of the actual distance value for temporal sequence points. In this case, the arguments are synchronized in the time dimension, and for each of the composing line segments of the arguments, the spatial distance between the start point, the end point, and the nearest point of approach is computed, as shown in the examples below.