公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Reducer.fixed2DHistogram
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
创建一个 reducer,该 reducer 将使用固定数量的定宽箱来计算输入的二维直方图。系统会忽略任一轴上 [min, max) 范围之外的值。输出是一个二维计数数组,以及两个一维存储分区下限数组(分别对应于 x 轴和 y 轴)。此缩减器适合按像素使用,但始终不加权。任何区段的最大计数为 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 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\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. |"]]