ST_FilterByM
Name
ST_FilterByM — Filters vertex points based on their m-value
Synopsis
geometry
ST_FilterByM
(
geometry
geom
, double precision
min
, double precision
max = null
, boolean
returnM = false
)
;
Description
Filters away vertex points based on their m-value. Returns a geometry with only vertex points that have a m-value larger or equal to the min value and smaller or equal to the max value. If max-value argument is left out only min value is considered. If fourth argument is left out the m-value will not be in the resulting geometry. If resulting geometry have too few vertex points left for its geometry type an empty geometry will be returned. In a geometry collection geometries without enough points will just be left out silently.
This function is mainly intended to be used in conjunction with ST_SetEffectiveArea. ST_EffectiveArea sets the effective area of a vertex in its m-value. With ST_FilterByM it then is possible to get a simplified version of the geometry without any calculations, just by filtering
There is a difference in what ST_SimplifyVW returns when not enough points meet the criteria compared to ST_FilterByM. ST_SimplifyVW returns the geometry with enough points while ST_FilterByM returns an empty geometry |
Note that the retuned geometry might be invalid |
This function returns all dimensions, also the z and m-value |
Availability: 2.5.0