[R-sig-Geo] package raster stack function do not work

Rafael Wüest rafael.wueest at wsl.ch
Fri Jan 20 19:12:02 CET 2012


You might need the right combination of R, GDAL, rgdal and tell R how to install properly.

The following may help. I want to state that I neither now the author of www.kyngchaos.com and its packages, nor do I anyhow profit from mentioning the website. It just helps me get R and GDAL running smoothly on my Mac...

1) install R version 2.13.2

2) install "GDAL complete" from http://www.kyngchaos.com/software:frameworks

3) download and unzip rgdal which matches with the R version your http://www.kyngchaos.com/software:frameworks

4) open shell, goto folder where you have unzipped rgdal:

R CMD INSTALL --configure-args='--with-gdal-config=/Library/Frameworks/GDAL.framework/Versions/1.8/Programs/gdal-config --with-proj-include=/opt/local/include --with-proj-lib=/opt/local/lib' rgdal

This works for me...

Rafa


On 20.01.2012, at 19:03, Sara Maxwell wrote:

> Hi Rafael
> I am working on Mac 10.7.2 (Lion).
> 
> Cheers,
> Tara
> 
> On Fri, Jan 20, 2012 at 9:53 AM, Tara Bridwell <tarabridwell at gmail.com> wrote:
> I have also been having difficulties in the raster package.  I had a
> hard drive crash and installed 2.13 on my new computer but had
> difficulty with the rgdal package, so I switched back to 2.12.  Now I
> am finding that things like zlim are not working in the raster package
> plot functions, and that some of my output is inexplicably blurry
> (just raster data, nothing else) despite using identical code to what
> worked prior to my computer switch.
> 
> Does anyone have any suggestions as to how to reconcile these differences?
> 
> Cheers,
> Tara
> 
> On Fri, Jan 20, 2012 at 9:42 AM, Rafael Wüest <rafael.wueest at wsl.ch> wrote:
> > Hi Carsten,
> >
> > I recently had the same issue, updating R (in my case to 2.13.2) helped!
> >
> > Rafael
> >
> > On 20.01.2012, at 17:51, Carsten Neumann wrote:
> >
> >> Dear raster users,
> >>
> >> I updated to the newest raster package and instantly all my scripts including stack() and subsequently plot() functions do not worked anymore. The error message after plotting is:
> >>
> >>
> >> d1<-stack('Hasenheide_RGB.img')
> >> plot(d1,3)
> >>
> >> ############################################################################
> >> Error in function (classes, fdef, mtable)  :
> >>  unable to find an inherited method for function "extent", for signature "NULL"
> >> In addition: Warning messages:
> >> In intersect(extent(x), extent(y)) : Objects do not overlap
> >> ###########################################################################
> >>
> >> I did it with several multidimensional rasters that provide allways the same error message. Where is the problem?
> >>
> >> ################################################################################
> >> sessionInfo()
> >> R version 2.12.1 (2010-12-16)
> >> Platform: x86_64-unknown-linux-gnu (64-bit)
> >>
> >> locale:
> >> [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
> >> [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C
> >> [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
> >> [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
> >> [9] LC_ADDRESS=C               LC_TELEPHONE=C
> >> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
> >>
> >> attached base packages:
> >> [1] stats     graphics  grDevices utils     datasets  methods   base
> >>
> >> other attached packages:
> >> [1] raster_1.9-64   gstat_1.0-10    spacetime_0.5-7 xts_0.8-2
> >> [5] zoo_1.7-6       rgdal_0.7-5     sp_0.9-91       lattice_0.19-13
> >>
> >> loaded via a namespace (and not attached):
> >> [1] grid_2.12.1  tcltk_2.12.1 tools_2.12.1
> >> ################################################################################
> >>
> >> Greetings
> >>
> >> Carsten
> >>
> >> --
> >>
> >> Carsten Neumann
> >> Telegrafenberg, A 17 01.13
> >> 14473 Potsdam
> >> -------------------------------------------------------
> >> Helmholtz Centre Potsdam
> >> GFZ German Research Centre for Geosciences
> >> Department 1 - Section 1.4 - Remote Sensing
> >> -------------------------------------------------------
> >> Tel.: +49 (0) 331 288 1766
> >> e-mail: carstenn at gfz-potsdam.de
> >>
> >> _______________________________________________
> >> R-sig-Geo mailing list
> >> R-sig-Geo at r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
> >
> >
> > --
> > Rafael Wüest
> > Swiss Federal Research Institute WSL
> > Zürcherstrasse 111
> > 8903 Birmensdorf
> > Switzerland
> >
> > +41 44 7392126
> > rafael.wueest at wsl.ch
> > http://www.wsl.ch/info/mitarbeitende/wueest
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 



--
Rafael Wüest
Swiss Federal Research Institute WSL
Zürcherstrasse 111
8903 Birmensdorf
Switzerland

+41 44 7392126
rafael.wueest at wsl.ch
http://www.wsl.ch/info/mitarbeitende/wueest



More information about the R-sig-Geo mailing list