[R-sig-Geo] spgrass6 "r.in.wms"

Roger Bivand Roger.Bivand at nhh.no
Wed Jul 20 13:54:40 CEST 2011

On Tue, 19 Jul 2011, dman wrote:

> All,
> I'm trying to get some .wms info to plug into a process I have developed in
> R.
> Has anyone tried to implement "r.in.wms" via R opened within GRASS? Here is
> my swing at it.
> http://r-sig-geo.2731867.n2.nabble.com/file/n6600318/question_to_r-sig_re_wms.txt
> question_to_r-sig_re_wms.txt
> the error is around the maxrow, and maxcol not being integers. Is this a
> issue of using "list"? or possibly something else?

Your input:

pars<-list(mapserver="http://wms.jpl.nasa.gov/wms.cgi", format="jpeg",
   maxrows=5, maxcols=5, method="nearest")

is not correct. When GRASS wants an integer, it has to be an integer. The 
command works with:

pars<-list(mapserver="http://wms.jpl.nasa.gov/wms.cgi", format="jpeg",
   maxrows=as.integer(5), maxcols=as.integer(5), method="nearest")


pars<-list(mapserver="http://wms.jpl.nasa.gov/wms.cgi", format="jpeg",
   maxrows=5L, maxcols=5L, method="nearest")

where 5L defines an integer constant.



a numeric constant, and


If you need WMS access directly from R, and if your GDAL is build with WMS 
support, you may also be able to use readGDAL() or similar rgdal functions 

Hope this helps,


> As per, your august help and guidance is much appreciated.
> D
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/spgrass6-r-in-wms-tp6600318p6600318.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

More information about the R-sig-Geo mailing list