FeatureCollection
GEE之FeatureCollection入门操作1
FeatureCollection
FeatureCollection 区域选择,点选。
FilterMetadata
官方函数:
Shortcuts to filter a collection by metadata. This is equivalent to this.filter(ee.Filter.metadata(...)).
Returns the filtered collection.
Arguments:
this:collection (Collection):
The Collection instance.
name (String):
The name of a property to filter.
operator (String):
The name of a comparison operator. Possible values are: "equals", "less_than", "greater_than",
"not_equals", "not_less_than", "not_greater_than", "starts_with",
"ends_with", "not_starts_with", "not_ends_with", "contains",
"not_contains".
value (Object):
- The value to compare against.
Returns: Collection
用法
输入参数有3个,第一个是选择的属性名字,第二个是判断符号(等于,小于等),第三个是目标值。 比如
filterMetadata('flag','equals','false')
//option
"equals", "less_than", "greater_than","not_equals", "not_less_than", "not_greater_than",
"starts_with","ends_with", "not_starts_with", "not_ends_with", "contains","not_contains".
就是选择 flag等于false的feature
如果点集FeatureCollection ,还可以用filterBounds() 去选择区域;跟ImageCollection 同理。
如果有一个点集和矢量集合,而直接在GEE中运行会内存不足,则可以通过filterMetadata选择矢量集合中单个feature,从而可以进行循环;然后求geometry属性,选择Bounds区域 ,从点集合中选择出对应feature中的点集。
var eft = table.filterMetadata('flag','equals',4);
var roi = eft.geometry();
var cepo = table2.filterBounds(roi);
这样就可以大区域变小区域,进行循环,提取数值等。
这篇博客介绍了Google Earth Engine(GEE)中FeatureCollection的FilterMetadata方法,用于根据特征集合的元数据进行筛选。内容包括如何通过指定属性名、比较运算符和目标值来过滤FeatureCollection,并展示了如何利用此方法结合filterBounds()缩小处理区域,以便于处理大区域数据。此外,还提及了这种方法在处理内存限制问题时的应用。
1148

被折叠的 条评论
为什么被折叠?



