Google Earth Engine (GEE) ——gee中自带的Landsat8和5数据集对于温度波段的映射出现无法运行的情况

True Color (432): Layer error: ImageCollection.mosaic: Error in map(ID=LC09_001048_20220114): Image.select: Pattern 'ST_B6' did not match any bands.


True Color (432): Layer error: ImageCollection.mosaic: Error in map(ID=LC08_001004_20210511): Image.select: Pattern 'ST_B6' did not match any bands.

 前言 – 床长人工智能教程

这里是直接修改后的代码,大家可以尝试将注释代码部分去掉,结果就会出现上面的报错:

//所有参与计算的影像集合都为地标反射率SR数据集、、、、、、、、、、、、、、、、、、、
///USGS Landsat 9 Level 2, Collection 2, Tier 1

var dataset = ee.ImageCollection('LANDSAT/LC09/C02/T1_L2')
    .filterDate('2022-01-01', '2022-02-01');

// Applies scaling factors.
function applyScaleFactors(image) {
  var opticalBands = image.select('SR_B.').multiply(0.0000275).add(-0.2);
  var thermalBands = image.select('ST_B.*').multiply(0.00341802).add(149.0);
  return image.addBands(opticalBands, null, true)
              .addBands(thermalBands, null, true);
}

dataset = dataset.map(applyScaleFactors);

var visualization = {
  bands: ['SR_B4', 'SR_B3', 'SR_B2'],
  min: 0.0,
  max: 0.3,
};
Map.setCenter(-114.2579, 38.9275, 8);
Map.addLayer(dataset, visualization, 'True Color (432)');

/USGS Landsat 8 Level 2, Collection 2, Tier 1///
var dataset = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2')
    .filterDate('2021-05-01', '2021-06-01');

// Applies scaling factors.
function applyScaleFactors(image) {
  var opticalBands = image.select('SR_B.').multiply(0.0000275).add(-0.2);
  //var thermalBands = image.select('ST_B.*').multiply(0.00341802).add(149.0);
  return image.addBands(opticalBands, null, true)
              //.addBands(thermalBands, null, true);
}

dataset = dataset.map(applyScaleFactors);

var visualization = {
  bands: ['SR_B4', 'SR_B3', 'SR_B2'],
  min: 0.0,
  max: 0.3,
};

Map.setCenter(-114.2579, 38.9275, 8);

Map.addLayer(dataset, visualization, 'True Color (432)');


///USGS Landsat 5 Level 2, Collection 2, Tier 1/

var dataset = ee.ImageCollection('LANDSAT/LT05/C02/T1_L2')
    .filterDate('2000-06-01', '2000-07-01');
print(dataset.limit(10))
// Applies scaling factors.
function applyScaleFactors(image) {
  var opticalBands = image.select('SR_B.').multiply(0.0000275).add(-0.2);
  //var thermalBand = image.select("ST_B6").multiply(0.00341802).add(149.0);
  return image.addBands(opticalBands, null, true)
              //.addBands(thermalBand, null, true);
}

dataset = dataset.map(applyScaleFactors);

var visualization = {
  bands: ['SR_B3', 'SR_B2', 'SR_B1'],
  min: 0.0,
  max: 0.3,
};

Map.setCenter(-114.2579, 38.9275, 8);

Map.addLayer(dataset, visualization, 'True Color (321)');

所有目前对于所有的C02数据中,Landsat8 和5的地表反射率中,无法进行温度波段的映射和转换。只有Landsat9 是ok的。上面的代码中已经去除了温度波段的映射计算,所以结果是可以的,也可以进行正常的波段运算,这可能是GEE数据集中在归档的时候,并没有把温度波段和其它波段一起放,而是放在了Bitmask for SR_CLOUD_QA的一个子波段。这里简单举一个例子,请查看下面的Landsat5的波段。

Resolution
30 meters

Bands

Name Units Min Max Scale Offset Wavelength Description
SR_B1 1 65455 2.75e-05 -0.2 0.45-0.52 μm

Band 1 (blue) surface reflectance

SR_B2 1 65455 2.75e-05 -0.2 0.52-0.60 μm

Band 2 (green) surface reflectance

SR_B3 1 65455 2.75e-05 -0.2 0.63-0.69 μm

Band 3 (red) surface reflectance

SR_B4 1 65455 2.75e-05 -0.2 0.77-0.90 μm

Band 4 (near infrared) surface reflectance

SR_B5 1 65455 2.75e-05 -0.2 1.55-1.75 μm

Band 5 (shortwave infrared 1) surface reflectance

SR_B7 1 65455 2.75e-05 -0.2 2.08-2.35 μm

Band 7 (shortwave infrared 2) surface reflectance

SR_ATMOS_OPACITY 0 10000 0.001

A general interpretation of atmospheric opacity generated by LEDAPS and based on the radiance viewed over Dark Dense Vegetation (DDV) within the scene. A general interpretation of atmospheric opacity is that values (after scaling by 0.001 is applied) less than 0.1 are clear, 0.1-0.3 are average, and values greater than 0.3 indicate haze or other cloud situations. SR values from pixels with high atmospheric opacity will be less reliable, especially under high solar zenith angle conditions. The SR_ATMOS_OPACITY band is provided for advanced users and for product quality assessment and has not been validated. Most users are advised to instead use the QA_PIXEL band information for cloud discrimination.

SR_CLOUD_QA

Cloud Quality Assessment

Bitmask for SR_CLOUD_QA

ST_B6 K 0 65535 0.00341802 149 10.40-12.50 μm

Band 6 surface temperature. If 'PROCESSING_LEVEL' is set to 'L2SR', this band is fully masked out.

ST_ATRAN 0 10000 0.0001

Atmospheric Transmittance. If 'PROCESSING_LEVEL' is set to 'L2SR', this band is fully masked out.

ST_CDIST km 0 24000 0.01

Pixel distance to cloud. If 'PROCESSING_LEVEL' is set to 'L2SR', this band is fully masked out.

ST_DRAD W/(m^2*sr*um)/ DN 0 28000 0.001

Downwelled Radiance. If 'PROCESSING_LEVEL' is set to 'L2SR', this band is fully masked out.

ST_EMIS 0 10000 0.0001

Emissivity estimated from ASTER GED. If 'PROCESSING_LEVEL' is set to 'L2SR', this band is fully masked out.

ST_EMSD 0 10000 0.0001

Emissivity standard deviation. If 'PROCESSING_LEVEL' is set to 'L2SR', this band is fully masked out.

ST_QA K 0 32767 0.01

Uncertainty of the Surface Temperature band. If 'PROCESSING_LEVEL' is set to 'L2SR', this band is fully masked out.

ST_TRAD W/(m^2*sr*um)/ DN 0 22000 0.001

Thermal band converted to radiance. If 'PROCESSING_LEVEL' is set to 'L2SR', this band is fully masked out.

ST_URAD W/(m^2*sr*um)/ DN 0 28000 0.001

Upwelled Radiance. If 'PROCESSING_LEVEL' is set to 'L2SR', this band is fully masked out.

QA_PIXEL

Pixel quality attributes generated from the CFMASK algorithm.

猜你喜欢

转载自blog.csdn.net/qq_31988139/article/details/130019092