[GRASS-dev] GRASS 7: d.vect: layer=-1 default conflicts with
where option
Markus Neteler
neteler at osgeo.org
Mon Sep 5 16:03:25 EDT 2011
On Mon, Sep 5, 2011 at 4:04 AM, Glynn Clements <glynn at gclements.plus.com> wrote:
>
> Markus Neteler wrote:
>
>> I found that d.vect fails on commandline
>>
>> d.vect mylakes where="FTYPE IS NULL" type=area col=red
>> ERROR: Option <layer> must be > 0
>>
>> d.vect mylakes where="FTYPE IS NULL" type=area col=red layer=1
>> d.vect complete.
>>
>> The reason is
>> layer Layer number or name ('-1' for all layers)
>>
>> I suppose that the logic in the WHERE part needs to be updated.
>
> The error message should be more straightforward, e.g.
>
> "Option <where> requires a layer"
>
> Making it support where= with all layers would require a substantial
> re-write (and requires that you can come up with a single query which
> works for all layers).
Sure but what I meant to say:
d.vect mylakes where="FTYPE IS NULL" type=area col=red
... this works in GRASS 6 and fails in GRASS 7 since the default
layer value is unsuitable. IMHO default values should work (as before).
Markus
More information about the grass-dev
mailing list