I have some building data (polygons) as a shapefile in QGIS 2.18. I'm trying to add a location coordinates (the polygons rough center) and an array of the polygons coordinates (its points). I've been able to do the first one using vector --> analysis tools --> mean coordinates which generates a new layer. I can't work out how to get the polygons coordinates though? The end goal is to extract this all to a spreadsheet if that makes a difference.
1 Answer
If you have a common id in the centroid layer and vertice table using Joseph's comment/method you could bring both layer and table in QGIS and perform a join on the common id field and export that joined layer to a .csv.
-
Thanks for your response artwork21. There is a common ID but I've decided to join everything together in excel as it's easier for me to work with!qu1ckdry– qu1ckdry2017-08-16 13:33:36 +00:00Commented Aug 16, 2017 at 13:33
Save As..., change theFormatto csv and change theGEOMETRYtoAS_WKT. This will create a csv file with a field containing the coordinates of all vertices for each polygon feature :)