[GRASS-user] Using db.out.ogr to export attributes to a csv file

דור פרידמן dof1985 at gmail.com
Tue Apr 2 13:58:05 PDT 2013


Hi Markus and Moritz,

I tried again to run db.out.ogr as follows, but it seems that it doesn't
support lines. Should I add something to the command? or update something
in GRASS? I've also tried in another query to use layer in my syntax, yet
it didn't recognize it as a valid one. I apply the same question to this
problem as well.

GRASS 7.0.svn (Israel):~ > db.out.ogr input=allpairs
dsn=/home/dof1985/Grass_projects/allpairs format=CSV
WARNING: 11277 line(s) found, but not requested to be exported. Verify
         'type' parameter.
Exported table </home/dof1985/Grass_projects/allpairs.csv>

I have also tried two other methods:
First, I tried using v.out.ogr to a csv format, but it snapped the roads in
my map to several segments creating duplicates, thus total of 216,445
entries in the csv file, which is too many in any scale and hard to filter.

I have also tried Moritz suggestion with v.db.select. It was much
convenient with only 1428 entries, though they were formed in one cell
separated with |. Can I use that command to define for each column to be in
a separated column of the csv?

Further more can you recommend of any function that will allow me to filter
the exported attributes to the csv file, instead of using excel to do so?

Best,

Dor






2013/4/2 Moritz Lennert <mlennert at club.worldonline.be>

> On 01/04/13 17:38, Markus Neteler wrote:
>
>> Since we are in GRASS 7 (where we may change parameters), I would not
>> mind to see a more intuitive solution here.
>>
>
> For simple attribute export to csv, v.db.select with the file= parameter
> is a nice and simple solution.
>
> Moritz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130402/d14867c0/attachment.html>


More information about the grass-user mailing list