Synopsis

Description

Sets the effective area for each vertex, using the Visvalingam-Whyatt algorithm.
The effective area is stored as the M-value of the vertex.
If the optional "theshold" parameter is used, a simplified geometry will be returned, containing only vertices with an effective area
greater than or equal to the threshold value.

This function can be used for server-side simplification when a threshold is specified. Another option is to use a threshold value of zero.
In this case, the full geometry will be returned with effective areas as M-values, which can be used by the client to simplify very quickly.

Will actually do something only with
(multi)lines and (multi)polygons but you can safely call it with
any kind of geometry. Since simplification occurs on a
object-by-object basis you can also feed a GeometryCollection to
this function.

Note that returned geometry might lose its
simplicity (see ST_IsSimple)