I have 2 raster images of the same area. One raster represents temperature and the other raster gives NDVI details. I want to correlate between NDVI and Temperature. I tried with ArcGIS using band statistics tool which is giving covariance and correlation coefficient values. Along with the values I want to plot them (Scatter plot i.e., temperature vs NDVI). Can some one please guide me in achieving this. Thankyou.
答案 0 :(得分:1)
使用R
,您可以执行以下操作:
library(raster)
b <- brick(system.file("external/rlogo.grd", package="raster"))
layerStats(b, 'pearson')
#$`pearson correlation coefficient`
# red green blue
#red 1.0000000 0.9980961 0.9501633
#green 0.9980961 1.0000000 0.9658011
#blue 0.9501633 0.9658011 1.0000000
#$mean
# red green blue
#182.2855 185.3509 192.8046
plot(b[[1]], b[[2]])
pairs(b)