ui.Chart.image.regions
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างแผนภูมิจากรูปภาพ ดึงข้อมูลและพล็อตค่าของแต่ละแบนด์ในภูมิภาคอย่างน้อย 1 แห่ง
- แกน X = แถบที่ติดป้ายกำกับโดย xProperty (ค่าเริ่มต้น: ชื่อแถบ)
- แกน Y = เอาต์พุตของตัวลด
- ชุดข้อมูล = ภูมิภาคที่ติดป้ายกำกับโดย seriesProperty (ค่าเริ่มต้น: "system:index")
แสดงผลแผนภูมิ
การใช้งาน | การคืนสินค้า |
---|
ui.Chart.image.regions(image, regions, reducer, scale, seriesProperty, xLabels) | ui.Chart |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
image | รูปภาพ | รูปภาพที่จะดึงค่าแถบความถี่ |
regions | Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry>, ไม่บังคับ | ภูมิภาคที่จะลด ค่าเริ่มต้นคือร่องรอยของรูปภาพ |
reducer | แผ่นปิดพื้น (ไม่บังคับ) | ตัวลดที่สร้างค่าสำหรับแกน y ต้องแสดงค่าเดียวต่อแบนด์ |
scale | หมายเลข (ไม่บังคับ) | มาตราส่วนพิกเซลในหน่วยเมตร |
seriesProperty | สตริง ไม่บังคับ | พร็อพเพอร์ตี้ที่จะใช้เป็นป้ายกำกับสำหรับแต่ละภูมิภาคในคำอธิบาย ค่าเริ่มต้นคือ "system:index" |
xLabels | List<Object> (ไม่บังคับ) | รายการป้ายกำกับที่ใช้สำหรับแถบบนแกน X ต้องมีจำนวนองค์ประกอบเท่ากับแถบรูปภาพ หากไม่ระบุ ระบบจะติดป้ายกำกับวงดนตรีด้วยชื่อของวง หากป้ายกำกับเป็นตัวเลข (เช่น ความยาวคลื่น) แกน x จะต่อเนื่อง |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 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. |"]]