In QGIS I would like to update two columns with the centroid easting and northing of my polygons. I am using the field calculator. I have tried using $x and $y but this only seems to work for points.
I have checked the help but it does not seem to mention being able to do this.
Answer
A fast way (without field calculator) would be to
- create a centroid layer: Vector - Geometry Tools - Polygon Centroids
- join the centroid layer to the polygon layer: (Polygon) Layer Properties - Join tab
No comments:
Post a Comment