ST_sort

Updated at:

Sorts all pcpoint objects in a pcpatch object by one or more attribute dimensions and returns a new pcpatch containing the sorted points.

Syntax

pcpatch ST_Sort(pcpatch pc, text[] dimnames);

Parameters

ParameterDescription
pcThe pcpatch object to sort.
dimnamesThe attribute dimensions to sort by, specified as an array of dimension names.

Examples

Sort the pa column in the patches table by the y and x dimensions:

UPDATE patches SET pa = ST_Sort(pa, Array['y', 'x']);

Output:

(1 rows)