[postgis-users] Union of MultiPolygons

C. Y. W. cyw at dls.net
Wed Nov 26 11:02:12 PST 2008


Hi All,

I have  a table with counties as Multipolygons. I need to define a new 
multipolygon with some of these counties.

I tried to run this :

INSERT INTO county (polygon_nm, the_geom) VALUES ('X',
 st_union((select the_geom from county where polygon_nm='LAKE'), (select 
the_geom from county where polygon_nm='COOK')))

And I got constraint "enforce_geotype_the_geom" violations.

I guess st_union returns something that's not a Multipolygon.

What should I do?

Anyway to merge more than 2 Multipolygons at a time?

Thanks,
cyw 





More information about the postgis-users mailing list