[GRASS-user] subsetting vector db based on selected rows

Micha Silver tsvibar at gmail.com
Tue Feb 28 22:55:26 PST 2017



On 03/01/2017 02:08 AM, Ken Mankoff wrote:
> Dear Micha,
>
> Thank you for the helpful reply. This solves the issue. FYI because there are 1000s of rows, I have combined the two commands like this:
>
> v.extract input=BTMP output=BTMP_max cats=$(db.select -c sql="select b.cat from BTMP AS b WHERE b.area=(SELECT max(area) FROM BTMP WHERE termini_id=b.termini_id) GROUP BY b.termini_id" | tr '\n' ,) --o
Well done!

>    -k.

-- 
Micha Silver
cell: 052-3665918

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170301/05769bff/attachment.html>


More information about the grass-user mailing list