[postgis-users] Advice on Unioning Polygons

Rebecca Clarke r.clarke83 at gmail.com
Fri Feb 1 02:40:53 PST 2013


Hi there

Looking for some advice.

I have a table with thousands of polygon records.

I want to union all intersecting polygons that have the same attributes
into one polygon (So one record, rather than 10 or 20 etc.).

Can anyone recommend the best way to do this.

I can do a loop which goes through each record, unions its geometry with
the geometry's of the other matching records that intersect with it, then
move to the next record. Problem with this is that it creates
duplicate polygons when it comes to a record that has already been unioned
with a previous one record. I can easily delete any duplicate records
generated, but I'm wondering if there's a less long winded way.

I hope I'm explaining myself correctly.

My details are:
postgis 1.3.5
PostgreSQL 8.3.8

Many thanks in advance.

Rebecca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130201/b44c02ca/attachment.html>


More information about the postgis-users mailing list