注:这个数据集中只有单景影像可以尝试
代码:
/*
Author: Sofia Ermida ([email protected]; @ermida_sofia)
This code is free and open.
By using this code and any data derived with it,
you agree to cite the following reference
in any publications derived from them:
Ermida, S.L., Soares, P., Mantas, V., Göttsche, F.-M., Trigo, I.F., 2020.
Google Earth Engine open-source code for Land Surface Temperature estimation from the Landsat series.
Remote Sensing, 12 (9), 1471; https://doi.org/10.3390/rs12091471
Example 1:
This example shows how to compute Landsat LST from Landsat-8 over Coimbra
This corresponds to the example images shown in Ermida et al. (2020)
*/
var geometry = /* color: #d63000 */ee.Geometry.Polygon(
[[[-8.91, 40.4],
[-8.91, 40],
[-6.630078124999998, 40.025243378744314],
[-6.498242187499998, 40.53790583776488]]]);
// link to the code that computes the Landsat LST
var LandsatLST = require('users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js')
// select region of interest, date range, and landsat satellite
var satellite = 'L8';
var date_start = '2018-05-15';
var date_end = '2018-05-31';
var use_ndvi = true;
// get landsat collection with added variables: NDVI, FVC, TPW, EM, LST
var LandsatColl = LandsatLST.collection(satellite, date_start, date_end, geometry, use_ndvi)
print(LandsatColl)
// select the first feature
var exImage = LandsatColl.first();
var cmap1 = ['blue', 'cyan', 'green', 'yellow', 'red'];
var cmap2 = ['F2F2F2','EFC2B3','ECB176','E9BD3A','E6E600','63C600','00A600'];
Map.centerObject(geometry)
Map.addLayer(exImage.select('TPW'),{min:0.0, max:60.0, palette:cmap1},'TCWV')
Map.addLayer(exImage.select('TPWpos'),{min:0.0, max:9.0, palette:cmap1},'TCWVpos')
Map.addLayer(exImage.select('FVC'),{min:0.0, max:1.0, palette:cmap2}, 'FVC')
Map.addLayer(exImage.select('EM'),{min:0.9, max:1.0, palette:cmap1}, 'Emissivity')
Map.addLayer(exImage.select('B10'),{min:290, max:320, palette:cmap1}, 'TIR BT')
Map.addLayer(exImage.select('LST'),{min:290, max:320, palette:cmap1}, 'LST')
Map.addLayer(exImage.multiply(0.0001),{bands: ['B4', 'B3', 'B2'], min:0, max:0.3}, 'RGB')
// uncomment the code below to export a image band to your drive
/*
Export.image.toDrive({
image: exImage.select('LST'),
description: 'LST',
scale: 30,
region: geometry,
fileFormat: 'GeoTIFF',
});
*/