ui.Chart.image.regions
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
יוצר תרשים מתמונה. הפונקציה מחלצת את הערך של כל פס באזור אחד או יותר ומציגה אותו בגרף.
– ציר X = פס שמתויג על ידי xProperty (ברירת מחדל: שם הפס).
– ציר ה-Y = פלט של סף הפרשי הגובה.
- Series = Region labeled by seriesProperty (default: 'system:index').
מחזירה תרשים.
שימוש | החזרות |
---|
ui.Chart.image.regions(image, regions, reducer, scale, seriesProperty, xLabels) | ui.Chart |
ארגומנט | סוג | פרטים |
---|
image | תמונה | התמונה שממנה יחולצו ערכי הפס. |
regions | Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry>, אופציונלי | אזורים לצמצום. ברירת המחדל היא טביעת הרגל של התמונה. |
reducer | סף הפרשי גובה, אופציונלי | פונקציית Reducer שמייצרת את הערכים לציר ה-y. הפונקציה צריכה להחזיר ערך יחיד לכל פס. |
scale | מספר, אופציונלי | קנה המידה של הפיקסלים במטרים. |
seriesProperty | מחרוזת, אופציונלי | המאפיין שישמש כתווית לכל אזור במקרא. ברירת המחדל היא 'system:index'. |
xLabels | List<Object>, אופציונלי | רשימת התוויות שמשמשות לתיאור הטווחים בציר ה-X. מספר הרכיבים צריך להיות זהה למספר הפסים בתמונה. אם לא מציינים את השמות, הלהקות יסומנו בשמות שלהן. אם התוויות הן מספריות (למשל, אורכי גל), ציר ה-X יהיה רציף. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 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. |"]]