公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.List.map
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
将算法映射到列表。该算法应接受一个对象并返回一个对象。
用法 | 返回 |
---|
List.map(baseAlgorithm, dropNulls) | 列表 |
参数 | 类型 | 详细信息 |
---|
此:list | 列表 | |
baseAlgorithm | 算法 | |
dropNulls | 布尔值,默认值:false | 如果为 true,则允许映射的算法返回 null,并且将舍弃返回 null 的元素。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003e\u003ccode\u003eList.map()\u003c/code\u003e applies a given algorithm to each element of a list, transforming the original list into a new one with the results.\u003c/p\u003e\n"],["\u003cp\u003eThe provided \u003ccode\u003ebaseAlgorithm\u003c/code\u003e should accept an object as input and return a modified object as output.\u003c/p\u003e\n"],["\u003cp\u003eBy enabling the optional \u003ccode\u003edropNulls\u003c/code\u003e parameter, you can filter out elements from the resulting list where the algorithm returns null.\u003c/p\u003e\n"]]],[],null,["# ee.List.map\n\nMap an algorithm over a list. The algorithm is expected to take an Object and return an Object.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------------|---------|\n| List.map`(baseAlgorithm, `*dropNulls*`)` | List |\n\n| Argument | Type | Details |\n|-----------------|-------------------------|------------------------------------------------------------------------------------------------------------------------|\n| this: `list` | List | |\n| `baseAlgorithm` | Algorithm | |\n| `dropNulls` | Boolean, default: false | If true, the mapped algorithm is allowed to return nulls, and the elements for which it returns nulls will be dropped. |"]]