Operands of different dimensions read the dimensions both of them have, see the section called “Operands of Different Dimensions”.
Return the smallest distance ever
{geo,cbuffer,tcbuffer,stbox} |=| {geo,cbuffer,tcbuffer,stbox} → float
The operator |=| that can be used for doing nearest neightbor searches using a GiST or an SP-GiST index (see the section called “Indexing”).
SELECT tcbuffer '[Cbuffer(Point(2 2), 0.3)@2001-01-01, Cbuffer(Point(2 2), 0.7)@2001-01-02]' |=| geometry 'Linestring(50 50,55 55)'; -- 67.18225099390857 SELECT tcbuffer '[Cbuffer(Point(2 2), 0.3)@2001-01-01, Cbuffer(Point(2 2), 0.7)@2001-01-02]' |=| cbuffer 'Cbuffer(Point(1 1), 0.5)'; -- 0.2142135623730952
Return the instant of the first temporal circular buffer at which the two arguments are at the nearest distance
nearestApproachInstant({geo,cbuffer,tcbuffer},{geo,cbuffer,tcbuffer}) → tcbuffer
SELECT asText(nearestApproachInstant(tcbuffer '[Cbuffer(Point(2 2), 0.3)@2001-01-01, Cbuffer(Point(2 2), 0.7)@2001-01-02]', geometry 'Linestring(50 50,55 55)')); -- Cbuffer(POINT(2 2),0.7)@2001-01-02 SELECT asText(nearestApproachInstant(tcbuffer '[Cbuffer(Point(2 2), 0.3)@2001-01-01, Cbuffer(Point(2 2), 0.7)@2001-01-02]', cbuffer 'Cbuffer(Point(1 1), 0.5)')); -- Cbuffer(POINT(2 2),0.7)@2001-01-02
Return the line connecting the nearest approach point between the two arguments
shortestLine({geo,cbuffer,tcbuffer},{geo,cbuffer,tcbuffer}) → geometry
The function will only return the first line that it finds if there are more than one
SELECT ST_AsText(shortestLine(tcbuffer '[Cbuffer(Point(2 2), 0.3)@2001-01-01, Cbuffer(Point(2 2), 0.7)@2001-01-02]', geometry 'Linestring(50 50,55 55)')); -- LINESTRING(2.494974746830583 2.494974746830583,50 50) SELECT ST_AsText(shortestLine(tcbuffer '[Cbuffer(Point(2 2), 0.3)@2001-01-01, Cbuffer(Point(2 2), 0.7)@2001-01-02]', cbuffer 'Cbuffer(Point(1 1), 0.5)')); -- LINESTRING(1.505025253169417 1.505025253169417,1.353553390593274 1.353553390593274)
Return the temporal distance
{geo,cbuffer} <-> tcbuffer → tfloat
tcbuffer <-> {geo,cbuffer,tcbuffer} → tfloat
SELECT tcbuffer '[Cbuffer(Point(1 1), 0.3)@2001-01-01, Cbuffer(Point(1 1), 0.5)@2001-01-03]' <-> cbuffer 'Cbuffer(Point(1 1), 0.2)'; -- [0@2001-01-01, 0@2001-01-03] SELECT tcbuffer '[Cbuffer(Point(1 1), 0.3)@2001-01-01, Cbuffer(Point(1 1), 0.5)@2001-01-03]' <-> geometry 'Point(50 50)'; -- [68.99646455628165@2001-01-01, 68.79646455628166@2001-01-03] SELECT tcbuffer '[Cbuffer(Point(1 1), 0.3)@2001-01-01, Cbuffer(Point(1 1), 0.5)@2001-01-03]' <-> tcbuffer '[Cbuffer(Point(1 1), 0.3)@2001-01-02, Cbuffer(Point(1 1), 0.5)@2001-01-04]'; -- [0@2001-01-02, 0@2001-01-03]
Return the minimum spatial distance between two sets of temporal circular buffers, ignoring time
minDistance(tcbuffer[],tcbuffer[]) → float
The distance is measured between the traversed areas with time discarded, equal to ST_Distance of the traversed area of each argument, and the result is the minimum over every pair drawn from the two sets. Two values whose discs sweep the same region at different times are therefore at distance zero. The time-synchronous quantity, which compares two arguments only at the instants they share, is |=|. A single pair is the one-element case.
SELECT minDistance(ARRAY[tcbuffer '[Cbuffer(Point(0 0),1)@2001-01-01, Cbuffer(Point(2 0),1)@2001-01-02]'], ARRAY[tcbuffer '[Cbuffer(Point(0 5),0.5)@2001-01-03, Cbuffer(Point(2 5),0.5)@2001-01-04]']); -- 3.5