Google Earth Engine(GEE)——如何正确理解和使用flatten函数

很多时候我们无法正常使用EE中的函数,其实我们只要一个个函数去实验和练习,就很快能掌握每一个函数,本次我们来详细看看flatten函数的使用。这次我们假设有几个土地分类的训练样本分别产看我们使用flatten和不适用flatten的结果进行对比,但是我们这里要注意,如果直接使用GEE中的画图工具进行选点的时候,默认给的属性是geometry,但我们其实需要的每一类都是一个矢量集合,所以我们要将属性设定为矢量集合featurecollection。

函数:

flatten()

Flattens collections of collections.

Arguments:

this:collection (FeatureCollection):

The input collection of collections.

Returns: FeatureCollection

展平()
展平集合的集合。

参数:
这个:集合(FeatureCollection):
集合的输入集合。

返回:FeatureCollection

代码:

var sea = /* color: #d63000 */ee.Fea

猜你喜欢

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