I am a total novice with GIS and using QGIS as that is what is available to me.
I have a vector layer of polygons (about 3500) and a raster layer of light intensity. What I'm working with looks like this:
I am trying to find the centroid of the polygons based on light intensity as a proxy for center of population in the polygon.
I know how to calculate the centroids of the polygons, but I am not sure how to include the values from the raster layer as weights.
I've read about clipping the raster layer based on a selection from the vector layer. I can clip a section from the raster and calculate the centroid based on the light intensity band, but I have no idea how to map that back to the original projection as the clipped raster only contains a GeoTransform (containing the coordinates for the top left corner of the rectangle that contains my polygon and some pixel extents), and a ProjectionRef (a string that I frankly understand little about).
I read Generate centroids for vector polygons based on raster and land-use data using QGIS, which makes sense. But looking at the interface for
r.mapcalc in qgis I am at a loss of how to calculate the weighted centroid per polygon.
Logically I would assume that this kind of tool or method exists, but as I am a novice I don't know where to look and probably don't know how to ask properly either.