Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.ImageCollection.linkCollection
Stay organized with collections
Save and categorize content based on your preferences.
Links images in this collection to matching images from
imageCollection
.
For each source image in this collection, any specified bands or metadata will be added to the source image from the matching image found in
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.
Matches 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.
This 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
'joining', see https://developers.google.com/earth-engine/guides/joins_intro.
Returns the linked image collection.
Usage | Returns | ImageCollection.linkCollection(imageCollection, linkedBands, linkedProperties, matchPropertyName) | ImageCollection |
Argument | Type | Details | this: imagecollection | ImageCollection | The ImageCollection instance. |
imageCollection | ImageCollection | The image collection searched to find matches from this collection. |
linkedBands | List<String>, optional | Optional list of band names to add or update from matching images. |
linkedProperties | List<String>, optional | Optional list of metadata properties to add or update from matching images. |
matchPropertyName | String, optional | The metadata property name to use as a match criteria. Defaults to "system:index". |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-08 UTC.
[null,null,["Last updated 2025-07-08 UTC."],[[["\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\". |"]]