# Getting the mean coordinates of point features in QGIS

I have a vector layer containing several points and I would like to generate the mean coordinates of these points, using QGIS only if possible. I'm looking for something similar to centroids, but for points. Any hint?

• Please edit the question to define "centroid" in this context... Is it the center of the bounding rectangle? The center of mass? The visual center of the convex hull? The X/Y of the point closest to one of those (and therefore "inside" the shape)? May 10, 2016 at 10:26
• I would combine all the points into one MultiPoint and take the centroid of that. Works with OpenJUMP, not yet tried with QGIS. May 10, 2016 at 10:35
• Are you wanting to do something similar like this? Clusters of points: Determining the centroid (QGIS) May 10, 2016 at 11:03
• Please edit the question in response to comments asking clarification. It's not fair to those who would answer to need to scan comments for critical information. May 10, 2016 at 11:14
• @Vince: Yeah I'm going to edit it, but I asked the question an hour ago and I'm just checking for answers now. Easy, thanks. May 10, 2016 at 11:44

`Vector > Analysis Tools > Mean coordinate(s)` yields the average coordinates aka their centroid of any vector layer.

Centroid property is only for polygon layers. If you have a point layer you can calculate the "Mean Coordinates" from Qgis geoalgorithms.

If your points have a common attribute you can run "Vector > Geoprocessing Tools > Convex Hull(s)..."

``````Input Vector = points
Create convex hulls based on input field = check, use the field with the
common attribute
``````

This will create a polygon for each group of points. Now you can create your generalised points "Vector > Geometry Tools > Polygon Centroids..."

Convex hull creates a minimum area polygon around the points. The centroid of which will then be the generalized centroid for each point cluster.

As already mentioned, Mean coordinate(s) is the tool in QGIS you want, which functions to get the centre of gravity of the points

To help visualise what this tool does, below is the use of Mean coordinate(s) on a dense point layer with the `Unique ID field` set to a locality attribute, as well as Heatmap (Kernel Density Estimation) on the same layer

Mean coordinate(s) functions somewhat like it is grabbing the centre of gravity of a heatmap of the points