公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.ImageCollection.linkCollection
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
将此集合中的图片与
imageCollection
中的匹配图片相关联。
对于此集合中的每个源图片,系统会将找到的匹配图片中的任何指定波段或元数据添加到源图片中
imageCollection
。如果已存在波段或元数据,则会被覆盖。如果未找到匹配的图片,则任何新的或更新的波段都将被完全遮盖,并且任何新的或更新的元数据都将为 null。输出覆盖区将与源图片覆盖区相同。
如果来源图片和 imageCollection
中的图片具有特定的等效元数据属性,则视为匹配。如果多个集合图片都匹配,则所选的集合图片是任意的。默认情况下,系统会根据图片的“system:index”元数据属性进行匹配。
此关联函数是一种便捷方法,用于根据指定的共享元数据属性将波段添加到目标图像,旨在支持关联对同一来源图像应用不同处理/产品生成的集合。如需更具表现力的链接,请参阅
“联接”的详细信息,请参阅 https://developers.google.com/earth-engine/guides/joins_intro。
返回关联的图片集合。
用法 | 返回 |
---|
ImageCollection.linkCollection(imageCollection, linkedBands, linkedProperties, matchPropertyName) | ImageCollection |
参数 | 类型 | 详细信息 |
---|
此:imagecollection | ImageCollection | ImageCollection 实例。 |
imageCollection | ImageCollection | 搜索的图片集合,用于查找此集合中的匹配项。 |
linkedBands | List<String>,可选 | 要从匹配的图片中添加或更新的乐队名称的可选列表。 |
linkedProperties | List<String>,可选 | 要从匹配的图片中添加或更新的可选元数据属性列表。 |
matchPropertyName | 字符串,可选 | 要用作匹配条件的元数据属性名称。默认为“system:index”。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe \u003ccode\u003elinkCollection\u003c/code\u003e function connects images in one collection to matching images in another based on shared metadata.\u003c/p\u003e\n"],["\u003cp\u003eIt adds or updates bands and metadata in the first collection using information from matching images in the second collection.\u003c/p\u003e\n"],["\u003cp\u003eMatching images are identified by a specified metadata property, with "system:index" as the default.\u003c/p\u003e\n"],["\u003cp\u003eUnmatched images will have masked bands and null metadata for newly added or updated properties.\u003c/p\u003e\n"],["\u003cp\u003eThis function simplifies linking images derived from the same source but with different processing applied.\u003c/p\u003e\n"]]],[],null,["# ee.ImageCollection.linkCollection\n\n\u003cbr /\u003e\n\nLinks images in this collection to matching images from `imageCollection`.\n\n\u003cbr /\u003e\n\nFor each source image in this collection, any specified bands or metadata will be added to the source image from the matching image found in\n\n`imageCollection`. If bands or metadata are already present, they will be overwritten. If matching images are not found, any new or updated bands will be fully masked and any new or updated metadata will be null. The output footprint will be the same as the source image footprint.\n\nMatches are determined if a source image and an image in `imageCollection` have a specific equivalent metadata property. If more than one collection image would match, the collection image selected is arbitrary. By default, images are matched on their 'system:index' metadata property.\n\nThis linking function is a convenience method for adding bands to target images based on a specified shared metadata property and is intended to support linking collections that apply different processing/product generation to the same source imagery. For more expressive linking known as\n\n'joining', see https://developers.google.com/earth-engine/guides/joins_intro.\n\nReturns the linked image collection.\n\n| Usage | Returns |\n|-------------------------------------------------------------------------------------------------------------------|-----------------|\n| ImageCollection.linkCollection`(imageCollection, `*linkedBands* `, `*linkedProperties* `, `*matchPropertyName*`)` | ImageCollection |\n\n| Argument | Type | Details |\n|-------------------------|--------------------------|------------------------------------------------------------------------------------|\n| this: `imagecollection` | ImageCollection | The ImageCollection instance. |\n| `imageCollection` | ImageCollection | The image collection searched to find matches from this collection. |\n| `linkedBands` | List\\\u003cString\\\u003e, optional | Optional list of band names to add or update from matching images. |\n| `linkedProperties` | List\\\u003cString\\\u003e, optional | Optional list of metadata properties to add or update from matching images. |\n| `matchPropertyName` | String, optional | The metadata property name to use as a match criteria. Defaults to \"system:index\". |"]]