I have a regular grid with a cell width of 200 meters (available as raster and vector data set). Each cell has a value from 0 to 2000.
I now want to draw circles around these cells in such a way that the sum of values inside the coverage of the circle reaches a maximum of 2000. The radius of the circle can be unlimited, but should not exceed 20,000 meters. The circles may touch or overlap and there's no limit in circles, but there should be as little circles as possible.
I am aware that this will be an iterative procedure. I just have no idea how to approach this. I have R, QGIS, PostGIS and Python at my disposal.
Maybe there is some kind of clustering here that already does what I want it to do. Probably you could also use rectangles as a basis for the calculation, the radius is quite similar.
Edit Maybe another idea is to grow squares from (n+1)^2 cells instead of circles...