powered by
matchCount counts distinct pixel pairs for CDL raster images with same extents and resolution.
matchCount
matchCount(x, y, m = 256)
A matrix with pixel counts by unique ordered CDL crop pairs in x and y.
A CDL raster image.
A bound for the max enumeration of CDL categories. The default is 256.
Jonathan Lisic, jlisic@gmail.com
if (FALSE) { z1 <- matrix( rep(c(1,4),8), nrow=4) z2 <- matrix( rep(c(1:4),4), nrow=4) r1 <- raster(z1) r2 <- raster(z2) a <- matchCount(r1,r2) }
Run the code above in your browser using DataLab