我是新编码和刚刚开始使用谷歌地球引擎代码编辑器。我在由Google:https://docs.google.com/document/d/1NojoqhGbsBnIWE2OSwYCgMmRxeZDn7F1g3kkNuMGJ1E/edit提供的实验室2上
当完成实际到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:图层错误:资产不是图像或ImageCollection。
有没有人能帮我解决问题,或者为我指明正确的方向!
谢谢你,哈里特·威尔逊
发布于 2017-07-12 11:19:13
是的,如果您打印图像(查看其信息),例如:
print(modisImage)您将看到它是空的,所以我打印了这个集合:
print(myd09)并发现收集从2016年开始,因此只需更改筛选日期:
var modisImage = ee.Image(myd09.filterDate('2016-08-11').first());https://stackoverflow.com/questions/45055451
复制相似问题