enter image description here

As you can see in the image, I'm trying to merge selected polygons and their respective attributes. I have thousands of these polygons (some very small, others very large). I have to create areas of around 40000 m^2 (doesn't have to be exactly this area, but approximately). Some of these polygons already exceed this area value, so in that case, they shouldn't be merged with others (in the cases they are very large, ideally they should be divided into parts with the referred area value, but this procedure is not as important).

I also need that the merged polygons, merge their attributes (such as sum the population value, so that the final polygon has the total population value of all the merged polygons).

Is there any way to AUTOMATE this task? The shape of the final polygon doesn't matter, as long as it has around 40000 m^2 and its attribute values are summed up. I'm using QGIS 3.26.3.

1 Answer 1


Only solution I can think of that doesn't require any coding is this one:

  1. Create raster with the extend of your polygon layer with grid size cca 40000 m^2
  2. Convert raster to polygon layer
  3. In Field calculator of the new polygon layer transfer id to attribute table ($id)
  4. Use Join by location tool to transfer id_value from new polygon layer to your polygon layer
  5. Dissolve by the new id_value and calculate sum of required values

I think this would work well in case your polygons would be relatively smaller than 40000 m^2 and compact (which unfortunately doesn't seem to be your case) or in case you wouldn't mind some of the newly merged polygons to be much larger than 40000 m^2. In case it is a problem for you I am afraid you will need to do some custom coding to calculate fractions of values based on overlapping area ratio.

  • Although not ideal, this is the best solution I have! Thank you!
    – John Silva
    Commented Oct 28, 2022 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.