So you’ve digitized lines in QGIS into a shapefile, but want to save the vertices as ASCII file to do other stuff with them? This is not as straightforward as it might seem at first.
The first step involves converting the vertices into individual point features. This is done with the function Vector – Geometry Tools – Extract Vertices. Write the vertices to a new shapefile.
The second step is saving these vertices as csv files. Select the vertex shapefile, right click on it and choose Export – Save Features As. You can then select a csv file as output file. You can also select which fields you want to export. Under Layer Options, you must specify how you want the geometry written. AS_XYZ should be fine for 3D data in a projected coordinate system, but if you are working in a 2D system and want to switch X/Y or latitude/longitude, you can use AS_YX. You can also select the separator, where TAB can come in handy if you want to paste the results into Excel.