ee.FeatureCollection.select

একটি সংগ্রহে প্রতিটি বৈশিষ্ট্য থেকে বৈশিষ্ট্য নির্বাচন করুন. শুধুমাত্র স্ট্রিং আর্গুমেন্ট দিয়ে এই ফাংশনটিকে কল করাও সম্ভব; এগুলিকে সম্পত্তি নির্বাচক (varargs) হিসাবে ব্যাখ্যা করা হবে।

নির্বাচিত বৈশিষ্ট্য সহ বৈশিষ্ট্য সংগ্রহ প্রদান করে।

ব্যবহার রিটার্নস
FeatureCollection. select (propertySelectors, newProperties , retainGeometry ) ফিচার কালেকশন
যুক্তি টাইপ বিস্তারিত
এটি: featurecollection ফিচার কালেকশন ফিচার কালেকশনের উদাহরণ।
propertySelectors তালিকা<স্ট্রিং> নাম বা রেজেক্সের একটি তালিকা যা নির্বাচন করার জন্য গুণাবলী উল্লেখ করে।
newProperties তালিকা<স্ট্রিং>, ঐচ্ছিক আউটপুট বৈশিষ্ট্যের জন্য নতুন নামের একটি তালিকা। নির্বাচিত প্রপার্টির সংখ্যার সাথে মিলতে হবে।
retainGeometry বুলিয়ান, ঐচ্ছিক মিথ্যা হলে, ফলাফলে একটি NULL জ্যামিতি থাকবে। ডিফল্ট থেকে সত্য।

উদাহরণ

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

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

// Select a single property.
var singleProp = fc.select('fuel1');
print('Single property selected',
      singleProp.first());

// Select multiple properties.
var multiProp = fc.select(['fuel1', 'capacitymw']);
print('Multiple properties selected',
      multiProp.first());

// Select multiple properties and rename them.
var multiPropRename = fc.select({
  propertySelectors: ['fuel1', 'capacitymw'],
  newProperties: ['Fuel_1', 'Capacity_MW']
});
print('Multiple properties selected, renamed',
      multiPropRename.first());

// Select multiple properties, remove geometry.
var multiPropNoGeom = fc.select({
  propertySelectors: ['fuel1', 'capacitymw'],
  retainGeometry: false
});
print('Multiple properties selected, geometry removed',
      multiPropNoGeom.first());

পাইথন সেটআপ

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

import ee
import geemap.core as geemap

Colab (পাইথন)

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

# Select a single property.
single_prop = fc.select('fuel1')
print('Single property selected:', single_prop.first().getInfo())

# Select multiple properties.
multi_prop = fc.select(['fuel1', 'capacitymw'])
print('Multiple properties selected:', multi_prop.first().getInfo())

# Select multiple properties and rename them.
multi_prop_rename = fc.select(**{
    'propertySelectors': ['fuel1', 'capacitymw'],
    'newProperties': ['Fuel_1', 'Capacity_MW']
    })
print('Multiple properties selected, renamed:',
      multi_prop_rename.first().getInfo())

# Select multiple properties, remove geometry.
multi_prop_no_geom = fc.select(**{
    'propertySelectors': ['fuel1', 'capacitymw'],
    'retainGeometry': False
    })
print('Multiple properties selected, geometry removed:',
      multi_prop_no_geom.first().getInfo())