[GRASS-stats] Re: GRASS commands (fwd)
2009/9/1 Roger Bivand <Roger.Bivand at nhh.no>: > Is this a bug in the interface description of v.mkgrid? It needs > grid=rows,columns but sets multiple=NO, so wxpython fails (needing two > values but getting one, but only providing an integer entry box). It needs two values which are treated as one string, so it is correct. (E.g. r.series accepts multiple input maps which are separate tokens which required multiple=YES). ... >> grid=c(as.integer(100),as.integer(100)), box=c(5000, 5000), >> position="region")) >> returns >> Erreur dans doGRASS(cmd, flags = flags, parameters = parameters) : >> Parameter <grid> has multiple values >> >> How do I specify the two values when multiple is not allowed. I did not >> get it.... You used > c(as.integer(100),as.integer(100)) [1] 100 100 > c(5000, 5000) [1] 5000 5000 which leads to space separated values. But we want > paste(as.integer(100), as.integer(100), sep=",") [1] "100,100" > Consider the statsgrass list for use of the interface between R and GRASS, > in this case there is an interaction between a possible bug in v.mkgrid and > the parsing of its parameters. > > Since v.mkgrid does declare that grid does *not* take multiple values, the > (current) logic of doGRASS() is defeated, as it checks that the multiple > attribute if the GRASS parameter is not "NO", see > > http://trac.osgeo.org/grass/browser/grass/trunk/vector/v.mkgrid/main.c#L74 > > The discrepancy between the code and the documentation is obvious. There is no real discrepancy... Hope above comments clarify it. If not, we would need to see some debug output of doGRASS()... Markus
Markus Neteler Foundation Edmund Mach (FEM) - Research and Innovation Centre Environment and Natural Resources Area GIS and Remote Sensing Unit, Trento, Italy Web: http://gis.fem-environment.eu/