[GRASS-user] v.extract fails for long strings in sql where or cat

Moritz Lennert mlennert at club.worldonline.be
Wed Aug 11 04:26:19 PDT 2021



Le 11 août 2021 11:06:35 GMT+02:00, Mira Kattwinkel <kattwinkel-mira at uni-landau.de> a écrit :
>Dear list,
>
>is there a max length in the where statement for v.extract?
>
>I want to extract many line features depending on the value of an id 
>field and get:
>
>"[Errno 7] Argument list too long: 'v.extract'" when I run v.extract 
>with a long sql statement.
>
>It works if I use id < 70000, hence the number of extracted items is not 
>the problem. However, this does not help because I need a selection like 
>"id in (1,5,7,...,70000)". Similarly, cat = 1-70000 works but cat = 
>1,2,3,....,70000 does not.
>
>I found an old posting about this 
>(https://lists.osgeo.org/pipermail/grass-user/2010-January/054361.html) 
>and wonder if anything has changed since then and if there is any work 
>around if not.

If what you have is a long list of cat values, try the 'file' option of v.extract.

Moritz


More information about the grass-user mailing list