Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-08 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eset()\u003c/code\u003e method overrides or adds metadata properties to an Element, such as a FeatureCollection.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts either a dictionary of key-value pairs or a sequence of key-value pairs as arguments.\u003c/p\u003e\n"],["\u003cp\u003eExisting properties can be overwritten by calling \u003ccode\u003eset()\u003c/code\u003e with the same key and a new value.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eset()\u003c/code\u003e method returns a new Element with the modified properties, leaving the original Element unchanged.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nOverrides one or more metadata properties of an Element.\n\n\u003cbr /\u003e\n\nReturns the element with the specified properties overridden.\n\n| Usage | Returns |\n|-----------------------------------|---------|\n| FeatureCollection.set`(var_args)` | Element |\n\n| Argument | Type | Details |\n|-----------------|-------------------|-------------------------------------------------------------------------------------------------------------|\n| this: `element` | Element | The Element instance. |\n| `var_args` | VarArgs\\\u003cObject\\\u003e | Either a dictionary of properties, or a vararg sequence of properties, e.g. key1, value1, key2, value2, ... |\n\nExamples\n\nCode Editor (JavaScript) \n\n```javascript\n// An empty FeatureCollection for simple demonstration.\nvar fc = ee.FeatureCollection([]);\n\n// Set a single new property using a key-value pair.\nfc = fc.set('key_1', 'value 1');\n\n// Set multiple new properties using a series of key-value pairs.\nfc = fc.set('key_2', 'value 2',\n 'key_3', 3);\n\n// Set new properties using a dictionary of key-value pairs.\nfc = fc.set({\n key_5: ee.Array([1, 2, 3]),\n key_6: ee.Image(0),\n key_7: ee.Feature(null)\n});\nprint('New FeatureCollection properties added', fc);\n\n// Overwrite an existing property.\nfc = fc.set('key_1', 'overwritten');\nprint('FeatureCollection property overwritten', fc);\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\nColab (Python) \n\n```python\nfrom pprint import pprint\n\n# An empty FeatureCollection for simple demonstration.\nfc = ee.FeatureCollection([])\n\n# Set a single new property using a key-value pair.\nfc = fc.set('key_1', 'value 1')\n\n# Set multiple new properties using a series of key-value pairs.\nfc = fc.set('key_2', 'value 2', 'key_3', 3)\n\n# Set new properties using a dictionary of key-value pairs.\nfc = fc.set({\n 'key_5': ee.Array([1, 2, 3]),\n 'key_6': ee.Image(0),\n 'key_7': ee.Feature(None)\n})\nprint('New FeatureCollection properties added:')\npprint(fc.getInfo())\n\n# Overwrite an existing property.\nfc = fc.set('key_1', 'overwritten')\nprint('FeatureCollection property overwritten:')\npprint(fc.getInfo())\n```"]]