Google Earth Engine(GEE)——在GEE中围绕光栅创建一个缓冲区超限问题的解决,使用cumulativeCost()替代focal()

我想在红树林栅格中的红树林斑块周围创建一个10公里的缓冲区。我已经尝试了很多方法,但都不能奏效。我试着把栅格转换为矢量,但在我需要的分辨率(30米)下,它太大了,而且计算超时了。我还试着用focal.max工具,但这似乎取决于我所使用的缩放级别,因此只能捕获某些斑块。

原始代码:

//import Mangroves of the World   
var MangroveImage = ee.ImageCollection('LANDSAT/MANGROVE_FORESTS') 

//select the image from the mangrove dataset 
var mangrove = ee.Image(MangroveImage.first());

//buffer around mangroves 
var mangrove_buffer = mangrove.focal_max({
radius: 10000,
kernelType: 'circle',
units:'meters',
iterations: 1
})

原始函数:

focalMax(radiuskernelTypeunitsiterationskernel)

Applies a morphological reducer() filter to each band of an image using a named or custom kernel.

Arguments:

this:image (Image):

The image t

猜你喜欢

转载自blog.csdn.net/qq_31988139/article/details/131212872
今日推荐