I have a table with many polygons. The polygons all have a name and a value.
I want to flatten these polygons so that each polygon border remains as border to the resulting polygons. Instead of having a stack of polygons I will remain with a mosaic of polygons based on the same lines.
Resulting in this:
The names are insignificant. I want to sum the values of each original polygon within the different tiles of the mosaic. The number of overlaps would also be relevant to calculate.
I am looking for a solution using PostGIS. I have solved this using FME, but my data size (20.000+ objects with millions of overlaps) makes this too time consuming. The union function in QGIS does this fairly straightforward as illustrated form their document webpages.
For those in need of a context the data is actually multi-ring buffers around seabird nesting sites in Norway. The data sets are per species and we are looking at several thousands nesting sites per species.
You may download a test data set here.
ST_Split
supports splitting Polygon by MultiLinestring; if that's applicable, collect the exterior rings as blade, split all polygons and count equals. distinct and join those with the original table to sum up the attributes. if you join/collect/split by intersection (bbox intersection, even), performance might be alright.