Thông báo: Tất cả dự án phi thương mại đã đăng ký sử dụng Earth Engine trước 
ngày 15 tháng 4 năm 2025 phải 
xác minh điều kiện sử dụng phi thương mại để duy trì quyền truy cập. Nếu bạn chưa xác minh trước ngày 26 tháng 9 năm 2025, quyền truy cập của bạn có thể bị tạm ngưng.
  
        
 
       
     
  
  
  
    
  
  
  
    
      ee.FeatureCollection.sort
    
    
      
    
    
      
      Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
    
    
      
      Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
  
  
Sắp xếp một bộ sưu tập theo thuộc tính đã chỉ định.
Trả về bộ sưu tập đã sắp xếp.
| Cách sử dụng | Giá trị trả về | 
|---|
| FeatureCollection.sort(property, ascending) | Bộ sưu tập | 
| Đối số | Loại | Thông tin chi tiết | 
|---|
| this: collection | Bộ sưu tập | Phiên bản Bộ sưu tập. | 
| property | Chuỗi | Thuộc tính để sắp xếp. | 
| ascending | Boolean, không bắt buộc | Có sắp xếp theo thứ tự tăng dần hay giảm dần hay không.  Giá trị mặc định là true (tăng dần). | 
  
  
  Ví dụ
  
    
  
  
    
    
  
  
  
  
    
    
    
      Trình soạn thảo mã (JavaScript)
    
    
  // 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));
  
    
  
  
    
  
  
  
  
    
  
    
  Thiết lập Python
  Hãy xem trang 
    Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.
  import ee
import geemap.core as geemap
  
    
    
      Colab (Python)
    
    
  # FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
    'country_lg == "Belgium"')
display('Belgium power plants in ascending order by capacity:',
        fc.sort('capacitymw'))
display('Belgium power plants in descending order by capacity:',
        fc.sort('capacitymw', False))
  
  
  
  
  
 
  
    
    
      
       
    
    
  
  
  Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
  Cập nhật lần gần đây nhất: 2025-10-30 UTC.
  
  
  
    
      [null,null,["Cập nhật lần gần đây nhất: 2025-10-30 UTC."],[],["The `sort` method arranges a collection by a given property. It takes the property name (string) as a required argument and an optional boolean `ascending` (defaulting to `true`) to specify the sort order.  The method returns the sorted collection.  Examples demonstrate sorting a FeatureCollection of Belgian power plants by 'capacitymw' in both ascending and descending order. The method works both in javascript and Python.\n"]]