Annuncio: tutti i progetti non commerciali registrati per l'utilizzo di Earth Engine prima del
15 aprile 2025 devono
verificare l'idoneità non commerciale per mantenere l'accesso a Earth Engine.
ee.Reducer.percentile
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Crea un riduttore che calcoli i percentili specificati. Ad esempio, dato [0, 50, 100], produrrà output denominati "p0", "p50" e "p100" con il minimo, la mediana e il massimo rispettivamente. Per un numero ridotto di input (fino a maxRaw), i percentili verranno calcolati direttamente; per un numero maggiore di input, i percentili verranno derivati da un istogramma.
Utilizzo | Resi |
---|
ee.Reducer.percentile(percentiles, outputNames, maxBuckets, minBucketWidth, maxRaw) | Riduttore |
Argomento | Tipo | Dettagli |
---|
percentiles | Elenco | Un elenco di numeri compresi tra 0 e 100. |
outputNames | Elenco, valore predefinito: null | Un elenco di nomi per gli output o null per ottenere i nomi predefiniti. |
maxBuckets | Numero intero, valore predefinito: null | Il numero massimo di bucket da utilizzare durante la creazione di un istogramma; verrà arrotondato per eccesso a una potenza di 2. |
minBucketWidth | Float, valore predefinito: null | La larghezza minima del bucket dell'istogramma o null per consentire qualsiasi potenza di 2. |
maxRaw | Numero intero, valore predefinito: null | Il numero di valori da accumulare prima di creare l'istogramma iniziale. |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 2025-07-26 UTC."],[[["\u003cp\u003eThis reducer calculates specified percentiles (e.g., minimum, median, maximum) from a set of input values.\u003c/p\u003e\n"],["\u003cp\u003eFor smaller datasets, percentiles are computed directly; for larger datasets, a histogram-based approach is used for efficiency.\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the percentiles to compute, output band names, and fine-tune the histogram construction parameters.\u003c/p\u003e\n"]]],["The `ee.Reducer.percentile` function computes specified percentiles from a dataset. It accepts a list of `percentiles` (0-100) and optional `outputNames`. For large datasets, it builds a histogram with a `maxBuckets` limit and `minBucketWidth`. For smaller datasets (up to `maxRaw`), it computes percentiles directly. The function returns a Reducer, producing outputs with names like 'p0', 'p50', etc., representing the corresponding percentiles. The user can set custom names or null for defaults.\n"],null,["# ee.Reducer.percentile\n\nCreate a reducer that will compute the specified percentiles, e.g. given \\[0, 50, 100\\] will produce outputs named 'p0', 'p50', and 'p100' with the min, median, and max respectively. For small numbers of inputs (up to maxRaw) the percentiles will be computed directly; for larger numbers of inputs the percentiles will be derived from a histogram.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------------------------------------------------------------------|---------|\n| `ee.Reducer.percentile(percentiles, `*outputNames* `, `*maxBuckets* `, `*minBucketWidth* `, `*maxRaw*`)` | Reducer |\n\n| Argument | Type | Details |\n|------------------|------------------------|-----------------------------------------------------------------------------------------------------|\n| `percentiles` | List | A list of numbers between 0 and 100. |\n| `outputNames` | List, default: null | A list of names for the outputs, or null to get default names. |\n| `maxBuckets` | Integer, default: null | The maximum number of buckets to use when building a histogram; will be rounded up to a power of 2. |\n| `minBucketWidth` | Float, default: null | The minimum histogram bucket width, or null to allow any power of 2. |\n| `maxRaw` | Integer, default: null | The number of values to accumulate before building the initial histogram. |"]]