METRIC.EB Error in .local(x, …) : RasterLayer has no NA cells (for which to compute a distance)

假如想象 提交于 2019-12-12 03:53:30

问题


I am stuck on the Energy Balance calculation of 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.

Energy.Balance <- METRIC.EB(image.DN = image, image.SR = image.SR,
                        plain=TRUE, aoi=aoi, n = 5, WeatherStation = WeatherStation, 
                        ETp.coef = 1.2, sat="L8", alb.coeff = "Olmedo", LST.method = "SW", 
                        LAI.method = "metric2010", Z.om.ws = 0.03, MTL = MTLfile)


Error in .local(x, ...):RasterLayer has no NA cells (for which to compute a distance)

回答1:


This sounds like a problem when searching for the anchor pixels. Can you try updating to the lastest version of water package (0.7) and adding anchors.method = 'flexible' to function METRIC.EB()?



来源:https://stackoverflow.com/questions/44349742/metric-eb-error-in-localx-rasterlayer-has-no-na-cells-for-which-to-co

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!