错误
我花了大量时间试图解决这个问题,但我找不到解决办法。开发人员和小组成员,我需要你们的帮助,这是我学习项目的一部分。
原始代码链接:
https://code.earthengine.google.com/ccd8eb582aa520b970f4dee2d5118def
Image (Error)
Image.select: Pattern 'SR_B1' did not match any bands.
主要原因是图像中没有匹配到名为'SR_B1'的波段。这可能是因为图像数据中没有包含该波段,或者波段的名称被错误地输入。请检查图像数据是否包含名为'SR_B1'的波段,并确保波段名称的输入正确。
原始代码:
var imageVisParam = {"opacity":1,"bands":["ST_B6"],"min":19.28379128000006,"max":26.389854860000014,"palette":["0e20ff","10ffd3","fff814","ffa706","ff2502"]},geometry = /* color: #d63000 *//* displayProperties: [{"type": "rectangle"}] */ee.Geometry.Polygon([[[33.61825600691496, 8.867477523439437],[33.61825600691496, 7.235830807654479],[35.96933022566496, 7.235830807654479],[35.96933022566496, 8.867477523439437]]], null, false);
Map.addLayer(geometry)
// This example demonstrates the use of the Landsat 5 Collection 2, Level 2 // QA_PIXEL band (CFMask) to mask unwanted pixels.function maskL5sr(image) {// Bit 0 - Fill// Bit 1 - Dilated Cloud// Bit 2 - Cirrus// Bit 3 - Cloud// Bit 4 - Cloud Shadowvar qaMask = image.select('QA_PIXEL').bitwiseAnd(parseInt('11111', 2)).eq(0);var saturationMask = image.select('QA_RADSAT').eq(0);// Apply the scaling factors to the appropriate bands.var opticalBands = image.select('SR_B.').multiply(0.0000275).add(-0.2);var thermalBands = image.select('ST_B6').multiply(0.00341802).add(149.0).subtract(273.15);// Replace the original bands with the scaled ones and apply the masks.