【问题标题】:Google Earth Engine: Error on point value extraction谷歌地球引擎:点值提取错误
【发布时间】:2019-08-25 01:08:13
【问题描述】:

我正在尝试提取一组位置的降雨量 (CHIRPS) 值,但出现以下错误:

Image.reduceRegions: 找不到 crs

这不会发生在其他数据集(例如 terraclimate)中

当我开始从任务下载表格时出现问题

这是我运行的代码的链接 https://code.earthengine.google.com/c27f2156e81824b0990dcfe0b0a6f455

错误应该在这里:

// do extraction 
var ft = ee.FeatureCollection(ee.List([]));

//Function to extract values from image collection based on point file and export as a table 
var fill = function(img, ini) {
  var inift = ee.FeatureCollection(ini);
  var scale = ee.Image(MM.first()).projection().nominalScale().getInfo()
  var ft2 = img.reduceRegions(pts, ee.Reducer.first(),scale);
  var date = img.date().format("YYYYMM");
  var ft3 = ft2.map(function(f){return f.set("date", date)});
return inift.merge(ft3);
};

// Iterates over the ImageCollection
var profile = ee.FeatureCollection(MM.iterate(fill, ft));

你能帮帮我吗?

谢谢

g.

【问题讨论】:

  • 运行您链接中的代码没有问题。
  • 您好 Kevin,当您从 Tasks 下载表格时出现问题。抱歉,我的问题不够清楚。谢谢!
  • 我无法重现您的错误,因为我事先收到了“许可”错误。这是Collection.loadTable: Permission denied for Fusion Table '1lk2rFqdyIuZfitL40PAvqFW6uzB-2W55aUFnQF3b'
  • 凯文,对不起。这是新的链接,其中包含一些应该起作用的点。感谢您的支持,这真的很重要:code.earthengine.google.com/a3bbc6bf7e0ccd16eb975350bcb1058a

标签: javascript google-earth-engine


【解决方案1】:

您的代码的问题是您在所有月份都使用 2018 年和 2019 年。在您选择的一段时间内,没有数据,因此您的月度价值是返回 0 个波段的图像。 由于您的图像没有带,reducer 找不到任何信息,因此它返回 crs not found。 只需将年份更改为从 2017 年开始到 2018 年结束,我就成功地运行了您的代码。

【讨论】:

    猜你喜欢
    • 2022-01-13
    • 2019-01-05
    • 2020-07-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-19
    相关资源
    最近更新 更多