ST_ToMultiPolygon() method

Converts the geometry to a multi-polygon value.

Syntax

geometry-expression.ST_ToMultiPolygon()

Returns

ST_MultiPolygon If the geometry-expression is of type ST_MultiPolygon, returns the geometry-expression. If the geometry-expression is a geometry collection containing only polygons, returns a multi-polygon object containing the elements of the geometry-expression. If the geometry-expression is of type ST_Polygon then return a multi-polygon value containing one element, the geometry-expression. If the geometry-expression is the empty set, returns an empty set of type ST_MultiSurface. Otherwise, raises an exception condition.

Examples

Standards

SQL/MM (ISO/IEC 13249-3: 2006) 5.1.33