R: Write RasterStack and preserve layer names

前端 未结 3 1395
你的背包
你的背包 2021-02-01 18:20

I have a raster stack, stk, consisting of three raster images in R. Here is a simple example

# set up a raster stack with three layers
> library(         


        
3条回答
  •  长情又很酷
    2021-02-01 19:07

    A bit late but might help someone else looking for a possible solution:

    writeRaster(stk, filename=names(stk), bylayer=TRUE,format="GTiff")
    

提交回复
热议问题