Google Earth Engine Tutorial: Download Building Height Data
Credit: Youtube Channel “Terra Spatial, Learn how to download building height information using Open Buildings 2.5D dataset for urban studies.”
You can see all the tutorials from here: Techgeo Academy.
Google Earth Engine (GEE) is a powerful platform for geospatial analysis and data access. While GEE doesn’t provide direct access to building height data as a native dataset, it offers elevation data from sources like NASADEM or SRTM, which can be used to infer building heights. Below is an overview of how to retrieve and work with building height-related datasets using GEE.
Step 1: Set Up Your GEE Environment
To start, ensure you have a Google account and access to the GEE code editor at https://code.earthengine.google.com/. Install the Earth Engine API and authenticate your account using the following commands in your terminal:
npm install -g earthengine
earthengine authenticateStep 2: Load Elevation Data as a Proxy for Building Height
Use datasets like ‘USGS/SRTMGL1/SRTM90’ for elevation. This data can help approximate building heights when combined with other information.
var elevation = ee.Image('USGS/SRTMGL1/SRTM90');
Map.addLayer(elevation, {min: 0, max: 3000}, 'Elevation');Step 3: Visualize and Analyze the Data
Filter the data by region, date, or resolution. For example, to visualize elevation in a specific area:
var roi = ee.Geometry.Rectangle([longitude1, latitude1, longitude2, latitude2]);
var elevationRegion = elevation.clip(roi);
Map.addLayer(elevationRegion, {min: 0, max: 2000}, 'Region Elevation');Step 4: Export the Data
Export the dataset as a GeoTIFF or CSV. Use the following code to initiate the download:
Export.image.toDrive({
image: elevationRegion,
description: 'Building_Height_Data',
folder: 'GEE_Exports',
fileNamePrefix: 'elevation_data',
region: roi,
crs: 'EPSG:4326',
scale: 30,
fileFormat: 'GeoTIFF'
});Step 5: Process and Interpret the Data
Once downloaded, process the file in GIS software or analyze it with Python. Building heights can be derived from elevation data by subtracting ground level from top-of-structure measurements, where available.
FAQ Section
What datasets are available for building height analysis in GEE?
GEE provides elevation datasets like NASADEM and SRTM, which can serve as proxies for building heights. For detailed 3D building models, external sources like OpenStreetMap or LiDAR datasets integrated via GEE may be necessary.
How do I export data from GEE to my local machine?
Use the Export.image.toDrive function. Ensure your Google Drive is linked to the GEE account and specify parameters like file format, region, and scale.
Are there privacy or access restrictions for these datasets?
Most datasets are publicly accessible, but some may require specific permissions. Always check the data source’s terms of use and ensure compliance with local regulations.
What if the data resolution is too low for my needs?
Verify the dataset’s resolution. If it’s insufficient, consider combining GEE data with higher-resolution datasets from other platforms, or use machine learning models to enhance resolution.
Can I use GEE to access 3D building models directly?
GEE does not natively provide 3D building models. However, you can integrate third-party APIs or use LiDAR data (e.g., from GLAS or GEDI) to derive structural height information.






