[Qgis-user] aggregate polygon overlay
Karl Magnus Jönsson
Karl-Magnus.Jonsson at kristianstad.se
Tue Feb 17 07:23:18 PST 2026
Hi Simon!
Seems like a common problem that GIS should handle easy, but it is perhaps not that easy. I had a similar problem that ended up in below. I have my data in Postgres + PostGIS so it is handled by the database in in a view. The code disassembles the polygons in the rings, union the rings and then build polygons again from the lines. Then I do a join with the original data (in this case not exactly) based on location on the centerpoint. In your case I would do a suitable group by and concatenate the attributes. Hope this helps even it is not QGIS.
WITH orings AS (
SELECT st_exteriorring((st_dumprings((st_dump(omr.geom)).geom)).geom) AS geom
FROM qdp2.omr
), oboundaries AS (
SELECT st_union(orings.geom) AS geom
FROM orings
), opoly AS (
SELECT (st_dump(st_polygonize(oboundaries.geom))).geom AS geom
FROM oboundaries
)
SELECT row_number() OVER () AS id,
p.namn,
'delområde'::text AS delomr,
p.plan_uuid,
p.status,
p.publicerad,
op.geom
FROM opoly op,
qdp2.plan_omr po,
qdp2.plan p
WHERE st_contains(po.geom, st_pointonsurface(op.geom)) AND po.plan_uuid = p.plan_uuid
Med vänliga hälsningar
Karl-Magnus Jönsson
Från: QGIS-User <qgis-user-bounces at lists.osgeo.org> För Simon Dietmann via QGIS-User
Skickat: den 17 februari 2026 15:01
Till: qgis-user <qgis-user at lists.osgeo.org>
Ämne: [Qgis-user] aggregate polygon overlay
Dear list,
I am trying to solve the following problem:
I have one polygon layer with many polygons that are in many cases overlapping and with different attribute valus, e.g. a, b, c:
[cid:image001.png at 01DCA028.5EA7E630]
My goal is to generate a polygon layer with polygons for every overlap constellation containing a concat string of those attributes, in this example seven polygons with the attributes a, b, c, ab, bc, ac, abc.
I started with a union of my original layer, the result is a layer with 12 polygons where overlapping areas of the original polygons result in overlapping intersections containing one of the original attributes each, for example in the middle, there are 3 polygons, one with a, one with b and one with c.
How is it possible to summarize those overlapping polygons into one polygon each with all the attributes, given that there is a large number of polygons and different attributes?
Thank you for any hints,
regards
Simon
i.A. Simon Dietmann
Projektleiter | Geograph
[cid:image002.png at 01DCA028.5EA7E630]
PGNU Planungsgesellschaft Natur & Umwelt mbH
Amtsgericht Frankfurt am Main, HRB 111938;
Geschäftsführer: Dr. Benjamin Hill, Dorit Thurm, Sebastian Braun
Hamburger Allee 45 +++ 60486 Frankfurt am Main
Durchwahl: +49 69 952964-32 +++ Fax: +49 69 952964-99
E-Mail: dietmann at pgnu.de<mailto:dietmann at pgnu.de> +++ Web: www.pgnu.de<http://www.pgnu.de>
> Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20260217/bf885bea/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 50063 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20260217/bf885bea/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 8911 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20260217/bf885bea/attachment-0003.png>
More information about the QGIS-User
mailing list