Home > Mobile >  read NASADEM .slope file into R and change format to .tif file
read NASADEM .slope file into R and change format to .tif file

Time:01-04

I downloaded some tiles using enter image description here

This tile did not seem to have no data values; in other tiles you may need to set it with the NAflag argument in makeVRT or by using NAflag(x) <- on single layer SpatRaster

For aspect, it looks like you could use scale=0.01 to get values between 0 and 360 degrees)

To merge many tiles for say aspect, you should be able to do something like

fasp <- grep("aspect", fvrt, value=TRUE)
x <- src(lapply(fasp, rast))
m <- merge(x)

To read the files with raster

library(raster)
s <- stack(fvrt)
  •  Tags:  
  • Related