公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.ImageCollection.map
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
将算法映射到集合。
返回映射的集合。
用法 | 返回 |
---|
ImageCollection.map(algorithm, dropNulls) | 集合 |
参数 | 类型 | 详细信息 |
---|
此:collection | 集合 | Collection 实例。 |
algorithm | 函数 | 要对集合中的图片或特征进行映射的操作。一个 JavaScript 函数,用于接收图片或特征并返回一个。该函数仅被调用一次,结果会作为说明捕获,因此它无法执行命令式操作或依赖外部状态。 |
dropNulls | 布尔值,可选 | 如果为 true,则允许映射的算法返回 null,并且将舍弃返回 null 的元素。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eApplies a user-defined function (algorithm) to each element within an ImageCollection.\u003c/p\u003e\n"],["\u003cp\u003eReturns a new collection containing the results of applying the algorithm to each element.\u003c/p\u003e\n"],["\u003cp\u003eOptionally allows for removing elements where the algorithm returns null values using the \u003ccode\u003edropNulls\u003c/code\u003e parameter.\u003c/p\u003e\n"]]],[],null,["# ee.ImageCollection.map\n\n\u003cbr /\u003e\n\nMaps an algorithm over a collection.\n\n\u003cbr /\u003e\n\nReturns the mapped collection.\n\n| Usage | Returns |\n|-------------------------------------------------|------------|\n| ImageCollection.map`(algorithm, `*dropNulls*`)` | Collection |\n\n| Argument | Type | Details |\n|--------------------|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | Collection | The Collection instance. |\n| `algorithm` | Function | The operation to map over the images or features of the collection. A JavaScript function that receives an image or features and returns one. The function is called only once and the result is captured as a description, so it cannot perform imperative operations or rely on external state. |\n| `dropNulls` | Boolean, optional | If true, the mapped algorithm is allowed to return nulls, and the elements for which it returns nulls will be dropped. |"]]