1

I am stuck on the water package. The example code I am following is at this website https://cran.r-project.org/web/packages/water/vignettes/Landsat8.html. I am using my own data and am able to read both my original landsat image and the surface reflectance image with my area of interests (aoi). I get the following error when I use this code.

hot.and.cold <- calcAnchors(image = image.TOAr, Ts = Ts, LAI = LAI, plots = F, albedo = albedo, Z.om = Z.om, n = 1, anchors.method = "flexible",
+                             WeatherStation =  WeatherStation, verbose = F)

Error in .local(x, ...) : 
  RasterLayer has no NA cells (for which to compute a distance)
MrFlick
  • 195,160
  • 17
  • 277
  • 295
  • Welcome to StackOverflow. In order for us being able to provide useful help on this Q, please have a look at [how to make a good R example](https://stackoverflow.com/q/5963269/3250126) and [edit](https://stackoverflow.com/posts/52102107/edit) your question accordingly. Thus, we can help you with this specific problem. – loki Sep 01 '18 at 10:00

0 Answers0