我尝试将新功能添加到大型功能集合中,但使用函数 set() 将整个列表覆盖到每个功能。但我的目的是将数组中的每个值添加到相应的 FeatureCollection 中。有谁能够帮助我?
var table = ee.FeatureCollection(ft:.....blablabla);
**//Create an Array from the property DN in the FeatureCollection:**
var propert = table.limit(100).aggregate_array('DN');
*// Values less than 1 will be set to 1, larger than 1== 0:*
var limit = ee.Array(propert).lt(1);
print(limit);
//Function, that add the list! of features (limit) to new property (Class) in the FeatureCollection ("table").
var addFeature = function(ar) {
return ar.set({Class: limit});
//Map throw the Featurecollection table
var areaAdded = table.limit(100).map(addArea);
};
所以,如果你能看到,我的代码将整个数组 [limit] 添加到 FeatureCollection 中的每个属性,而不是数组中的第一个值到第一个属性等等......有人可以帮我吗?谢谢你