[postgis-users] Multipolygon

Maxime van Noppen maxime at altribe.org
Mon Sep 21 09:47:34 PDT 2009


On 09/21/09 18:50, eehab hamzeh wrote:
> Hello
> 
> Is there are any command work like st_makeline to create a multipolygon.
> I have a table with a different record of polygon. I need to create
> multipolygon from them
> 
> Any hint or directions

SELECT ST_Union(geom) FROM table;

This will perform the union of all the geometries in the geom column of
table. If you want to force the output type to Multipolygon :

SELECT ST_Multi(ST_Union(geom)) FROM table;


-- 
Maxime



More information about the postgis-users mailing list