Monday, 4 December 2017

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.



Answer



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.


QGIS Save vector layer as... dialog


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...