ee.Reducer.fixed2DHistogram
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างตัวลดที่จะคำนวณฮิสโทแกรม 2 มิติของอินพุตโดยใช้จำนวนคงที่ของกลุ่มที่มีความกว้างคงที่ ระบบจะไม่สนใจค่าที่อยู่นอกช่วง [min, max) ในแกนใดแกนหนึ่ง เอาต์พุตคืออาร์เรย์ 2 มิติของจำนวน และอาร์เรย์ 1 มิติ 2 รายการของขอบเขตล่างของกลุ่มสำหรับ xAxis และ yAxis ตัวลดนี้เหมาะสำหรับการใช้งานต่อพิกเซล แต่จะไม่มีการถ่วงน้ำหนักเสมอ จำนวนสูงสุดสำหรับที่เก็บข้อมูลใดๆ คือ 2^31 - 1
การใช้งาน | การคืนสินค้า |
---|
ee.Reducer.fixed2DHistogram(xMin, xMax, xSteps, yMin, yMax, ySteps) | ตัวลดตำแหน่ง |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
xMin | ทศนิยม | ขอบเขตล่าง (รวม) ของที่เก็บข้อมูลแรกในแกน X |
xMax | ทศนิยม | ขอบเขตบน (ไม่รวม) ของกลุ่มสุดท้ายในแกน X |
xSteps | จำนวนเต็ม | จำนวนที่เก็บข้อมูลที่จะใช้ในแกน X |
yMin | ทศนิยม | ขอบเขตล่าง (รวม) ของที่เก็บข้อมูลแรกในแกน Y |
yMax | ทศนิยม | ขอบเขตบน (ไม่รวม) ของกลุ่มสุดท้ายในแกน Y |
ySteps | จำนวนเต็ม | จำนวนกลุ่มที่จะใช้ในแกน Y |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eCreates a 2D histogram with a fixed number of bins for analyzing data distribution across two dimensions.\u003c/p\u003e\n"],["\u003cp\u003eIgnores values outside the defined range on either axis and limits the maximum count per bucket to 2^31 - 1.\u003c/p\u003e\n"],["\u003cp\u003eOutputs a 2D array of counts, along with 1D arrays for the x and y axis bucket boundaries.\u003c/p\u003e\n"],["\u003cp\u003eSuitable for per-pixel use but doesn't incorporate weighting.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the range and number of bins for both x and y axes using the \u003ccode\u003eee.Reducer.fixed2DHistogram\u003c/code\u003e function.\u003c/p\u003e\n"]]],[],null,["# ee.Reducer.fixed2DHistogram\n\nCreates a reducer that will compute a 2D histogram of the inputs using a fixed number of fixed-width bins. Values outside of the \\[min, max) range on either axis are ignored. The output is a 2D array of counts, and 2 1-D arrays of bucket lower edges for the xAxis and the yAxis. This reducer is suitable for use per-pixel, however it is always unweighted. The maximum count for any bucket is 2\\^31 - 1.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------------------|---------|\n| `ee.Reducer.fixed2DHistogram(xMin, xMax, xSteps, yMin, yMax, ySteps)` | Reducer |\n\n| Argument | Type | Details |\n|----------|---------|----------------------------------------------------------------|\n| `xMin` | Float | The lower (inclusive) bound of the first bucket on the X axis. |\n| `xMax` | Float | The upper (exclusive) bound of the last bucket on the X axis. |\n| `xSteps` | Integer | The number of buckets to use on the X axis. |\n| `yMin` | Float | The lower (inclusive) bound of the first bucket on the Y axis. |\n| `yMax` | Float | The upper (exclusive) bound of the last bucket on the Y axis. |\n| `ySteps` | Integer | The number of buckets to use on the Y axis. |"]]