Getting list of coordinates for points in layer using QGIS?
I've got a layer in QGIS that is comprised of points. Its attribute table doesn't have (show) the corresponding x and y coordinates for each point. Is there a way for me to extract a list of coordinates for those points? (ideally into a CSV, but not required)
Also, for the exported list of coordinates (say, in a CSV file), how do I include the existing attribute table with it?
For your information, I am running QGIS on Mac OS X 10.6.7.
Perhaps this is a duplicate of this question: http://gis.stackexchange.com/questions/7199/how-do-i-calculate-the-latitude-and-longitude-of-points-using-qgis
You might be interested in my answer in another thread http://gis.stackexchange.com/questions/1721/which-gis-support-dxf-and-or-dwg
Depending on your version, you should be able to right-click on the layer you want to export, and select Save As... Choose Comma Separated Value from the dropdown list of the dialog box that appears. Then, in the Layers part of the OGR creation options, type GEOMETRY=AS_XY or GEOMETRY=AS_XYZ depending on the dimensionality of your source data.
That's great and it works! One more thing: Can I also export columns I already have in the original layer's into the CSV, along with the X, Y coordinated? Thanks.
Cool, glad it works! Make sure you have the "Skip attribute creation" checkbox unchecked. I'm not a fan of negative checkboxes like that, it always makes me think twice about what state I need it in.