应用 reducer.mean() 后图像 returns 具有/不同的标称比例 ()

Image returns w/ different nominalScale() after applying reducer.mean()

我正在编写一个简单的脚本来从 ImageCollection() 中获取平均值。为此,我使用 ImageCollection.reduce(ee.Reducer.mean()).

我的问题是返回的图像带有不同的 nominalScale()

我已经查看了文档,但无法弄清楚为什么会这样。如您所见on ee.ImageCollection.reducer() there is no parameter specifying the scale; nor on ee.Reducer.mean().

我做错了什么? 同样,我基本上是在尝试做一些事情,比如 this. Actually this tutorial 显示了一张让我相信我不会改变像素分辨率的图像...

我的代码:

var WorldClim = ee.ImageCollection("WORLDCLIM/V1/MONTHLY");
print("WorldClim original", WorldClim.first().projection().nominalScale());
var WorldClim = WorldClim.select("prec");
print("Apenas prec:", WorldClim.first().projection().nominalScale());
var MeanPrec = WorldClim.reduce(ee.Reducer.mean());
print("Após reduce(ee.Reducer.mean())", MeanPrec.projection().nominalScale());

https://code.earthengine.google.com/3e3bff9030fd9ff70b052b2beb4daced

这很可能是由于图像的图像金字塔。由于平均图像只是内存缓冲区中的一个临时对象,因此它不应该有一个基本的标称比例,并且因为瓦片是根据您的地图当前所处的任何缩放级别计算的。 但是,如果您特别想使用源图像的分辨率,则有一种方法可以解决此问题。您基本上必须将图像重新投影到与原始图像相同的图像。一种方法是将计算平均值的行更改为

var MeanPrec = WorldClim.reduce(ee.Reducer.mean()).reproject({
  crs:WorldClim.first().projection(),
  scale:WorldClim.first().projection().nominalScale()
});