# Acquiring Terrain Topography Wind simulations over complex terrain - hills, valleys, coastal cliffs, or urban topography - require an accurate representation of the ground surface. When a physical survey is not available, satellite-derived elevation data is a practical alternative that covers most of the world at sufficient resolution for engineering applications. This guide shows how to download terrain elevation data using **[QGIS](https://qgis.org/download/)** (free, open-source) with the **[OpenTopography DEM Downloader](https://plugins.qgis.org/plugins/OpenTopography-DEM-Downloader/)** plugin, and export it as a GeoTIFF file for use in AeroSim. ```{note} This tutorial was written using QGIS version 3.36.3. ``` ## Setup ### Installing QGIS and the plugin 1. Download and install **[QGIS](https://qgis.org/download/)**. 2. Download the **[OpenTopography DEM Downloader](https://plugins.qgis.org/plugins/OpenTopography-DEM-Downloader/)** plugin ZIP file. 3. In QGIS, go to `Plugins` > `Manage and Install Plugins` > `Install from ZIP`. Select the downloaded ZIP and click `Install Plugin`. 4. Restart QGIS. ### Obtaining an API key The plugin requires an API key from OpenTopography to download data. 1. Go to **[opentopography.org](https://opentopography.org)** and click `Request an API key`. 2. Follow the instructions and save the key - it will be needed during the download step. ## Downloading terrain data ### Setting up the project 1. Open a new project in QGIS (`Project` > `New`). 2. Load a satellite basemap: go to `HCMGIS` > `Basemaps` > `Google Satellite`. 3. In the bottom-right corner, click the `current CRS` button and select the Coordinate Reference System that matches your region of interest. ### Selecting the area Navigate to the location of interest and position the map so the region is fully visible within the viewport. The plugin downloads data for the current map canvas extent. ### Running the plugin 1. Open the plugin via `Raster` > `OpenTopography DEM` > `OpenTopography DEM Downloader`. 2. In `Select DEM to download`, choose `Copernicus Global DSM 30m`. 3. In the extent field, select `Use Current Map Canvas Extent`. 4. Enter the API key obtained earlier. 5. Click `Run`. ```{important} The Copernicus Global DSM 30m dataset has a native resolution of 30 meters per pixel. For simulations where terrain features smaller than this are relevant, a higher-resolution survey dataset should be used if available. ``` ## Exporting the DEM Once the layer is generated in QGIS: 1. In the Layers panel, right-click the generated layer and select `Export` > `Save As`. 2. Set the format to `GeoTIFF`. 3. Choose the output file path and click `OK`. The resulting GeoTIFF file can then be imported into AeroSim as terrain geometry. ```{todo} Add steps for converting the GeoTIFF to STL for import into AeroSim. ```