I have a spreadsheet for an archaeological project that is hosted on Google docs. This allows multiple contributors to edit and update the table as revisions and field data comes in. The table is not very complex, just site attribute information and the spatial information in WKT. Some of the sites are points and some are polylines.

Currently, when I want to map the data I export the table from google docs as a csv and then import into QGIS. In the csv import dialog one must specify the geometry type, so I must run the import process twice for each geometry type and then end up with two layers in QGIS, one for point features and the other for poylines. Although this process works well enough, it gets confusing for spatial operations and analysis because the project is now split across two separate layers and tables.

Is there some way to import data in QGIS from a csv with WKT and transform it into a file type that will allow the data to remain organized by attribute (ie project), and not by geometry/structure?

I've tried this in PostGIS/postgresql, but it appears that the project data would be split into two tables based on geometry, if I use QGIS to import the csv and then export to the PostGIS database. I've tried to import a csv without spatial geometry set into QGIS and then export to PostGIS but can't seem to tell the database to then recognize the WKT field. At any event, I have no idea if PostGIS is even a solution to this problem.

  • The Postgis geometry and geography types can both contain any mixture of points, lines, polygons and the multi versions thererof, so, yes, you could certainly use Postgis as a backend. If you import the WKT as a text field and then use ST_GeomFromText to update a geometry/geography field, then you will end up with all your geometries in one field with associated attributes -- that you can filter by. Oct 23, 2014 at 19:34

1 Answer 1


While PostGIS can handle mixed geometry types, this won't help you for QGIS. Regardless of their source all layers in QGIS can only be of a single geometry type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.