QGIS – Mean Coordinates Yielding Displaced Point from Centroid

coordinatesmeanqgis

I need to get the weighted centroid from a grid layer (according to an attribute of the polygons on this layer). For that, I am using the "mean coordinates" tool, but I realized that the yielded points are displaced from the place they should be located. This is clear when I apply a mean coordinate to just one feature, like in the image:

Feature with centroid (orange) and point yielded by mean coordinates tool (red)

The red point is the one yielded by the mean coordinates, while the orange one appears to be the logic centroid for the selected feature (yellow piece from grid). Distance between both points is around 20m, but this distance it's not always the same for other cases (even though it's around that value).

Can this be due to having a different CRS for the grid from the project one?

Best Answer

Can this be due to having a different CRS for the grid from the project one?

I don't think so. This is more likely caused by that the polygon starts and ends in the lower left corner. (that means there are two points there), or there are other points (vertex) there. A polygon having n vertices has n+1 points in QGIS.

You can test it by creating polygons starting from different corner:

enter image description here