[GRASS-dev] [GRASS GIS] #739: v.mkgrid parameter needs two values
but is multiple=NO
GRASS GIS
trac at osgeo.org
Tue Sep 1 13:32:59 EDT 2009
#739: v.mkgrid parameter needs two values but is multiple=NO
-------------------------+--------------------------------------------------
Reporter: rsbivand | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: default | Version: unspecified
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
When run from the command line, v.mkgrid map=xxx grid=100,50 works
(main.c, line 74), but in wxpython and execGRASS() in spgrass6 in R, the
--interface-description of grid->multiple = NO is respected, and only one
value can be passed. This then fails (in wxpython here) with:
{{{
v.mkgrid --overwrite map=grd grid=100
ERROR: option <grid> must be provided in multiples of 2
You provided 1 items:
100
}}}
In R (using --interface-description):
{{{
> execGRASS("v.mkgrid", flags="overwrite", parameters=list(map="grd",
grid=as.integer(100)))
ERROR: option <grid> must be provided in multiples of 2
You provided 1 items:
100
}}}
or:
{{{
> execGRASS("v.mkgrid", flags="overwrite", parameters=list(map="grd",
grid=rep(as.integer(100), 2)))
Error in doGRASS(cmd, flags = flags, parameters = parameters) :
Parameter <grid> has multiple values
}}}
This conflicts with the single comma in grid->key_desc, which implies two
values, but grid->multiple = NO. The same seems to apply to box=. It looks
as though there is no conflict on the command line when multiple = NO
provided that the number of values agrees with # commas in key_desc plus
one, but that this does not work when --interface description is used.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/739>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list