[GRASS-user] Using db.out.ogr to export attributes to a csv file
Markus Neteler
neteler at osgeo.org
Tue Apr 2 05:21:01 PDT 2013
On Mon, Apr 1, 2013 at 6:10 PM, דור פרידמן <dof1985 at gmail.com> wrote:
>
> Thanks Markus.
>
> I've corrected my syntax, but have received a new error (it actually export
> an empty file: 'nothing to export'), and the csv file is not being created.
>
> That is my syntax:
>>
>> GRASS 7.0.svn (Israel):~ > db.out.ogr input=allpairs1
>> dsn=/home/dof1985/Grass_projects/allpairs.csv format=CSV
>> WARNING: 20167 line(s) found, but not requested to be exported. Verify
>> 'type' parameter.
>> Exported table </home/dof1985/Grass_projects/allpairs.csv.csv>
>>
>
I have applied a fix in 6.4/6.5/7 SVN to db.out.ogr to also support attribute
export in case of line and area vectors.
> I have tried to export a map with two tables connected to it. Running
> v.db.tables -p, I can see that there names are: allpairs1_1 and
> allpairs_set10k. I would like to export both to either one or two csv files.
In SVN (r55589) I have added support for multilayers. Please try. Hence it
would be now:
# to export table connected to vector map as layer 2:
db.out.ogr input=allpairs1 layer=2
dsn=/home/dof1985/Grass_projects/allpairs.csv format=CSV
Markus
More information about the grass-user
mailing list