Google Earth Engine (GEE)——波段运算要注意的问题(将多个波段合并缩放到指定的scale中)

很多时候我们如果想要改变多个波段的波段名称,我们就可以选择将其一起处理,不需要单独映射转换参数。不需要迭代或映射一个函数。数学运算按波段运行,你可以在多波段图像上应用它们。选择波段,缩放它们,然后在一个单一的调用中加入所有的波段。用到的函数:

select(var_args)

Selects bands from an image.

Returns an image with the selected bands.

Arguments:

this:image (Image):

The Image instance.

var_args (VarArgs<Object>):

One of two possibilities:

  • Any number of non-list arguments. All of these will be interpreted as band selectors. These can be band names, regexes, or numeric indices. E.g. selected = image.select('a', 'b', 3, 'd');

  • Two lists. The first will be used as band selectors and the second as new names for the selected bands. The number of new names must match the number of selected bands. E.g. selected = image.select(['a', 4], ['newA', 'newB']);

Returns: Image

猜你喜欢

转载自blog.csdn.net/qq_31988139/article/details/128597252