20 October 2014

How to export a point shape file to csv in QGIS

A point shape file in QGIS looks like this:





This tutorial can't be used for a line shape file or...


...polygon one.

Open your shape file in QGIS:


Right click on layer and select Open Attribute Table...



Enable editing.


Open the field calculator by clicking on the icon with an abacus :)

Double-click on the $x in Geometry and give a name to the new field.
Select Decimal number (real) from drop down menu of Output field type.
Change width and precision of the output field.



At the bottom of the window you can check how your geographic coordinates look, so you'll know which width and precision you need.


Repeat the steps for $y.

Click on the layer you're working with to highlight it, then in the upper menu Layer => Save As...


Select Format as Comma Separated Value from the drop down menu.
Find a safe place on your computer for your new file and name the csv.
Select Geometry AS_XY.


Check your file, the last two columns include geographic coordinates.



No comments:

Post a Comment