Search code examples
gisexport-to-csvqgis

Is it possible to export geometry data from a shapefile to CSV from QGIS?


I'm trying to get geometry data from a large quantity of shapefiles into a database (Google Datastore). The thing is, I don't need to work with maps, I just need the coordinates, so I would like just the numerical coordinates. Ideally I'd like to use CSV, but any plain text would be workable. I have a Mac and have been able to get QGIS installed (I also tried udig but the interface was baffling). While it is easy to load a shp file into QGIS as a vector layer, I'm lost as to how to export the geometry, or even if it is possible.

Does anyone know how to extract plain text geometry from a shp file? Ideally with QGIS, but any method would be appreciated.


Solution

  • Update:

    See here for a solution: https://gis.stackexchange.com/a/8846

    Outdated Response:

    It is possible, in a sort of roundabout way...

    1. Open the attribute table for the layer you want to save.
    2. Select all rows.
    3. Copy the rows
    4. Paste into a spreadsheet
    5. Save the spreadsheet as a csv.

    Unfortunately there is no way to do this directly in QGIS.

    See here for more details: https://gis.stackexchange.com/questions/8844/get-list-of-coordinates-for-points-in-a-layer/8911#8911