Pengumuman: Semua project nonkomersial yang terdaftar untuk menggunakan Earth Engine sebelum
15 April 2025 harus
memverifikasi kelayakan nonkomersial untuk mempertahankan akses Earth Engine.
ee.Reducer.fixed2DHistogram
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Membuat peredam yang akan menghitung histogram 2D dari input menggunakan sejumlah tetap bin lebar tetap. Nilai di luar rentang [min, maks) pada salah satu sumbu akan diabaikan. Outputnya adalah array 2D dari jumlah, dan 2 array 1D dari tepi bawah bucket untuk xAxis dan yAxis. Pengurang ini cocok untuk digunakan per piksel, tetapi selalu tidak berbobot. Jumlah maksimum untuk bucket apa pun adalah 2^31 - 1.
Penggunaan | Hasil |
---|
ee.Reducer.fixed2DHistogram(xMin, xMax, xSteps, yMin, yMax, ySteps) | Pengurang |
Argumen | Jenis | Detail |
---|
xMin | Float | Batas bawah (inklusif) bucket pertama pada sumbu X. |
xMax | Float | Batas atas (eksklusif) bucket terakhir pada sumbu X. |
xSteps | Bilangan Bulat | Jumlah bucket yang akan digunakan pada sumbu X. |
yMin | Float | Batas bawah (inklusif) bucket pertama pada sumbu Y. |
yMax | Float | Batas atas (eksklusif) bucket terakhir pada sumbu Y. |
ySteps | Bilangan Bulat | Jumlah bucket yang akan digunakan pada sumbu Y. |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 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. |"]]