0

I have tried to do that on Rstudio using the "Trapezoidal rule".

library(raster)
library(rgdal)
library(sp)
a <-raster("D:Soildata/SOC_0-5mos.tif")
b <-raster("D:Soildata/SOC_5-15mos.tif")
c <-raster("D:Soildata/SOC_15-30mos.tif")
d <-(5-0)*(a)
e <-(15-5)*(b)
f <-(30-15)*(c)
z <-(d+e+f)/30.5
plot(z)
setwd("D:Soildata/soilmosaic")
z_fac <-writeRaster(z, filename = "SOC_mosaic.tif", format="GTiff",overwrite=TRUE)
exp
exp(z)

Needs to know whether this method is correct or not.

1
  • If you wish to also ask about ArcGIS Desktop then please do that in a separate question.
    – PolyGeo
    Jul 29 at 11:31

0

Your Answer

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

Browse other questions tagged or ask your own question.