Rafaela Paulo Teixeira

Oceanographer and Geospatial Analyst

BSc in Marine Biology

Intl MSc in Marine and Coastal Systems

Project Leader

Rafaela Paulo Teixeira

Oceanographer and Geospatial Analyst

BSc in Marine Biology

Intl MSc in Marine and Coastal Systems

Project Leader

Urban Heat Islands (SUHI)

Satellite Remote Sensing for Measuring Surface Urban Heat Islands and Constructing Heat Vulnerability Indices

Surface Urban Heat Islands (SUHI)

The present exercise was part of the NASA Arset Program exam on Urban Heat Islands.

Click in the image to zoom and read.

Skills

“Google Earth Engine combines a multi-petabyte catalog of satellite imagery and geospatial datasets with planetary-scale analysis capabilities” (GEE, 2023). A series of Landsat Surface Temperature were used in the study.

Java script was used in the Google Earth Engine to obtain a series of satellite images and retrieve the Surface Urban Heat Island (SUHI).

Exercise Part 1/3

				
					/* 
Author: Sean McCartney (sean.mccartney@nasa.gov)
Edit: Rafaela Paulo Teixeira (contact@rafaelapt.me)
ARSET Training: Satellite Remote Sensing for Measuring Urban Heat Islands and Constructing Heat Vulnerability Indices
August 2, 2022 - August 11, 2022

This code is free and open. 
I, Rafaela Paulo Teixeira, agree to cite the following reference in any publications derived from them:
NASA Applied Remote Sensing Training (ARSET) program

This script shows how to analyze and visualize Landsat surface temperature (ST) time series 
from Landsat 8 over Santo Tirso, Porto (Portugal) from a defined area of interest (aoi).

Study Area:
Santo Tirso, Portugal

Parameters:
In: DATE_RANGE
    YEAR_RANGE
    STUDYBOUNDS
    DISPLAY
    aoi: delineated rectangle for area of interest
    Rural: delineated polygons for rural areas 
    Urban: delineated polygons for urban areas
    
Out: clipped image of mean daytime surface temperature (ST) and surface urban heat island (SUHI).
*/


//****************** DEFINE THE STUDY AREA *****************//
// Use the "Draw a rectangle" tool in the map window to define your 
// area of interest (aoi) for filtering the image collection.


// Assign a variable to filter the day of year from July 1 to August 31.
// Adjust the DATE_RANGE for your own UHI study.
var DATE_RANGE = ee.Filter.dayOfYear(182, 243);
// Assign a variable to filter years from 2010 – 2022.
// Adjust the YEAR_RANGE for your own UHI study.
var YEAR_RANGE = ee.Filter.calendarRange(2013, 2022,'year');
// Assign a variable to delineate your area of interest
// Create your own aoi using the Geometry tools in the map window. Rename your geometry to match the assigned variables.
var STUDYBOUNDS = aoi;
// Assign a variable to display images in the map window
var DISPLAY = true;

// Set the basemap to display as satellite.
Map.setOptions('SATELLITE');
/* Other basemap options are below
Map.setOptions('HYBRID');
Map.setOptions('ROADMAP');
Map.setOptions('TERRAIN');
*/

// Center the map view at defined coordinates (longitude/latitude) with the given zoom level.
// Zoom level ranges from 0 to 24, with 0 being global and 24 being the smallest region possible.
// Latitude must be within [-85, 85].
// Adjust the long/lat for your own aoi.
Map.setCenter (-8.47535542880891,41.34267842990433, 10);

// Assign a variable to the sensor-specific bands unique to each Landsat mission.
var LC08_bands = ['ST_B10', 'QA_PIXEL']; // Landsat 8 surface temperature (ST) & QA_Pixel bands

// Assign a variable for the band names used later in the script.
// var bandName = ['ST', 'QA_PIXEL'];

//****************** CLOUD MASK FUNCTION *****************//
// Create a function to mask clouds and cloud shadows based on the QA_PIXEL band of Landsat 8 & 9
// For information on bit values for the QA_PIXEL band refer to: 
// https://developers.google.com/earth-engine/datasets/catalog/LANDSAT_LC08_C02_T1_L2#bands
function cloudMask(image) {
  var qa = image.select('QA_PIXEL');
  var mask = qa.bitwiseAnd(1 << 3)
    .or(qa.bitwiseAnd(1 << 4));
  return image.updateMask(mask.not());
}

/* Assign variables to import the Landsat Collection 2, Tier 1, Level 2 image collections, selecting 
the ST and QA_PIXEL bands, and spatially filtering the image collection by your aoi. */
var L8 = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2')
  .select('ST_B10', 'QA_PIXEL')
  .filterBounds(STUDYBOUNDS)
  .filter(DATE_RANGE)
  .filter(YEAR_RANGE)
  .map(cloudMask);

// Filter the collections by the CLOUD_COVER property so each image contains less than 20% cloud cover.	
var filtered_L8 = L8.filter(ee.Filter.lt('CLOUD_COVER', 20));

// Use print statements to print the argument to the console.
print(filtered_L8, 'Landsat 8 ST');

/* Create a funtion using Landsat scale factors for deriving ST in Kelvin and Celsius.
For more information on ST scale factors, refer to:
https://www.usgs.gov/landsat-missions/landsat-collection-2-level-2-science-products */
function applyScaleFactors(image) {
  var thermalBands = image.select('ST_B10').multiply(0.00341802).add(149.0) // Scale factors for Kelvin
  .subtract(273.15); // Scale factor for degrees Celsius
  return image.addBands(thermalBands, null, true);
}

// Use print statements to print the argument to the console.
print(filtered_L8, 'Landsat ST (Celsius)');

// Define a variable to apply scale factors to the filtered image collection.
var landsatST = filtered_L8.map(applyScaleFactors);

// Use a print statement for tracking your progress in the console tab.
print("... Computing mean ST across image collection");

//****************** CALCULATE MEAN SURFACE TEMPERATURE *****************//
// Define a variable to calculate mean ST for each pixel geography 
// throughout the filtered image collection.
var mean_LandsatST = landsatST.mean();

// Define a variable to use the clip funtion to subset your imagery to the aoi.
var clip_mean_ST = mean_LandsatST.clip(STUDYBOUNDS);

// Use a print statement to print the argument to the console.
print(clip_mean_ST, 'Mean ST clipped to study area');

// Define a variable to select the temperature band.
var values_ST = clip_mean_ST.select("ST_B10"); 

// Define a variable to output a histogram of mean ST values within your aoi.
var histogram_ST_values = ui.Chart.image.histogram(values_ST, STUDYBOUNDS, 30);

// Use  print statement to output the histogram values of mean ST to the console tab.
 print(histogram_ST_values);

// Add the image to the map window, defining min/max values, a palette for 
// symbology, assign a name to the visualization, and display the result.
Map.addLayer(clip_mean_ST, {
  bands: "ST_B10", 
  min: 28, max: 47, 
  palette: ['blue','white','red']}, "ST", DISPLAY);

print('... Mean/Min/Max ST for urban Santo Tirso, PT');
// Define a variable to compute the mean, min, and max for an urban polygon layer. 
// Polygon was created using the "Draw a shape" tool.
var statsUrban = clip_mean_ST.reduceRegions({
  collection: Urban,
  reducer: ee.Reducer.mean().combine({
  reducer2: ee.Reducer.minMax(),
  sharedInputs: true
  }),
  scale: 30});
  
// print the statistics to the console.
print (statsUrban);

print('... Mean/Min/Max ST for rural Santo Tirso, PT');
// Define a variable to compute the mean, min, and max for a rural polygon layer. 
// Polygon was created using the "Draw a shape" tool.
var statsRural = clip_mean_ST.reduceRegions({
  collection: Rural,
  reducer: ee.Reducer.mean().combine({
  reducer2: ee.Reducer.minMax(),
  sharedInputs: true
  }),
  scale: 30});
  
// print the statistics to the console.
print (statsRural);


//****************** CALCULATE SUHI *****************//
/* To calculate the surface urban heat island (SUHI) intensity for your aoi, find the Mean/Min/Max ST
under the Console tab --> FeatureCollection --> features --> properties --> ST_B10_mean

Subtract the mean urban temperature from the mean rural temperature.
(ST_B10_mean [Urban]) - (ST_B10_mean [Rural]) = SUHI intensity

The intensity of the heat island is the simplest quantitative indicator of the 
thermal modification imposed by a city upon the geography in which it is situated, and 
of its relative warming in relation to the surrounding rural environment. */

				
			

Click in the image to zoom and read.

erro: Content is protected !!