[GRASSLIST:529] Re: v.extract works from inside QGIS and not inside GRASS

Hamish hamish_nospam at yahoo.com
Fri Mar 31 16:05:44 EST 2006


> > > GRASS 6.1.cvs (tevere):~ > g.remove vect=strada_400
> > > REMOVE [strada_400]
> > > GRASS 6.1.cvs (tevere):~ > v.extract input=strada at Luca type=area
> > > layer=1 where=area>400 output=strada_400 Load cats from the
> > > database (table = strada, db =
> > > /home/geko/lavoro/gis/grass/dati/tevere/Luca/dbf/). DBMI-DBF
> > > driver error: SQL parser error in statement:
> > > SELECT cat FROM strada WHERE area
> > > Error in db_open_select_cursor()
> > >
> > > -1 cats loaded from the database
> > > Writing attributes ...
..
> > Try where='area>400'
..
> Thx, now is working...Using the GUI in current CVS, doesn't add the ''
> on the line...

It doesn't need to. (which may cause confusion if you cut and paste the
command string from the GUI)

The issue is the '>' character must be quoted on the command line as
bash will interpret it as a request to redirect output to a file. As the
GUI isn't being run from the command line, you don't need to quote it
there (or at least it will take care of any quoting for you). It is the
same situation as needing to quote the multiple word input to v.in.ascii
columns= from the command line, but not from the GUI.


Hamish




More information about the grass-user mailing list