ee.FeatureCollection.makeArray

हर सुविधा के लिए, प्रॉपर्टी की सूची को एक डाइमेंशन वाले ऐरे में मिलाकर, कलेक्शन में मौजूद हर सुविधा के लिए एक डाइमेंशन वाला ऐरे जोड़ें. सभी प्रॉपर्टी की वैल्यू, संख्या में होनी चाहिए. अगर किसी सुविधा में बताई गई सभी प्रॉपर्टी शामिल नहीं हैं या उनमें से कोई भी संख्यात्मक नहीं है, तो सुविधा को नतीजे के तौर पर मिले कलेक्शन से हटा दिया जाएगा.

इस्तेमालरिटर्न
FeatureCollection.makeArray(properties, name)FeatureCollection
आर्ग्यूमेंटटाइपविवरण
यह: collectionFeatureCollectionइनपुट कलेक्शन, जिससे प्रॉपर्टी चुनी जाएंगी.
propertiesसूचीचुनी जाने वाली प्रॉपर्टी.
nameस्ट्रिंग, डिफ़ॉल्ट: "array"ऐरे वाली नई प्रॉपर्टी का नाम.

उदाहरण

कोड एडिटर (JavaScript)

// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
            .filter('country_lg == "Belgium"');

// A list of feature properties to combine into an array
// (power generation by year).
var properties = ['gwh_2013', 'gwh_2014', 'gwh_2015', 'gwh_2016'];

// Add array of power-generation-by-year property to features.
fc = fc.makeArray(properties, 'gwh_by_year');

print('FeatureCollection with array of selected properties added', fc);
print('See example of new "gwh_by_year" property', fc.first().toDictionary());

Python सेटअप करना

Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए, Python एनवायरमेंट पेज देखें.

import ee
import geemap.core as geemap

Colab (Python)

from pprint import pprint

# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
    'country_lg == "Belgium"')

# A list of feature properties to combine into an array
# (power generation by year).
properties = ['gwh_2013', 'gwh_2014', 'gwh_2015', 'gwh_2016']

# Add array of power-generation-by-year property to features.
fc = fc.makeArray(properties, 'gwh_by_year')

print('FeatureCollection with array of selected properties added:',
      fc.getInfo())
print('See example of new "gwh_by_year" property:')
pprint(fc.first().toDictionary().getInfo())