I have a polygon that was digitized based upon visually interpreting underlying values of rasters/vectors that represent a natural environment (soil type, surface roughness, slope, elevation, etc...). The goal of the digitization was to define a polygon shape that maximizes the average value of underlying raster/vector values underneath while keeping the polygon area relatively small.
In this type of exercise there are many possible answers. I am brainstorming ways I could possibly automate tweaking the shape of the initially digitized polygon to see if there is a slightly better answer while defining some limits to the problem. Here is an example of a workflow I would like to have:
1) Begin with the initial polygon that is say, fairly circular with an area of 1 km^2 and a centroid at 0,0
2) Use a script or tool to create/try hundreds of slight permutations of the polygon's shape while having two limitations i) keeping the area the same and ii) not allowing the centroid to deviate more than say 0.5 in both x and y direction.
3) With the new polygon shape, perform an Extract by Polygon with one of the raster files and check if the average value of the cells has increased in the new polygon area compared to the original, and if so, save the new polygon to visually check later.
I figure the solution could get very complex because it deals with nodes. Certainly there would need to be creation or definition of a parameter describing how rough/erratic changes in the shape are allowed to be, and also, the calculations would depend on the number of nodes in the polygon. There might also be issues with self-intersecting lines depending on the parameters chosen. Another addition to the approach would be having the changes in shape intelligently maximize the average value rather than change the shape randomly. Any other factors important to account for / think about?
Do you know of some existing useful tools/scripts that could solve or help solve this problem? Any ideas are welcomed - especially ArcGIS and Open source approaches. I have a feeling that an ArcGIS solution will most likely involve programming with ArcObjects rather than any scripting. Or perhaps it's possible that a permutation problem like this one is best handled by non-GIS software - maybe something like R?