ST_Force_Collection — Forces the geometry to be a GEOMETRYCOLLECTION.
geometry ST_Force_Collection(
bytea
Geometry)
;
Forces the geometry to be a GEOMETRYCOLLECTION. The collection classes of geometries (MultiPoint, MultiLineString, Multipolygon) are split into single classes (Point, LineString, Polygon).
2D | 3D | M |
---|---|---|
OGC SFS for SQL. 1.1 (1999) | OGC SFS for SQL. 1.1.0 (2005) | OGC SFS for SQL. 1.2.0 (2006) | SQL-MM Part 3 |
---|---|---|---|
- | - | - | - |
SELECT ST_AsEWKT(ST_Force_Collection(ST_GeomFromEWKT('POINT(0 0 -4)'))); --Result GEOMETRYCOLLECTION (POINT (0 0 -4)) SELECT ST_AsEWKT(ST_Force_Collection(ST_GeomFromEWKT('MULTILINESTRING ((0 0, 10 10, 20 10),(30 30, 40 40, 50 40))'))); --Result GEOMETRYCOLLECTION (LINESTRING (0 0, 10 10, 20 10), LINESTRING (30 30, 40 40, 50 40)) SELECT ST_AsEWKT(ST_Force_Collection(ST_GeomFromEWKT('MULTIPOINT(0 0 1 -4,1 1 2 -5)'))); --Result GEOMETRYCOLLECTION (POINT (0 0 1 -4), POINT (1 1 2 -5))