Thx, now is working...Using the GUI in current CVS, doesn't add the ' ' on the
line...Should open a bug (GRASS )?
Luca
Alle 16:00, venerdì 31 marzo 2006, Radim Blazek ha scritto:
Try where='area>400'
Radim
On 3/31/06, Luca Casagrande <luca.casagrande@gmail.com> wrote:
> Hi Radim!
> I was working with v.extract and noticed this (taken from grass
> prompt..):
>
> [Starting v.extract from GRASS TOOLS in QGIS]
> [...]
> option: input=strada@Luca
> option: type=area
> option: layer=1
> option: where=area>400
> option: output=strada_400
> command: v.extract input=strada@Luca type=area layer=1 where=area>400
> output=strada_400 exitCode = 0
>
> The file was succesfull created and so the tab
>
> [Quit QGIS]
>
> GRASS 6.1.cvs (tevere):~ > g.remove vect=strada_400
> REMOVE [strada_400]
> GRASS 6.1.cvs (tevere):~ > v.extract input=strada@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 ...
>
> The matter if that the same command gives error in GRASS but not in
> QGIS..
>
> Thx
> Luca
>
> --
> "E' molto più bello sapere qualcosa di tutto, che tutto di una cosa
> (Blaise Pascal)."
>
> GENTOO-GIS Development Team
> jabber: casagrande@jabber.linux.it
--
"E' molto più bello sapere qualcosa di tutto, che tutto di una cosa (Blaise
Pascal)."
GENTOO-GIS Development Team
jabber: casagrande@jabber.linux.it
> > GRASS 6.1.cvs (tevere):~ > g.remove vect=strada_400
> > REMOVE [strada_400]
> > GRASS 6.1.cvs (tevere):~ > v.extract input=strada@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.