Introduction
Combine your knowledge of spectral indices, thresholds, and image filtering to identify and map urban areas. In this challenge, you'll calculate the Normalized Difference Built-Up Index (NDBI) and apply thresholds to create a Boolean map of urban areas.
The NDBI was developed by Zha et al. (2003) to aid in differentiating urban areas (e.g., densely clustered buildings and roads) from other land cover types. The index exploits the fact that urban areas generally have a great deal of impervious surface cover, reflecting SWIR very strongly.
Reading
The NDBI Formula
The formula is:
NDBI = (SWIR - NIR) / (SWIR + NIR)
For Sentinel-2, the appropriate bands are:
- SWIR: Band 11 (B11)
- NIR: Band 8 (B8)
Challenge Tasks
Task 1: Calculate NDBI (40 points)
Calculate the Normalized Difference Built-Up Index (NDBI) for the sfoImage used in
Lab 8 - Band Arithmetic - NDVI.
Reminder: The San Francisco image was from Sentinel-2, filtered to a specific date and location.
You can use either:
- Manual calculation:
(SWIR - NIR) / (SWIR + NIR) - Or the
normalizedDifference()method
Display it with an appropriate color palette.
Task 2: Create a Boolean Urban Map (10 points)
Calculate a threshold that maps out the urban area as a Boolean (binary) classification.
Steps:
- Use the Inspector tool to examine NDBI values in urban vs. non-urban areas
- Determine an appropriate threshold value (typically NDBI > 0 indicates built-up areas)
- Apply the threshold using
.gt()method - Display the result with two colors (e.g., white for non-urban, red for urban)
Hints
- Start with the code from Lab 8 that loaded the San Francisco image
- Remember to use the correct band names for Sentinel-2 (B11 for SWIR, B8 for NIR)
- NDBI values range from -1 to 1, with higher values indicating more built-up areas
- Use the Inspector to explore NDBI values before setting your threshold
- Common threshold values for NDBI range from 0.0 to 0.2 depending on the area
Sample Code Structure
// Load San Francisco area image (from Lab 8)
var sfoPoint = ee.Geometry.Point([-122.4194, 37.7749]);
var sfoImage = ee.ImageCollection('COPERNICUS/S2')
.filterBounds(sfoPoint)
.filterDate('2020-01-01', '2020-12-31')
.sort('CLOUDY_PIXEL_PERCENTAGE')
.first();
// Calculate NDBI
// YOUR CODE HERE
// Map NDBI with color palette
// YOUR CODE HERE
// Apply threshold to create Boolean urban map
// YOUR CODE HERE
// Display Boolean map
// YOUR CODE HERE
📧 Lab Submission
Submit lab via email.
Subject: Lab 10 - Mapping Urban Areas - [Your Name]
Submit:
A URL to your code with comments that includes:
- NDBI Calculation - Code to calculate and display NDBI (40 points)
- Boolean Urban Map - Code to threshold NDBI and create binary classification (10 points)
- Comments - Well-commented code explaining your threshold choice (10 points)
Total: 60 Points