[postgis-users] Multipolygons UNION
Nicolas Ribot
nicky666 at gmail.com
Tue Nov 27 02:51:45 PST 2007
> Hello,
>
> I'm newbie with PostGIS and would like to ask to point me to a right
> direction. I need to unite all of the multipolygons that have the same
> attribute and that are contiguous to each other. Actually I need to
> unite the sub-divisions like the States in the US and keep the islands
> apart from the mainland.
>
> I tried this query but it fails:
>
> INSERT INTO country (the_geom, na2)
> SELECT astext(multi(geomunion(the_geom))) AS the_geom, na2 FROM polbnda
> GROUP BY na2;
>
What was the error message ?
Why do you use astext(...) ? Insert geometry directly in your the_geom column.
Nico
More information about the postgis-users
mailing list