[Qgis-user] any ideas how to get data from attribute table out of qgis

M.E.Dodd m.e.dodd at open.ac.uk
Fri Jun 22 01:38:07 PDT 2012


Thanks for the suggestions.

First the 'save as' .csv is indeed broken, infact I have never got it to work under windowsxp with any file of any size even though 'save as' works fine saving to other formats. Error message "Export to vector file failed. Error: creation of data source failed (OGR error:)"

Am currently trying the export to SQLite, so far its taken 10 minutes and no sign of success or otherwise (just a blank screen).

How do I get to the command line from within the qgis GUI to try that ogr option you suggest?

-----Original Message-----
From: Lee Hachadoorian [mailto:Lee.Hachadoorian+L at gmail.com] 
Sent: 21 June 2012 19:25
To: giovanni.manghi at faunalia.pt
Cc: M.E.Dodd; qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] any ideas how to get data from attribute table out of qgis

On Thu, Jun 21, 2012 at 1:25 PM, Giovanni Manghi <giovanni.manghi at faunalia.pt> wrote:
> On Thu, 2012-06-21 at 17:59 +0100, M.E.Dodd wrote:
>> When there are more than 65000 rows in the data?  On windowsxp.  Have 
>> tried save as .csv but this is still broken,
>
>
> just tested on a 3.5 Million table (postgis) and it returns a 
> correctly formatted CSV.
>
> QGIS 1.8 on Ubuntu.
>
>
> cheers
>
> -- Giovanni --

Also working for me on Windows Vista with QGIS 1.7.4 installed via OSGeo4W.

Not knowing exactly your source format, I can think of two ways around this. One is to try saving to SQLite instead, then export to CSV using the QSpatiaLite plugin or the standalone SpatiaLite-GUI (or spatialite command line).

But all of this is just GUI wrappers for ogr2ogr, so the other way is to use ogr2ogr directly. What happens if you do:

ogr2ogr -f "CSV" layer.csv layer.shp (<--or whatever your input layer is?)

--Lee

--
Lee Hachadoorian
PhD, Earth & Environmental Sciences (Geography) Research Associate, CUNY Center for Urban Research http://freecity.commons.gc.cuny.edu/

-- 
The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302).




More information about the Qgis-user mailing list