Earth Engine ha introdotto
livelli di quota non commerciali per salvaguardare le risorse di calcolo condivise e garantire prestazioni affidabili per tutti. I progetti non commerciali utilizzano il livello Community per impostazione predefinita, anche se puoi modificare il livello di un progetto in qualsiasi momento.
Google utilizza la tecnologia AI per tradurre i contenuti nella tua lingua preferita. Le traduzioni generate dall'AI potrebbero contenere errori.
ee.FeatureCollection.sort
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Ordina una raccolta in base alla proprietà specificata.
Restituisce la raccolta ordinata.
| Utilizzo | Resi |
|---|
FeatureCollection.sort(property, ascending) | Raccolta |
| Argomento | Tipo | Dettagli |
|---|
this: collection | Raccolta | L'istanza Collection. |
property | Stringa | La proprietà in base alla quale ordinare. |
ascending | Booleano, facoltativo | Indica se l'ordinamento deve essere crescente o decrescente. Il valore predefinito è true (ordine crescente). |
Esempi
Editor di codice (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));
Configurazione di Python
Consulta la pagina
Ambiente Python per informazioni sull'API Python e sull'utilizzo di
geemap per lo sviluppo interattivo.
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))
[null,null,["Ultimo aggiornamento 2026-11-05 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"]]