GEE Tutorials

Google Earth Engine Tutorial: Download NDBI Images from Landsat 8

Credit: Youtube Channel “Terra Spatial, Tutorial on downloading Normalized Difference Built-up Index images for urban area mapping and analysis.”

You can see all the tutorials from here: Techgeo Academy.

Google Earth Engine (GEE) is a powerful platform for analyzing satellite imagery and environmental data. One of the key metrics for urban area analysis is the Normalized Difference Built-Up Index (NDBI). This index highlights built-up areas using Landsat 8 imagery by leveraging shortwave infrared (SWIR) and near-infrared (NIR) bands. Below is a step-by-step tutorial to download NDBI images using GEE.

Step 1: Access Google Earth Engine

Log in to your Google account and visit the Google Earth Engine Code Editor. Open the editor and click on the “Console” tab to start coding.

Step 2: Load the Landsat 8 Dataset

Landsat 8 satellite data is available in GEE under the USGS Landsat 8 Collection 2 Tier 1 dataset. Use the following code to load the dataset:

var landsat8 = ee.ImageCollection("LANDSAT/LC08/C02/T1_L2");

Step 3: Define the Region of Interest (ROI)

Specify the area you want to analyze by drawing a polygon or using a predefined geometry. For example:

var roi = ee.Geometry.Rectangle([xmin, ymin, xmax, ymax]); // Replace with your coordinates

Step 4: Filter the Dataset

Filter images by date and the specified ROI to narrow down the data:

var filtered = landsat8.filterDate('2023-01-01', '2023-12-31')
.filterBounds(roi);

Step 5: Compute NDBI

The NDBI formula is (SWIR1 – NIR)/(SWIR1 + NIR), where SWIR1 corresponds to Band 6 and NIR to Band 5 in Landsat 8. Select the relevant bands and calculate the index:

var ndbi = filtered.select(['SR_B6', 'SR_B5']).map(function(image) {
  return image
    .addBands(image.select(['SR_B6']).rename('SWIR1'))
    .addBands(image.select(['SR_B5']).rename('NIR'))
    .expression('(SWIR1 - NIR)/(SWIR1 + NIR)', {SWIR1: image.select('SWIR1'), NIR: image.select('NIR')})
    .rename('NDBI');
});

Step 6: Visualize the NDBI Image

Add the NDBI layer to the map for visualization:

Map.addLayer(ndbi.first(), {min: -1, max: 1, palette: ['blue', 'white', 'red']}, 'NDBI');

Step 7: Export the Image

Export the calculated NDBI image to your Google Drive:

Export.image.toDrive({
  image: ndbi.first(),
  description: 'ndbi_export',
  folder: 'GEE_Exports',
  region: roi,
  scale: 30,
  maxPixels: 1e10
});

Replace the parameters with your specific requirements. The exported image will be available in your Google Drive under the GEE_Exports folder.

Step 8: View and Analyze the Downloaded Image

Download the exported GeoTIFF file and open it in GIS software like QGIS or ArcGIS for further analysis.

Frequently Asked Questions (FAQ)

Q: What is the purpose of NDBI in urban area analysis?

A: NDBI helps identify and analyze built-up surfaces, such as roads, buildings, and paved areas, using satellite imagery.

Q: Why are Band 6 and Band 5 used for NDBI in Landsat 8?

A: Band 6 (SWIR1) and Band 5 (NIR) are selected because they effectively differentiate built-up land from other land cover types.

Q: Can I use other Landsat satellites for NDBI?

A: Yes, NDBI can be calculated using different Landsat missions, but the band selection may vary depending on the sensor.

Q: How do I handle cloud cover in Landsat 8 data?

A: Use the cloud mask functions in GEE, such as image.select('QA_PIXEL').bitwiseAnd(1 << 3), to remove cloudy pixels before calculation.

Q: What format can I export the NDBI image in?

A: Use Export.image.toDrive to export in GeoTIFF format, which is compatible with most GIS tools.

Q: Is there a pre-existing NDBI tool in GEE?

A: No, GEE does not have a direct NDBI tool, but you can compute it manually using the bands and the formula provided.

Q: How do I adjust the date range for different studies?

A: Modify the filterDate parameters in the code to match your target time period.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Copy link