【问题标题】:Lab 2 Google Earth Engine - Image.select error实验室 2 Google 地球引擎 - Image.select 错误
【发布时间】:2017-12-16 18:00:08
【问题描述】:

我是编码新手,刚开始使用 Google 地球引擎代码编辑器。 我在 Google 地球引擎提供的 Lab 2 中:https://docs.google.com/document/d/1NojoqhGbsBnIWE2OSwYCgMmRxeZDn7F1g3kkNuMGJ1E/edit

当完成对数字 1.a.v 的实际操作时。我得到两个错误。

查看下面的完整代码:

var myd09 = ee.ImageCollection('MODIS/006/MYD09GA');

// Define a region of interest as a point at SFO airport.
var sfoPoint = ee.Geometry.Point(-122.3774, 37.6194);

// Center the map at that point.
Map.centerObject(sfoPoint, 16);

// Get a surface reflectance image from the MODIS MYD09GA collection.
var modisImage = ee.Image(myd09.filterDate('2011-08-28').first());

// Use these MODIS bands for red, green, blue, respectively.
var modisBands = ['sur_refl_b01', 'sur_refl_b04', 'sur_refl_b03'];

// Define visualization parameters for MODIS.
var modisVis = {bands: modisBands, min: 0, max: 3000};

// Add the MODIS image to the map.
Map.addLayer(modisImage, modisVis, 'MODIS');

// Get the scale of the data from the first band's projection:
var modisScale = 
modisImage.select('sur_refl_b01').projection().nominalScale();

print('MODIS scale:', modisScale);

我收到的错误是:

1) 编号(错误) Image.select:参数“输入”是必需的。 2) MODIS: Layer error: Asset is not an Image or ImageCollection.

有没有人可以帮助我解决问题或指出正确的方向!

谢谢, 哈里特·威尔逊

【问题讨论】:

    标签: google-earth-engine


    【解决方案1】:

    是的,如果您打印图像(以查看其信息),例如:

    print(modisImage)
    

    你会看到它是null,所以我打印了集合:

    print(myd09)
    

    发现收藏是从2016年开始的,所以改一下过滤器Date:

    var modisImage = ee.Image(myd09.filterDate('2016-08-11').first());
    

    【讨论】:

    • 太棒了,非常感谢你的解决方法。 :)
    【解决方案2】:

    错误的原因是因为 MODIS 集合 6 (MYD09.006) 尚未完全摄取(但将会)。出于本实验的目的,您可以使用集合 6 中更新的图像(如前所述),或使用较旧的集合 5 (MYD09.005)。我已经修改了代码实验室以明确这一点。

    【讨论】:

    • 您好 Nicholas,非常感谢您的回复。你知道他们是否有计划在不久的将来摄取它吗?我希望将其用于项目。
    • 是的,有计划在不久的将来摄取它,对于“近”的一些定义。
    • 嗨 Nicholas,如果您能提供帮助,还有一个问题! :) 我想知道谷歌地球引擎上是否有用于计算 TOA 反射率的 MODIS Level 1b 数据(MOD02)。我似乎根本找不到它。如果它不在谷歌地球引擎上,也许我应该使用表面反射率数据并向后工作? modis.gsfc.nasa.gov/data/dataprod/…
    • AFAIK,EE 目前没有 MOD02 或任何非网格化数据。
    猜你喜欢
    • 1970-01-01
    • 2017-06-18
    • 2022-01-22
    • 2017-10-07
    • 1970-01-01
    • 1970-01-01
    • 2022-10-21
    • 2019-08-25
    • 2021-09-25
    相关资源
    最近更新 更多