[GIS] How to determine the centroid of polygons

attribute-tablecentroidsqgis

I have a polygon vector and I want to quickly attain the centroid of this polygon for insertion in a text document. I am working with QGIS. I searched through other questions and although some are somewhat close they don't quite answer my question.

Ideally, the centroid coordinates would be in the attribute table of the polygon and I could just copy and paste the coordinates.

I don't want to have to create a separate point vector file that represents the centroid and then find these coordinates and copy and paste them.

Best Answer

A centroid is per definition a point layer and not a polygon. Therefor you need to create a new layer, which is easy as pie in QGIS 1.8 and higher versions.

  • Load in your polygon
  • Go to the menu -> Vector -> Geometry tools -> polygon centroid and create a centroid point layer
  • Export the coordinates of the created centroid to the attribute table by clicking on -> vector Menu -> Geometry tools -> Export/Add geometry columns.

Afterwards you could make a spatial join to add the centroids columns to the polygons and delete the point layer again.