ui.Chart.image.regions
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.
Tạo biểu đồ từ hình ảnh. Trích xuất và vẽ giá trị của từng dải trong một hoặc nhiều khu vực.
– Trục X = Dải được gắn nhãn bằng xProperty (mặc định: tên dải).
– Trục Y = Đầu ra của bộ giảm tốc.
– Chuỗi = Khu vực được gắn nhãn bằng seriesProperty (mặc định: "system:index").
Trả về một biểu đồ.
Cách sử dụng | Giá trị trả về |
---|
ui.Chart.image.regions(image, regions, reducer, scale, seriesProperty, xLabels) | ui.Chart |
Đối số | Loại | Thông tin chi tiết |
---|
image | Hình ảnh | Hình ảnh để trích xuất các giá trị dải tần. |
regions | Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry>, không bắt buộc | Các khu vực cần giảm. Giá trị mặc định là dấu vết của hình ảnh. |
reducer | Tấm dốc, không bắt buộc | Hàm giảm tạo(các) giá trị cho trục y. Phải trả về một giá trị duy nhất cho mỗi dải tần. |
scale | Số, không bắt buộc | Tỷ lệ pixel tính bằng mét. |
seriesProperty | Chuỗi, không bắt buộc | Thuộc tính sẽ được dùng làm nhãn cho từng khu vực trong chú giải. Mặc định là "system:index". |
xLabels | List<Object>, không bắt buộc | Danh sách nhãn dùng cho các dải trên trục x. Phải có cùng số phần tử như các dải hình ảnh. Nếu bạn bỏ qua bước này, các dải tần sẽ được gắn nhãn bằng tên của chúng. Nếu nhãn là số (ví dụ: bước sóng), thì trục x sẽ liên tục. |
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-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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. |"]]