ui.Chart.image.regions
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Generuje wykres na podstawie obrazu. Wyodrębnia i wykreśla wartość każdego pasma w co najmniej 1 regionie.
– Oś X = pasmo oznaczone etykietą xProperty (domyślnie: nazwa pasma).
- Oś Y = dane wyjściowe reduktora.
– Series = Region oznaczony etykietą przez seriesProperty (domyślnie: „system:index”).
Zwraca wykres.
Wykorzystanie | Zwroty |
---|
ui.Chart.image.regions(image, regions, reducer, scale, seriesProperty, xLabels) | ui.Chart |
Argument | Typ | Szczegóły |
---|
image | Obraz | Obraz, z którego mają być wyodrębniane wartości pasm. |
regions | Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry>, opcjonalny | Regiony do zmniejszenia. Domyślnie jest to obszar zajmowany przez obraz. |
reducer | Ograniczenie (opcjonalnie) | Funkcja redukująca, która generuje wartości na osi Y. Musi zwracać jedną wartość na pasmo. |
scale | Numer, opcjonalny | Skala pikseli w metrach. |
seriesProperty | Ciąg znaków, opcjonalnie | Właściwość, która ma być używana jako etykieta każdego regionu w legendzie. Domyślna wartość to „system:index”. |
xLabels | List<Object>, opcjonalnie | Lista etykiet używanych w przypadku pasm na osi X. Musi zawierać taką samą liczbę elementów jak pasma obrazu. Jeśli nie podasz nazwy, pasma zostaną oznaczone swoimi nazwami. Jeśli etykiety są numeryczne (np. długości fal), oś X będzie ciągła. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eGenerates a chart visualizing the values of image bands within specified regions, plotted against band labels or custom x-axis labels.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define regions for analysis, the reducer for calculating band values, pixel scale, legend labels, and custom x-axis labels for the chart.\u003c/p\u003e\n"],["\u003cp\u003eThe chart's y-axis represents the reducer output, while the x-axis represents either band names or user-defined labels, and separate series are plotted for each region.\u003c/p\u003e\n"],["\u003cp\u003eThe function accepts an image, regions, a reducer, scale, series property for legend labels, and custom x-axis labels as input parameters.\u003c/p\u003e\n"],["\u003cp\u003eIt outputs a chart object displaying the extracted and plotted band values.\u003c/p\u003e\n"]]],[],null,["# ui.Chart.image.regions\n\n\u003cbr /\u003e\n\nGenerates a Chart from an image. Extracts and plots the value of each band in one or more regions.\n\n\u003cbr /\u003e\n\n- X-axis = Band labeled by xProperty (default: band name).\n\n- Y-axis = Reducer output.\n\n- Series = Region labeled by seriesProperty (default: 'system:index').\n\nReturns a chart.\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------------------------------|----------|\n| `ui.Chart.image.regions(image, `*regions* `, `*reducer* `, `*scale* `, `*seriesProperty* `, `*xLabels*`)` | ui.Chart |\n\n| Argument | Type | Details |\n|------------------|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `image` | Image | Image to extract band values from. |\n| `regions` | Feature\\|FeatureCollection\\|Geometry\\|List\\\u003cFeature\\\u003e\\|List\\\u003cGeometry\\\u003e, optional | Regions to reduce. Defaults to the image's footprint. |\n| `reducer` | Reducer, optional | Reducer that generates the value(s) for the y-axis. Must return a single value per band. |\n| `scale` | Number, optional | The pixel scale in meters. |\n| `seriesProperty` | String, optional | Property to be used as the label for each region in the legend. Defaults to 'system:index'. |\n| `xLabels` | List\\\u003cObject\\\u003e, optional | A list of labels used for bands on the x-axis. Must have the same number of elements as the image bands. If omitted, bands will be labeled with their names. If the labels are numeric (e.g. wavelengths), x-axis will be continuous. |"]]