[GRASS-user] v.extract features based on multiple SQL statements in one go

Nikos Alexandris nik at nikosalexandris.net
Tue Jun 4 05:06:47 PDT 2013


Nikos Alexandris wrote:

> > # what is requested?
> > cat /geo/geodata/mangroves/geolocations/sources/ascii/wrspr_of_interest2

> > SELECT * FROM wrs2_descending WHERE WRSPR = 160043 or WRSPR = 161043 or
> > WRSPR = 193056

> > # select it
> > cat /geo/geodata/mangroves/geolocations/sources/ascii/wrspr_of_interest2 |
> > db.select input=-

> > cat|AREA|PERIMETER|PR_|PR_ID|RINGS_OK|RINGS_NOK|WRSPR|PR|PATH|ROW|MODE|
> > DAYCLASS|SEQUENCE
> > 12071|2.82726|6.76119|2523|2523|1|0|160043|160043|160|43|D|7|22611
> > 24719|2.82726|6.76119|2523|2523|1|0|161043|161043|161|43|D|14|47907
> > 24980|2.59335|6.45272|3032|3032|1|0|193056|193056|193|56|D|14|48416

> > Even so, I can't feed this to "v.extract" directly.
 
Moritz Lennert wrote:

> How about a select that gets you all the cat values of the features your
> interested in, then v.extract with list= (or put the cat values into a
> file and use the file= parameter) ?

+100 for the speedy response :-).

Well, blind me, got stuck with the WRSPR or PR attribute.  Will try ASAP.
Mercis, N


More information about the grass-user mailing list