I have a shapefile with a whole lot of regions on it. I need to find the centroids for each of these regions in the shapefile (as latlons) and export this as a .csv
I have done extensive research, but no luck yet.
So far: I select the layer. I go to "Vector/Geometry Tools/Polygon centroids". hurrah, the centroids show up. BUT they are not yet added to my layer as lat lons. (although the info must be there because they are, you know, located.)
To get the lat lons added to my layer I go "Vector/Geometry Tools/ExportAdd Geometry Columns" BUT THEN when I look in my attribute table for this layer, some of the column headings have been changed (weird!) :(( The good news is that there ARE the lat lons added.
To be more descriptive:
- The first 16 column headings remain unchanged. That's good.
- The 17th gets truncated from
SA1_testData_SA1_AREA_SQMtoSA1_testDa - The 18th column gets changed from
SA1_testData_SA1_DwellingstoSA1_test_1 - The 19th, 20th etc columns keep incrementing by one:
SA1_test_2,SA1_test_3,SA1_test_4, etc - And then right at the end, the last 2 columns are
XCOORDandYCOORDwith the lat lons in them.
Yes, I have tried both "adding to this shapefile" AND also "saving as a new shapefile"... same outcome. Why do the column headings get scrambled?