I've been editting a script to make a time series chart of the temperature. (Original script: https://code.earthengine.google.com/2b2c4e1ece6ac2a201f8e854c34cd577 ) The issue is that I don't know what the output is, the value ranges from 200 - 500. Anyone any idea what's wrong? Or that has a working script to calculate the temperature from Landsat images?

    //cloud mask
function maskL8sr(image) {
  // Bits 3 and 5 are cloud shadow and cloud, respectively.
  var cloudShadowBitMask = (1 << 3);
  var cloudsBitMask = (1 << 5);
  // Get the pixel QA band.
  var qa = image.select('pixel_qa');
  // Both flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
  return image.updateMask(mask);}

//load the collection:
var col = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")

var image = col.median();

var ndvi = image.normalizedDifference(['B5', 'B4']).rename('NDVI');

//select thermal band 10(with brightness tempereature), no BT calculation 
 var thermal= image.select('B10').multiply(1000);

var min = ee.Number(ndvi.reduceRegion({
   reducer: ee.Reducer.min(),
   geometry: geometry1,
   scale: 30,
   maxPixels: 1e9

var max = ee.Number(ndvi.reduceRegion({
    reducer: ee.Reducer.max(),
   geometry: geometry1,
   scale: 30,
   maxPixels: 1e9

//fractional vegetation
var fv = ndvi.subtract(min).divide(max.subtract(min)).rename('FV'); 

  var a= ee.Number(0.004);
  var b= ee.Number(0.986);
  var EM=fv.multiply(a).add(b).rename('EMM');

//LST c,d,f, p1, p2, p3 are assigned variables to write equaton easily
  var c= ee.Number(1);
  var d= ee.Number(0.00115);
  var f= ee.Number(1.4388);

var p1= ee.Number(thermal.multiply(d).divide(f));
var p2= ee.Number(Math.log(EM));
var p3= ee.Number((p1.multiply(p2)).add(c));

var LST= (thermal.divide(p3)).rename('LST');

// Create a time series chart.
var plotLST = ui.Chart.image.seriesByRegion(col, geometry,ee.Reducer.mean(),1

// Display.

My script: https://code.earthengine.google.com/6b35a6bdf059e0bf0eb933b4eed0079e

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.