Monday, January 22, 2018

Using QGIS to export CSV files with Well Known Text geometry

QGIS can export feature layers as comma separated values (*.CSV) files with a geometry column in  Well Known Text (WKT) format. This can be very convenient if you want to exchange a small amount of data from one GIS system to another GIS system.

To save a vector feature layer to a WKT CSV file, do the following:

  1. In the legend pane of QGIS, select a layer to export, e.g. forest. Then press the right click of the mouse.

    A pop up menu appears.

  2. In the pop up menu, choose Save As.
  3. The Save vector layer as dialog box appears.


  4. In the Format combo box, choose Comma Separated Values (CSV). In the File name field, click the  Browse button and type in the output file name, e.g. forest.csv.


  5. In the Layer Options group box's GEOMETRY combo box, choose AS_WKT. Click OK.

    The selected vector layer is exported out as a CSV file with a geometry field as WKT format as shown below in a spread sheet.

No comments: