ee.FeatureCollection.set

একটি উপাদানের এক বা একাধিক মেটাডেটা বৈশিষ্ট্য ওভাররাইড করে।

নির্দিষ্ট বৈশিষ্ট্য ওভাররাইড করে উপাদান প্রদান করে।

ব্যবহার রিটার্নস
FeatureCollection. set (var_args) উপাদান
যুক্তি টাইপ বিস্তারিত
এই: element উপাদান উপাদান উদাহরণ.
var_args VarArgs<অবজেক্ট> হয় বৈশিষ্ট্যগুলির একটি অভিধান, অথবা বৈশিষ্ট্যগুলির একটি ভারার্গ ক্রম, যেমন key1, value1, key2, value2, ...

উদাহরণ

কোড এডিটর (জাভাস্ক্রিপ্ট)

// 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);

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

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())