Google Earth Engine(GEE)——如何替换掉GEE中函数默认给你生成的波段名称(regexpRename函数)

很多时候我们会使用GEE中的很多波段,除了我们用rename()我们还可以用一个函数regexpRename进行

函数:

regexpRename(regex, replacement, all)

Renames the bands of an image by applying a regular expression replacement to the current band names. Any bands not matched by the regex will be copied over without renaming.

通过将正则表达式替换到当前的频段名称上,重命名一张图像的频段。任何没有被正则表达式匹配的波段将被复制过来而不被重命名。 

Arguments:

this:input (Image):

The image containing the bands to rename.

regex (String):

A regular expression to match in each band name.

replacement (String):

The text with which to replace each match. Supports $n syntax for captured values.

all (Boolean, default: true):

If true, all matches in a given string will be replaced. Otherwise, only the first match in each string will be replaced.

Returns: Image

ee.Algor

猜你喜欢

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