[Qgis-developer] Attribute-table-to-CSV trouble
Blumentrath, Stefan
Stefan.Blumentrath at nina.no
Thu Jan 29 14:51:22 PST 2015
Dear all,
I was trying to export the attribute table of a set of PostGIS layers from QGIS to CSV.
The tables contain a column "ID" (which was the original id) and a column "id" added during import to PostGIS, and a PostGIS "date" column.
I tried four different approaches for exporting the attribute table to CSV (copy and paste, mmqgis, Quick Export, and "Save as" CSV), in QGIS 2.6.1 none of them worked as expected:
- Copy and paste of the content of the attribute table worked fine for a layer with ca. 1800 features, but in the PostGIS layer with more than 12000 records only the heading was copied/pasted
- mmqgis exported the "date" fields as text, "Qt.*date*(YYYY, MM, DD)", which is not very convenient because it requires search and replace after export
- Quick Export crashed with a Python error
- "Save as" complained about the fact that there already is a column named ID, so OGR was not able to name the feature ID that way in the output... ("Error: creation of field ID failed (OGR error: Attempt to create field ID, but a field with this name already exists.)", and I was not able to provide the -preserve_fid option which might have helped here)
Are some of these known issues or is it just my data and me?
At the end I used mmqgis, but for newbees this procedure (and the number of non-working options) might appear a bit cumbersum...
Kind regards
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150129/7cd0e0e3/attachment.html>
More information about the Qgis-developer
mailing list