| Message |
I want to calculate weighted centroids of polygons but cannot find any function supporting this. I have a grid with population density and want to calculate centroids of regions (polygons) weighted by population count.
The result should be a list of region ids with the coordinates of the wieghted centroid of each region.
The method I am currently applying is to create a grid with column number, a grid with row numbers, multiply the populaton grid with the row and column grid. Do zonalstatistics as table and divide the sum of row*population grid by the sum of population grid by zone.
The generation of the row and column grid is very time consuming. Again, there is no command supporting this. I create a fishnet, add colums with row and column numbers an convert them into grid with pointgrid.
I am looking for a less time consuming solution to this problem, either directly computinh weighted centroids and facilitating the creation of a grid with row and column numbers for each grid cell.
|