I have a few hundreds of .tiff files that I converted as a raster stack. However, when I tried reading the file, it is classified as a RasterLayer. I was expecting it to be a RasterStack. The functions that I would use to my usual raster stack won't work i.e. subset(). Also when I convert it as.data.frame, it only give me the xy coordinates and the value of the raster. Did I make a wrong decision of stacking my rasters? Any hints on how to break down my rasters layers?

Btw, my raster looks like this: 
class      : RasterLayer 
band       : 1  (of  414  bands)
dimensions : 605, 973, 588665  (nrow, ncol, ncell)
resolution : 231.6564, 231.6564  (x, y)
extent     : 11267070, 11492472, 1355190, 1495342  (xmin, xmax, ymin, ymax)
crs        : +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs 
source     : /Users/manuel/UWThesis/RCodes/files/KTpostdam_evi.tif 
names      : KTpostdam_evi 
values     : -19030000, 79780000  (min, max)

A little more information would prove useful to help answer your question. What language are you using, and what function are you using to import your data? I will base my answer on the assumption you are using R with the raster library and the raster function to import your .tif files. If you want your tif files to come in as a stack, use the raster::stack() fucntion.

stackTif <- stack(file.choose())

This will create a raster stack rather than a raster layer file.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.