ee.FeatureCollection.makeArray

একটি 1-D অ্যারেতে প্রতিটি বৈশিষ্ট্যের জন্য বৈশিষ্ট্যগুলির একটি তালিকা একত্রিত করে একটি সংগ্রহের প্রতিটি বৈশিষ্ট্যে একটি 1-D অ্যারে যুক্ত করুন৷ সমস্ত বৈশিষ্ট্য অবশ্যই সাংখ্যিক মান হতে হবে। যদি কোনও বৈশিষ্ট্যে সমস্ত নামযুক্ত বৈশিষ্ট্য না থাকে, বা তাদের মধ্যে যেকোনও সংখ্যাসূচক না হয়, তাহলে বৈশিষ্ট্যটি ফলাফল সংগ্রহ থেকে বাদ দেওয়া হবে।

ব্যবহার রিটার্নস
FeatureCollection. makeArray (properties, name ) ফিচার কালেকশন
যুক্তি টাইপ বিস্তারিত
এই: collection ফিচার কালেকশন ইনপুট সংগ্রহ যা থেকে বৈশিষ্ট্য নির্বাচন করা হবে।
properties তালিকা বৈশিষ্ট্য নির্বাচন করুন.
name স্ট্রিং, ডিফল্ট: "অ্যারে" নতুন অ্যারের সম্পত্তির নাম।

উদাহরণ

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

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

পাইথন সেটআপ

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

import ee
import geemap.core as geemap

Colab (পাইথন)

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