<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Goord afternoon, <br>
<br>
I have a bunch of ascii files to smooth and I wanted to start using
spgrass6 (and then looping with GRASS routines).<br>
So here is a piece of the code I'm using<br>
<br>
loc<-initGRASS("C:/GRASS", home=tempdir(), override=T) <br>
execGRASS("r.in.gdal", flags="o",
parameters=list(input="M:\\MODIS_temp\\PC2000_049.250m_16_days_NDVI.tif",
output="ref")) <font color="#009900"># import of a reference file for
the region</font><br>
<br>
execGRASS("g.region", flags="p", parameters=list(rast="ref"))<font
color="#009900"> # define the region settings with the characteristics
of "ref"</font><br>
execGRASS("r.in.gdal", flags="o", parameters=list(input=paste(getwd(),
"\\", "file1.asc", sep=""), output="temp")) <font color="#009900">#import
the first ascii file and names it "temp"</font><br>
execGRASS("r.neighbors", flags="c", parameters=list(input="temp",
output="tempL", method="average", size=9) <font color="#009900">#
tries to apply a circular r.neighbors function on temp with a width of
9 cells<br>
<br>
</font><font color="#ff0000">Erreur dans doGRASS(cmd, flags = flags,
parameters = parameters) : <br>
Parameter <size> does not have integer value</font><br>
<br>
How comes that 9 is not considered as an integer value ? Or did I miss
something ?<br>
<br>
Thanks for any hint !<br>
<br>
Alex<br>
<br>
P.S.: execGRASS("r.info", parameters=list(map="temp"))<br>
<br>
+----------------------------------------------------------------------------+<br>
| Layer: temp Date: Fri Aug 28 16:46:47
2009 |<br>
| Mapset: filecb94b5f Login of Creator:
villers |<br>
| Location:
filea6d66e1 |<br>
| DataBase:
C:/DOCUME~1/villers/LOCALS~1/Temp/RtmpAg4EG2 |<br>
| Title: ( temp
) |<br>
| Timestamp:
none |<br>
|----------------------------------------------------------------------------|<br>
|
|<br>
| Type of Map: raster Number of Categories:
9973 |<br>
| Data Type:
CELL |<br>
| Rows:
1123 |<br>
| Columns:
1205 |<br>
| Total Cells:
1353215 |<br>
| Projection:
x,y |<br>
| N: 280626 S: -124 Res:
250 |<br>
| E: 301126 W: -124 Res:
250 |<br>
| Range of data: min = -2000 max =
9973 |<br>
|
|<br>
| Data
Description: |<br>
| generated by
RINGDA~1 |<br>
|
|<br>
|
Comments:
|<br>
| RINGDA~1 -o input="M:/MODIS_temp\PC2000_049.asc"
output="temp" |<br>
|
|<br>
+----------------------------------------------------------------------------+<br>
-- <br>
<pre class="moz-signature" cols="72">Alexandre Villers
PhD Student
Team "Biodiversity"
Centre d'Etudes Biologiques de Chizé-CNRS UPR1934
79360 Beauvoir sur Niort
Phone +33 (0)5 49 09 96 13
Fax +33 (0)5 49 09 65 26</pre>
<br>
<br>
__________ Information from ESET Mail Security, version of virus signature database 4377 (20090828) __________<br>
<br>
The message was checked by ESET Mail Security.<br>
<A HREF="http://www.eset.com">http://www.eset.com</A><br>
</body>
</html>