ST_filterGreaterThan
Updated at:
Filters the pcpoint objects in a pcpatch object by an attribute dimension value, returning a new pcpatch that contains only the points whose dimension value exceeds the specified threshold.
Syntax
pcpatch ST_filterGreaterThan(pcpatch pc, text dimname, float8 value);Parameters
| Parameter | Type | Description |
|---|---|---|
pc | pcpatch | The pcpatch object to filter. |
dimname | text | The name of the attribute dimension to evaluate. |
value | float8 | The threshold value. Only points with a dimension value strictly greater than this threshold are included in the result. |
Examples
The following query filters points in the patch with id = 7, keeping only those whose y dimension exceeds 45.57.
SELECT ST_AsText(ST_FilterGreaterThan(pa, 'y', 45.57)) FROM patches WHERE id = 7;Result:
{"pcid":1,"pts":[[-126.42,45.58,58,5],[-126.41,45.59,59,5]]}The original patch contained points with y values at or below 45.57. Those are excluded, and the two points with y = 45.58 and y = 45.59 are returned in the new pcpatch.
Is this page helpful?