ui.Chart.image.byRegion
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างแผนภูมิจากรูปภาพ ดึงและพล็อตค่าแถบในภูมิภาคอย่างน้อย 1 แห่งในรูปภาพ โดยแต่ละแถบจะอยู่ในอนุกรมแยกกัน
- แกน X = ภูมิภาคที่ติดป้ายกำกับโดย xProperty (ค่าเริ่มต้น: 'system:index')
- แกน Y = เอาต์พุตของตัวลด
- Series = ชื่อวง
แสดงผลแผนภูมิ
การใช้งาน | การคืนสินค้า |
---|
ui.Chart.image.byRegion(image, regions, reducer, scale, xProperty) | ui.Chart |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
image | รูปภาพ | รูปภาพที่จะดึงค่าแถบความถี่ |
regions | Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry>, ไม่บังคับ | ภูมิภาคที่จะลด ค่าเริ่มต้นคือร่องรอยของรูปภาพ |
reducer | แผ่นปิดพื้น (ไม่บังคับ) | ตัวลดที่สร้างค่าสำหรับแกน y ต้องแสดงค่าเดียวต่อแบนด์ ค่าเริ่มต้นคือ ee.Reducer.mean() |
scale | หมายเลข (ไม่บังคับ) | มาตราส่วนที่จะใช้กับตัวลดในหน่วยเมตร |
xProperty | สตริง ไม่บังคับ | พร็อพเพอร์ตี้ที่จะใช้เป็นป้ายกำกับสำหรับแต่ละภูมิภาคในแกน X ค่าเริ่มต้นคือ "system:index" |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eGenerates a chart that visualizes band values within specified regions of an image.\u003c/p\u003e\n"],["\u003cp\u003eCharts display band values on the y-axis, region labels on the x-axis, and separate series for each band.\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the chart by defining regions, specifying a reducer for calculations, setting a scale, and choosing a property for x-axis labels.\u003c/p\u003e\n"],["\u003cp\u003eThe default reducer is \u003ccode\u003eee.Reducer.mean()\u003c/code\u003e, and the default x-axis property is \u003ccode\u003e'system:index'\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns a \u003ccode\u003eui.Chart\u003c/code\u003e object.\u003c/p\u003e\n"]]],["The core functionality involves creating a chart from an image by extracting and plotting band values from specified regions. Users define `image`, `regions`, `reducer`, `scale`, and `xProperty`. It extracts band values, uses the provided `reducer` to compute a single y-value per band, which are then plotted as separate series. `regions` are labeled on the x-axis, based on the provided `xProperty`. The chart plots the reduced values per band in different regions, returning a `ui.Chart` object.\n"],null,["# ui.Chart.image.byRegion\n\n\u003cbr /\u003e\n\nGenerates a Chart from an image. Extracts and plots band values in one or more regions in the image, with each band in a separate series.\n\n\u003cbr /\u003e\n\n- X-axis = Region labeled by xProperty (default: 'system:index')\n\n- Y-axis = Reducer output.\n\n- Series = Band name.\n\nReturns a chart.\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------------|----------|\n| `ui.Chart.image.byRegion(image, `*regions* `, `*reducer* `, `*scale* `, `*xProperty*`)` | 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. Defaults to ee.Reducer.mean(). |\n| `scale` | Number, optional | Scale to use with the reducer in meters. |\n| `xProperty` | String, optional | Property to be used as the label for each Region on the x-axis. Defaults to 'system:index'. |"]]