I have a set of coordinate points. The points are distributed in such a way that some points are clustered around a specific area. There is an option to find out mean coordinates(s) of the whole point layer.
I would like to know if there is any way in QGIS to find out the mean coordinates of the points from a specific area from a point layer.
Best Answer
You need to do this in a two-stage process using the
Vector > Analysis Tools > Mean Coordinates
tool in the second step. This tool will return the mean coordinates for sets of point within a layer if they have a unique"ID"
field. So, if you have a polygon layer which defines your areas, do a spatial join (Vector > Data Management > Join attributes by location
) to attribute your points with the polygon (area) id and then use the Mean coordinates tool, specifying the new field.You may already have unique
"ID"
s or a polygon layer but if you do not you could create a fishnet (Vector > Research Tools > Vector Grid
) to lay over the points as one method to define the areas. Alternatively, if your areas are defined by a raster layer, then you could use the Point sampling plugin to attribute the points based on your raster. Or, if you want to attribute them by location without a vector or raster layer, you will need to create an algorithm to give a new attribute based on the coordinates of each point (possibly using some modulus-based approach).