Filters points in a pcpatch by a dimension threshold and returns a new pcpatch containing only the points whose dimension value is strictly greater than the threshold.
Syntax
pcpatch ST_filterGreaterThan(pcpatch pc, text dimname, float8 value);Parameters
| Parameter | Type | Description |
|---|---|---|
pc | pcpatch | The source patch to filter. |
dimname | text | The name of the dimension to filter on. |
value | float8 | The threshold value. Only points with a dimension value strictly greater than this threshold (>) are included in the result. |
Example
Filter all points in patch 7 where the y dimension is greater than 45.57:
SELECT ST_AsText(ST_FilterGreaterThan(pa, 'y', 45.57)) FROM patches WHERE id = 7;Output:
{"pcid":1,"pts":[[-126.42,45.58,58,5],[-126.41,45.59,59,5]]}The result includes only points with y = 45.58 and y = 45.59. The point at exactly y = 45.57 is excluded, confirming that the filter uses a strict greater-than comparison.
该文章对您有帮助吗?