Name

ST_MPolyFromWKB — Returns a MultiPolygon object given its Well-known binary Representation

Synopsis

geometry ST_MPolyFromWKB(bytea WKB);

geometry ST_MPolyFromWKB(bytea WKB, integer SRID);

Alias

MPolyFromWKB, ST_MPolygonFromWKB, MPolygonFromWKB

Description

Creates a MultiPolygon from well-known binary representation of a MultiPolygon and a Spatial Reference System ID (SRID). If the SRID is not provides it defaults to -1. If WKB passed in is not a MultiPolygon, NULL is returned.

Coordinate Dimensions
2D3DM
Spatial Standards Support
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
3.2.7.27.2.7.1-9.6.5

Examples

SELECT ST_MPolyFromWKB(ST_GeomFromText('MULTIPOLYGON (((0 0, 0 150, 150 150, 150 0, 0 0)),((350 0, 230 0, 230 120, 350 120, 350 0)))'));
SELECT MPolyFromWKB(ST_GeomFromText('MULTIPOLYGON (((0 0, 0 150, 150 150, 150 0, 0 0)),((350 0, 230 0, 230 120, 350 120, 350 0)))'),25830);

Related functions

ST_GeomFromWKB