公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.reduceResolution
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用给定的精简器启用重投影,以合并与每个输出像素对应的所有输入像素。如果精简器的输入源只有一个,则会单独应用于集合的每个波段;否则,其输入源的数量必须与输入源图像的波段数量相同。
缩减器的输出名称决定了输出波段的名称:具有多个输入的缩减器将直接使用输出名称;具有单个输入和单个输出的缩减器将保留输入波段名称;具有单个输入和多个输出的缩减器将在输出名称前添加输入波段名称作为前缀(例如,'10_mean'、'10_stdDev'、'20_mean'、'20_stdDev')。
Reducer 输入权重将是输入掩码与输入像素覆盖的输出像素的分数的乘积。
用法 | 返回 |
---|
Image.reduceResolution(reducer, bestEffort, maxPixels) | 图片 |
参数 | 类型 | 详细信息 |
---|
此:image | 图片 | 输入图片。 |
reducer | 缩减器 | 要应用的缩减器,用于合并像素。 |
bestEffort | 布尔值,默认值:false | 如果使用默认分辨率的输入需要过多的像素,请从允许操作成功的金字塔级别开始,使用已减少的输入像素。 |
maxPixels | 整数,默认值:64 | 要为每个输出像素组合的输入像素数量上限。如果将此值设置得过大,会导致内存不足问题。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThis operation reprojects images using a reducer to combine input pixels for each output pixel, applying it per band or across bands based on reducer input.\u003c/p\u003e\n"],["\u003cp\u003eOutput band names are determined by the reducer's output names, sometimes preserving, prefixing, or directly using them.\u003c/p\u003e\n"],["\u003cp\u003eInput pixel weights are calculated using input mask and fractional output pixel coverage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ereduceResolution\u003c/code\u003e method takes an image, reducer, and optional parameters for handling large operations, returning a reprojected image.\u003c/p\u003e\n"],["\u003cp\u003eOptional parameters \u003ccode\u003ebestEffort\u003c/code\u003e and \u003ccode\u003emaxPixels\u003c/code\u003e control memory usage and allow for processing large images by adjusting input resolution and pixel combination limits.\u003c/p\u003e\n"]]],[],null,["# ee.Image.reduceResolution\n\nEnables reprojection using the given reducer to combine all input pixels corresponding to each output pixel. If the reducer has a single input, it will be applied separately to each band of the collection; otherwise it must have the same number of inputs as the input image has bands.\n\n\u003cbr /\u003e\n\nThe reducer output names determine the names of the output bands: reducers with multiple inputs will use the output names directly, reducers with a single input and single output will preserve the input band names, and reducers with a single input and multiple outputs will prefix the output name with the input band name (e.g., '10_mean', '10_stdDev', '20_mean', '20_stdDev').\n\nReducer input weights will be the product of the input mask and the fraction of the output pixel covered by the input pixel.\n\n| Usage | Returns |\n|-------------------------------------------------------------------|---------|\n| Image.reduceResolution`(reducer, `*bestEffort* `, `*maxPixels*`)` | Image |\n\n| Argument | Type | Details |\n|---------------|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The input image. |\n| `reducer` | Reducer | The reducer to apply to be used for combining pixels. |\n| `bestEffort` | Boolean, default: false | If using the input at its default resolution would require too many pixels, start with already-reduced input pixels from a pyramid level that allows the operation to succeed. |\n| `maxPixels` | Integer, default: 64 | The maximum number of input pixels to combine for each output pixel. Setting this too large will cause out-of-memory problems. |"]]