GEE错误——‘xxx‘ did not match any bands.

简介: GEE错误——‘xxx‘ did not match any bands.

这里我们在进行影像展示的时候会出现下面的错误,主要的原因是我们虽然进行了波段运算,但是依旧无法加载,主要原因是我们没有将计算过后的波段信息进行添加到我们的一个多波段影像,这里我们首先来看看代码出现的错误提示。当然这里只是给出了主要的问题,其实在进行波段运算的时候

错误:

mNDWI (Saison Sèche 2023): Layer error: Image.select: Pattern 'mndwiDry' did not match any bands.


EVI (Saison Sèche 2023): Layer error: Image.select: Pattern 'eviDry' did not match any bands.


AWEIshadow (Saison Sèche 2023): Layer error: Image.select: Pattern 'aweiShadowDry' did not match any bands.


NDVI (Saison Sèche 2023): Layer error: Image.select: Pattern 'ndviDry' did not match any bands.


mNDWI (Saison des pluies 2023): Layer error: Image.select: Pattern 'mndwiWet' did not match any bands.


EVI (Saison des pluies 2023): Layer error: Image.select: Pattern 'eviWet' did not match any bands.


AWEIshadow (Saison des pluies 2023): Layer error: Image.select: Pattern 'aweiShadowWet' did not match any bands.


NDVI (Saison des pluies 2023): Layer error: Image.select: Pattern 'ndviWet' did not match any bands.

原始代码:

// Choisissez une région d'intérêt (ROI)
var geometry = 
    /* color: #d63000 */
    /* displayProperties: [
      {
        "type": "rectangle"
      }
    ] */
    ee.Geometry.Polygon(
        [[[-6.577358626376397, 9.542052661722291],
          [-6.577358626376397, 9.181623347675282],
          [-5.855007552157647, 9.181623347675282],
          [-5.855007552157647, 9.542052661722291]]], null, false);
// Filtrer les images pour la saison sèche (de janvier à mars)
// Année 2023
var year = 2023;
var landsat8Collection = ee.ImageCollection("LANDSAT/LC08/C02/T1_TOA")
//Ajouter une couche de couleur à la zone pour bien visualiser//
Map.addLayer(geometry, {color: '001155'}, 'Zone d\'étude'); // Code de couleur bleuât
Map.centerObject(geometry, 9);
//Mettre en place la fonction de masque des nuages pour une image de qualité sans nuage//
function maskL8srClouds(image) {
  //Les bits 3 et 5 correspondent respectivement à l'ombre et au nuage
  var cloudShadowBitMask = (1 << 3);
  var cloudsBitMask = (1 << 5);
  // selectionner bande pixel QA (Assurance Qualité).
  var qa = image.select('QA_PIXEL');
  // Les deux opérations doivent être réglées à zéro, 
  // indiquant des conditions claire
  var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
                .and(qa.bitwiseAnd(cloudsBitMask).eq(0));
  return image.updateMask(mask);
}
// Construire une image composite pour la saison sèche//
var imageDry = landsat8Collection.filterBounds(geometry)
                .filterDate('2023-01-01', '2023-03-31')
                .filterMetadata('CLOUD_COVER','less_than', 10)
                .map(maskL8srClouds)
                .median()
                .clip(geometry);
//Map.addLayer(imageDry)
// Imprimer les noms de bandes pour une image pendant la saison sèche
print("Bands in imageDry:", imageDry.bandNames());
// Ajouter un dictionnaire de visualisation de l'image saison sèche. Les valeurs min, max//
//et l'étirement peuvent être modifiées pour chacune des trois bandes.//
var L8DryVis = {bands:['B4', 'B3', &#
相关文章
|
3月前
GEE错误——XXX is not a function,如何解决这个问题?
GEE错误——XXX is not a function,如何解决这个问题?
160 0
|
6月前
|
小程序
小程序踩坑:Setting data field "xxxx" to undefined is invalid.
小程序踩坑:Setting data field "xxxx" to undefined is invalid.
96 0
|
3月前
|
JavaScript 前端开发
GEE错误——gee错误Line 35: nir.subtract is not a function
GEE错误——gee错误Line 35: nir.subtract is not a function
22 0
|
9月前
|
前端开发 JavaScript
解决前端报错 Error: Cannot find module ‘xxx‘(包含 uniapp)
解决前端报错 Error: Cannot find module ‘xxx‘(包含 uniapp)
402 0
|
编译器 C++
使用vs编译QT项目一直提示 machine type 不匹配的问题解决办法
使用vs编译QT项目一直提示 machine type 不匹配的问题解决办法
85 0
|
Ubuntu 计算机视觉
关于 libQt5xxx:对‘Qxxxx::xxxx()@Qt5’未定义的引用错误 的解决方法
关于 libQt5xxx:对‘Qxxxx::xxxx()@Qt5’未定义的引用错误 的解决方法
关于 libQt5xxx:对‘Qxxxx::xxxx()@Qt5’未定义的引用错误 的解决方法
Google Earth Engine(GEE)——export影像导出错误Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid
Google Earth Engine(GEE)——export影像导出错误Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid
570 0
Google Earth Engine(GEE)——export影像导出错误Error: Image.clipToBoundsAndScale, argument ‘input‘: Invalid