ee.FeatureCollection.set
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
किसी एलिमेंट की एक या उससे ज़्यादा मेटाडेटा प्रॉपर्टी को बदल देता है.
ओवरराइड की गई प्रॉपर्टी वाले एलिमेंट को दिखाता है.
इस्तेमाल | रिटर्न |
---|
FeatureCollection.set(var_args) | एलिमेंट |
आर्ग्यूमेंट | टाइप | विवरण |
---|
यह: element | एलिमेंट | एलिमेंट इंस्टेंस. |
var_args | VarArgs<Object> | प्रॉपर्टी की डिक्शनरी या प्रॉपर्टी का वैरग सीक्वेंस, जैसे कि key1, value1, key2, value2, ... |
उदाहरण
कोड एडिटर (JavaScript)
// An empty FeatureCollection for simple demonstration.
var fc = ee.FeatureCollection([]);
// Set a single new property using a key-value pair.
fc = fc.set('key_1', 'value 1');
// Set multiple new properties using a series of key-value pairs.
fc = fc.set('key_2', 'value 2',
'key_3', 3);
// Set new properties using a dictionary of key-value pairs.
fc = fc.set({
key_5: ee.Array([1, 2, 3]),
key_6: ee.Image(0),
key_7: ee.Feature(null)
});
print('New FeatureCollection properties added', fc);
// Overwrite an existing property.
fc = fc.set('key_1', 'overwritten');
print('FeatureCollection property overwritten', fc);
Python सेटअप
Python API के बारे में जानकारी पाने और इंटरैक्टिव डेवलपमेंट के लिए geemap
का इस्तेमाल करने के लिए,
Python एनवायरमेंट पेज देखें.
import ee
import geemap.core as geemap
Colab (Python)
from pprint import pprint
# An empty FeatureCollection for simple demonstration.
fc = ee.FeatureCollection([])
# Set a single new property using a key-value pair.
fc = fc.set('key_1', 'value 1')
# Set multiple new properties using a series of key-value pairs.
fc = fc.set('key_2', 'value 2', 'key_3', 3)
# Set new properties using a dictionary of key-value pairs.
fc = fc.set({
'key_5': ee.Array([1, 2, 3]),
'key_6': ee.Image(0),
'key_7': ee.Feature(None)
})
print('New FeatureCollection properties added:')
pprint(fc.getInfo())
# Overwrite an existing property.
fc = fc.set('key_1', 'overwritten')
print('FeatureCollection property overwritten:')
pprint(fc.getInfo())
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (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,["# ee.FeatureCollection.set\n\n\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--------\n\n### Code 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\n### Colab (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```"]]