ee.FeatureCollection.limit

একটি সংগ্রহকে নির্দিষ্ট সংখ্যক উপাদানের মধ্যে সীমাবদ্ধ করুন, ঐচ্ছিকভাবে প্রথমে একটি নির্দিষ্ট সম্পত্তি দ্বারা বাছাই করুন।

সীমিত সংগ্রহ ফেরত দেয়।

ব্যবহার রিটার্নস
FeatureCollection. limit (max, property , ascending ) সংগ্রহ
যুক্তি টাইপ বিস্তারিত
এই: collection সংগ্রহ সংগ্রহের উদাহরণ।
max সংখ্যা সংগ্রহ সীমিত করার সংখ্যা।
property স্ট্রিং, ঐচ্ছিক বাছাই করা সম্পত্তি, যদি সাজানো হয়।
ascending বুলিয়ান, ঐচ্ছিক আরোহী বা অবরোহ ক্রমে সাজাতে হবে কিনা। ডিফল্ট সত্য (আরোহী)।

উদাহরণ

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

// FeatureCollection of global power plants.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants');

print('First 5 features (power plants)', fc.limit(5));

print('Smallest 5 power plants by capacity in ascending order',
      fc.limit({max: 5, property: 'capacitymw'}));

print('Largest 5 power plants by capacity in descending order',
      fc.limit({max: 5, property: 'capacitymw', ascending: false}));

পাইথন সেটআপ

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

import ee
import geemap.core as geemap

Colab (পাইথন)

# FeatureCollection of global power plants.
fc = ee.FeatureCollection('WRI/GPPD/power_plants')

print('First 5 features (power plants):', fc.limit(5).getInfo())

print('Smallest 5 power plants by capacity in ascending order:',
      fc.limit(**{'maximum': 5, 'opt_property': 'capacitymw'}).getInfo())

print('Largest 5 power plants by capacity in descending order:',
      fc.limit(**{'maximum': 5, 'opt_property': 'capacitymw',
                  'opt_ascending': False}).getInfo())