ee.FeatureCollection.sort

নির্দিষ্ট সম্পত্তি দ্বারা একটি সংগ্রহ সাজান.

সাজানো সংগ্রহ ফেরত দেয়।

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

উদাহরণ

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

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

print('Belgium power plants in ascending order by capacity',
      fc.sort('capacitymw'));

print('Belgium power plants in descending order by capacity',
      fc.sort('capacitymw', false));

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য 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"')

print('Belgium power plants in ascending order by capacity:',
      fc.sort('capacitymw').getInfo())

print('Belgium power plants in descending order by capacity:',
      fc.sort('capacitymw', False).getInfo())