ee.FeatureCollection.select

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

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

ব্যবহার রিটার্নস
FeatureCollection. select (propertySelectors, newProperties , retainGeometry ) বৈশিষ্ট্য সংগ্রহ
যুক্তি আদর্শ বিস্তারিত
এটি: featurecollection বৈশিষ্ট্য সংগ্রহ 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

কোলাব (পাইথন)

# 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')
display('Single property selected:', single_prop.first())

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

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

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