[R-sig-Geo] Any reason to not use brick() on a single-band raster?

Jonathan Greenberg jgrn at illinois.edu
Fri Oct 18 22:16:14 CEST 2013


R-sig-geo'ers:

I was curious: is there any practical reason to not use brick() on a
single-band raster (efficiency hits, for instance)?  The reason I'm
asking is that I'm working on some functions that return a single or a
multi-band output, and rather than doing an if(nlayers(x)==1)
raster(x) else brick(x); I was going to make it easier and just always
returning brick(x).

--j

-- 
Jonathan A. Greenberg, PhD
Assistant Professor
Global Environmental Analysis and Remote Sensing (GEARS) Laboratory
Department of Geography and Geographic Information Science
University of Illinois at Urbana-Champaign
259 Computing Applications Building, MC-150
605 East Springfield Avenue
Champaign, IL  61820-6371
Phone: 217-300-1924
http://www.geog.illinois.edu/~jgrn/
AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307, Skype: jgrn3007



More information about the R-sig-Geo mailing list