Fork me on GitHub

ST_Collect

Signatures

MULTIPOINT         ST_Collect(POINT geom);
MULTILINESTRING    ST_Collect(LINESTRING geom);
MULTIPOLYGON       ST_Collect(POLYGON geom);
GEOMETRYCOLLECTION ST_Collect(GEOMETRY geom);

Description

This aggregate function constructs a GEOMETRYCOLLECTION from a column of mixed dimension Geometries.

If there is only POINTs in the column of Geometries, a MULTIPOINT is returned. Same process with LINESTRINGs and POLYGONs.

This function is an alias for ST_Accum. To know more about this function, please consult this page.
See also