[postgis-users] computing unions of intersecting polygons
reid at umn.edu
Fri Jan 9 17:01:17 PST 2009
I have a table which contains about 10,000 fairly simple polygons (~20
vertices, no interior rings). Some of these polygons intersect each other.
I would like the union polygon of each group of intersecting polygons,
and ideally how many polygons were unioned together in each group.
What's the best way to do this?
I have a plan which seems to be promising, something along the lines of:
insert into bar select st_union(geometry) from foo;
select (st_dump(geometry)).geom from bar;
... but it is quite slow, it requires an intermediate table, and it
doesn't tell me how many polygons were unioned in each group.
I'm running version 1.3.3.
More information about the postgis-users