[GRASS-stats] R (spgrass6) / GRASS r.in.gdal error

Rainer M Krug r.m.krug at gmail.com
Tue Mar 8 08:36:29 EST 2011


2011/3/8 Alexandre Villers <villers.alexandre at gmail.com>:
> Sorry for double posting if it did
> -------------------------------------------------------------------
>
> Good afternoon,
>
> While trying to import a GTiff and process it with spgrass6 with the
> following:
>
> execGRASS("r.in.gdal", flags=c("o","overwrite"),
> parameters=list(input="E:/Boulot/WildlifeTrianglesFinland/Covariates/Rainfall/Rain.year1989.tif",
> output="ref", band=1))
>
> or
>
> execGRASS("r.in.gdal", flags=c("o","overwrite"),
> parameters=list(input="E:/Boulot/WildlifeTrianglesFinland/Covariates/Rainfall/Rain.year1989.tif",
> output="ref", band="1"))
>
> I get
>
>
> Error in doGRASS(cmd, flags = flags, parameters = parameters) :
>   Parameter <band> does not have integer value

You specified band="1" , which is a character - try band=1

Disclaimer" I have never used r.in.gdal

Cheers,

Rainer
>
> When I do not specify the band value, the two bands of this GTiff are
> imported properly....
> Any idea ?
>
>
> Alex
>
> P.S.:
>
>
>> traceback()
> 3: stop(paste("Parameter <", names(parameters)[i], "> does not have integer
> value",
>        sep = ""))
> 2: doGRASS(cmd, flags = flags, parameters = parameters)
> 1: execGRASS("r.in.gdal", flags = c("o", "overwrite"), parameters =
> list(input =
> "E:/Boulot/WildlifeTrianglesFinland/Covariates/Rainfall/Rain.year1989.tif",
>        output = "ref", band = 1))
>> sessionInfo()
> R version 2.12.1 (2010-12-16)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United
> Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
> [4] LC_NUMERIC=C                            LC_TIME=English_United
> Kingdom.1252
>
> attached base packages:
> [1] grDevices datasets  splines   graphics  stats     tcltk     utils
> methods   base
>
> other attached packages:
> [1] spgrass6_0.6-23 XML_3.2-0.2     rgdal_0.6-33    sp_0.9-78
> svSocket_0.9-51 TinnR_1.0.3     R2HTML_2.2      Hmisc_3.8-3
> [9] survival_2.36-2
>
> loaded via a namespace (and not attached):
> [1] cluster_1.13.3  grid_2.12.1     lattice_0.19-13 svMisc_0.9-61
> tools_2.12.1
>
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats
>
>



-- 
NEW GERMAN FAX NUMBER!!!

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:           +27 - (0)83 9479 042
Fax:            +27 - (0)86 516 2782
Fax:            +49 - (0)321 2125 2244
email:          Rainer at krugs.de

Skype:          RMkrug
Google:         R.M.Krug at gmail.com


More information about the grass-stats mailing list