Merging multiple rasters in R

后端 未结 7 1250
傲寒
傲寒 2021-02-01 19:43

I\'ve been trying to find a time-efficient way to merge multiple raster images in R. These are adjacent ASTER scenes from the southern Kilimanjaro region, and my target is to pu

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 19:56

    I was faced with this same problem and I used

    #Read desired files into R
    data_name1<-'file_name1.tif' 
    
    r1=raster(data_name1)
    
    data_name2<-'file_name2.tif'
    
    r2=raster(data_name2)
    
    #Merge files
    new_data <- raster::merge(r1, r2)
    

    Although it did not produce a new merged raster file, it stored in the data environment and produced a merged map when plotted.

提交回复
热议问题