<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#FFFFFF"
text="#000000">
Hi Lars<br>
<br>
On 09/30/2012 12:32 AM, Lars Dalby wrote:
<blockquote cite="mid:1348957922610-5005361.post@n6.nabble.com"
type="cite">
<pre wrap="">Micha Silver wrote
</pre>
<blockquote type="cite">
<pre wrap=""> Can you copy/paste your exact command? I think there should not be
any space between 'coor' and '='.
</pre>
</blockquote>
<pre wrap="">
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)</pre>
</blockquote>
<br>
It seems that the GRASS parser doesn't "understand" the comma
separated list of values. Here's a bug report of the problem:<br>
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/grass/ticket/739">http://trac.osgeo.org/grass/ticket/739</a><br>
<br>
I tried the suggestion in that link, but it still doesn't work:<br>
> pcoor<-paste(as.integer(1), as.integer(2), sep=",")<br>
> pbox<-paste(as.integer(2), as.integer(2), sep=",")<br>
> pgrid<-paste(as.integer(2), as.integer(2), sep=",")<br>
> pars<-list(map="testgrid", grid=pgrid, coor=pcoor, box=pbox)<br>
> pars<br>
$map<br>
[1] "testgrid"<br>
<br>
$grid<br>
[1] "2,2"<br>
<br>
$coor<br>
[1] "1,2"<br>
<br>
$box<br>
[1] "2,2"<br>
<br>
But then I still get:<br>
> doGRASS("v.mkgrid",flags="overwrite", parameters=pars)<br>
Error in doGRASS("v.mkgrid", flags = "overwrite", parameters = pars)
: <br>
Parameter <grid> does not have integer value<br>
<br>
Can I suggest you take this issue to the r-spatial list?<br>
<br>
Regards,<br>
Micha<br>
<br>
<br>
<br>
<blockquote cite="mid:1348957922610-5005361.post@n6.nabble.com"
type="cite">
<pre wrap="">
-Lars
--
View this message in context: <a class="moz-txt-link-freetext" href="http://osgeo-org.1560.n6.nabble.com/Rasterize-polygons-multiple-polygons-per-grid-cell-tp5005264p5005361.html">http://osgeo-org.1560.n6.nabble.com/Rasterize-polygons-multiple-polygons-per-grid-cell-tp5005264p5005361.html</a>
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<br>
</body>
</html>