I am working in QGIS with shapefiles containing several polygon features with various areas.

I would like to cluster neighbor polygons in a way that results in clusters of approximately the same total areas, and aim for a given target area.

In other words, I would like to perform spatial clustering, but also take into account the polygons areas.

I can try to implement a solution in python to solve this issue.

But before I do, I would like to ask if such a solution already exists, ideally in QGIS, or as python script?

I have already looked for such clustering, but I have mostly found solutions with clusters of the same number of polygons (here or here), instead of the same total area (example of similar questions without answers here or here).

Here is a screenshot of some of the polygons I am working with.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.