本错误主要是对影像进行重采样,但是这里的问题在我们要对影像进行分析而不是影像集合,所以才会报错reduceResolution is not a function。我们首先来看以下函数:
reduceResolution(reducer, bestEffort, maxPixels)
Enables 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.
The 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', etc.).
Reducer input weights will be