Checks whether all pcpoint objects in a pcpatch object are sorted based on the specified attribute dimensions.
Syntax
boolean ST_isSorted(pcpatch pc, text[] dimnames, boolean strict default true);Parameters
| Parameter | Description |
|---|---|
pc | The pcpatch object to check. |
dimnames | The attribute dimensions to sort by, specified as an array of dimension names. |
strict | When true (default), requires strict ordering: no two pcpoint objects can have identical values for the specified attribute dimensions. When false, allows duplicate values. |
Examples
Check whether a patch is sorted along dimensions a and c:
SELECT ST_isSorted(pa, Array['a','c']) FROM patches;Output:
f
(1 rows)The result f (false) means the points in pa are not sorted along dimensions a and c.