Hi Lars

On 09/30/2012 12:32 AM, Lars Dalby wrote:
Micha Silver wrote
    Can you copy/paste your exact command? I think there should not be
    any space between 'coor' and '='. 
Sure, but as I run them from R, they look a bit different that when run from
command line GRASS.

execGRASS('v.mkgrid', parameters = list(map = 'VectorGrid', position =
'coor', coor = '-6358820,-17367529', grid = '142,360', box =
'96486.28169014, 96486.28055556'))

What happens here is that the list() command will make a list with 5 slots
in this case. It looks like this: 

$map
[1] "VectorGrid"

$position
[1] "coor"

$coor
[1] "-6358820,-17367529"

$grid
[1] "142,360"

$box
[1] "96486.28169014, 96486.28055556"

So it will not make any difference to what is being send to GRASS if I have
blank spaces between '=' and the values. R ignores these when making the
list. I am afraid that the problem doesn't lie here.

Do you think it could be related to the GRASS version I am running? (I am
using 7.0)

It seems that the GRASS parser doesn't "understand" the comma separated list of values. Here's a bug report of the problem:
http://trac.osgeo.org/grass/ticket/739

I tried the suggestion in that link, but it still doesn't work:
> pcoor<-paste(as.integer(1), as.integer(2), sep=",")
> pbox<-paste(as.integer(2), as.integer(2), sep=",")
> pgrid<-paste(as.integer(2), as.integer(2), sep=",")
> pars<-list(map="testgrid", grid=pgrid, coor=pcoor, box=pbox)
> pars
$map
[1] "testgrid"

$grid
[1] "2,2"

$coor
[1] "1,2"

$box
[1] "2,2"

But then I still get:
> doGRASS("v.mkgrid",flags="overwrite", parameters=pars)
Error in doGRASS("v.mkgrid", flags = "overwrite", parameters = pars) :
  Parameter <grid> does not have integer value

Can I suggest you take this issue to the r-spatial list?

Regards,
Micha




-Lars




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Rasterize-polygons-multiple-polygons-per-grid-cell-tp5005264p5005361.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

This mail was received via Mail-SeCure System.



_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to