[Qgis-user] Export to vector layer to CSV with coordinates

Alister Hood alister.hood at synergine.com
Sun Feb 27 17:53:43 PST 2011


> 2011/2/25 Václav Å~ehák <rehakv01 at gmail.com>:
> > Hi list,
> >
> > is there a way how to export vector layer to a csv file including the
> > coordinates? The "Save as..." - "Comma Separated Value" command
> > exports only the attributes but my users would like to export the
> > data, perform some processing (such as filtering) in Excel and load
> > the data as a new layer.
> 
> This is what I do. Select the features in QGIS, copy, paste into your
> spreadsheet app. The geometries are pasted as WKT in the first column.
> Use "Text to columns" feature (this depends on your app) if you want
> the coordinates as numbers. This works only for points and shouldn't
> be necessary since the text import plugin seems to understand WKT. Do
> your stuff, then select all cells, copy and paste into a text file for
> use with QGIS.
> 
> This is indeed a terrible idea for data integrity but if you work with
> shapefiles, dbf and text files you haven't got data integrity anyway.
> 
> Goyo

Just to be thorough: you can also use the "shapefile viewer" plugin's 
"copy to clipboard" button, although very large shapefiles are slow to 
load in the viewer, so it would be quicker to use Goyo's method for them.

Exporting with coordinates to .csv is so similar to the shapefile 
viewer's function that I think it would be quite nice to add it as a 
feature (as a second menu entry) :)

Regards,
Alister




More information about the Qgis-user mailing list