flight-simulator-enhancements-and-mods
How to Combine Multiple Elevation Data Sources for Comprehensive Terrain Modeling on Aerosimulations.com
Table of Contents
Why Combining Elevation Data Sources Matters for Terrain Modeling
Accurate terrain models are the foundation of any credible aerosol simulation. Elevation data dictates how air masses move, how pollutants disperse, and how deposition patterns form across complex landscapes. Relying on a single dataset—whether it is SRTM, LiDAR, or a topographic map—introduces gaps in resolution, coverage, or precision that can cascade into unreliable simulation outputs. By combining multiple elevation data sources, you harness the strengths of each: the global reach of satellite-derived DEMs, the local fidelity of airborne LiDAR, and the historical context of digitized contour maps. This fusion creates a seamless, high-fidelity digital elevation model (DEM) that mirrors real-world terrain more closely than any single source can achieve.
Aerosimulations.com provides a powerful platform for running these enhanced models, but the quality of your inputs directly determines the quality of your results. This guide walks you through every stage of the process—from selecting and preprocessing source data to merging them with GIS tools and finally importing your composite DEM into Aerosimulations.com. You will learn practical workflows, common pitfalls to avoid, and validation techniques that ensure your merged dataset is ready for production simulations.
Understanding the Key Elevation Data Sources
Before you begin merging, you need a clear picture of what each data source offers and where it falls short. The right combination depends on your study area, the resolution required for your aerosol model, and the availability of data.
SRTM (Shuttle Radar Topography Mission)
SRTM provides near-global coverage (between 60°N and 56°S) at resolutions of 30 meters (SRTM v3) and 90 meters. Collected via spaceborne radar interferometry in 2000, it offers consistent, void-filled elevation data that works well for regional and continental-scale modeling. The main limitation is its moderate resolution and reduced accuracy in steep terrain and urban areas. For aerosol simulations covering large domains, SRTM is often the preferred base layer.
LiDAR (Light Detection and Ranging)
Airborne LiDAR delivers the highest resolution and vertical accuracy—often sub-meter horizontal and vertical errors of 10-30 cm. It captures bare-earth elevation (DTM) as well as surface features like vegetation and buildings (DSM). LiDAR is ideal for local-scale studies where fine terrain details influence pollutant trapping, valley flows, or coastal deposition. However, LiDAR coverage is fragmented, expensive to acquire, and rarely available for remote or large areas. Its role in a merged DEM is to provide a high-fidelity patch over a coarser global base.
ASTER GDEM (Advanced Spaceborne Thermal Emission and Reflection Radiometer Global Digital Elevation Model)
ASTER GDEM v3 offers 30-meter resolution with global coverage from 83°N to 83°S. It is derived from stereo-pair optical imagery and, compared to SRTM, performs better in high-latitude and mountainous regions. However, it contains more artifacts, such as clouds and shadow-induced voids, which require careful masking and filling. ASTER can supplement SRTM in areas where the latter has coverage gaps or lower quality.
ALOS PALSAR (Phased Array L-band Synthetic Aperture Radar)
ALOS PALSAR provides 12.5-meter resolution DEMs derived from L-band radar. L-band penetrates vegetation canopy better than C-band (SRTM), making it suitable for forested and tropical regions. The global dataset is available through the Alaska Satellite Facility. Its higher resolution and canopy penetration make it a valuable intermediate between SRTM and LiDAR for vegetated terrains.
Topographic Maps and Digitized Contours
For historical or data-sparse regions, digitized contour lines from topographic maps remain a useful source. Contour intervals typically range from 10 to 50 meters, and interpolation using methods like ANUDEM (Topo to Raster) can produce DEMs with reasonable hydrologic consistency. The downside is labor-intensive digitization and lower resolution. Use this source when modern satellite data is unavailable or when you need to model historical terrain conditions.
Other Sources: Copernicus GLO-30, NASADEM, ArcticDEM
Copernicus GLO-30 provides 30-meter resolution over Europe and selected global areas with excellent accuracy. NASADEM is a reprocessed version of SRTM with improved void filling and accuracy. ArcticDEM offers 2-meter resolution for the Arctic region. Including these specialized datasets can further refine your merged model depending on your geographic focus.
Challenges in Merging Elevation Data
Merging datasets is not a simple "stack and resample" operation. Several technical challenges must be addressed to avoid introducing artifacts that degrade simulation quality.
Resolution Mismatch
LiDAR might have 1-meter resolution while SRTM has 30 meters. When you overlay the LiDAR patch onto the coarser base, the transition zone will show a sharp change in detail unless you resample both datasets to a common resolution. The choice of resolution should balance detail retention with computational efficiency for your aerosol model.
Vertical Datum and Coordinate System Differences
Different elevation sources may use different vertical datums (e.g., EGM96 for SRTM vs. NAVD88 for USGS LiDAR). Horizontal coordinate systems also vary (WGS84, NAD83, UTM). If you do not standardize these, your merged DEM will have misalignments and vertical offsets that appear as artificial cliffs or steps. Always reproject and transform all datasets to a common coordinate reference system (CRS) and vertical datum before merging.
Temporal Discrepancies
SRTM captures elevation from February 2000, while LiDAR might be from 2020. Changes due to erosion, construction, deforestation, or mining create real differences that can produce contradictory elevation values. Depending on your simulation purpose, you may need to prioritize the most recent data or apply trend adjustments. For aerosol simulations focusing on present-day conditions, newer data generally takes precedence.
Voids and No-Data Areas
Radar shadow, cloud cover, and water bodies create voids in DEMs. SRTM and ASTER GDEM have known void areas in steep terrain and over water. If you merge a dataset with voids over a valid area from another source, the result can have holes unless you fill them via interpolation or substitute data from a secondary source.
Systematic Errors and Artifacts
SRTM has striping artifacts in some regions, ASTER has speckle-like noise, and LiDAR may have laser return gaps in dense vegetation. Without proper filtering, these errors propagate into the merged DEM. A careful preprocessing step that applies smoothing (while preserving critical terrain features) is often necessary.
Preprocessing Data for Integration
Consistent preprocessing ensures that your source datasets are "speaking the same language" before you merge them. This stage is where GIS software like QGIS, ArcGIS Pro, or command-line GDAL plays a central role.
Format and File Type Standardization
Convert all datasets to a common raster format. GeoTIFF is the most flexible and widely supported format for DEMs, as it embeds georeferencing metadata. Use the GDAL translate tool or QGIS's Raster → Conversion menu to convert ASCII grids, ESRI grids, or IMG files to GeoTIFF. Ensure that no-data values are consistently defined (commonly -32768, -9999, or 0).
Reprojection and Vertical Datum Transformation
First, choose a project CRS that is appropriate for your study area. For regional simulations, a projected CRS like UTM (Universal Transverse Mercator) is preferred over geographic WGS84 because it preserves distance and area properties. For global models, you may use a global CRS like EPSG:4326 but be aware that area distortion increases toward the poles.
Use GDAL warp or QGIS's Reproject Layer tool to transform all datasets to the same CRS. For vertical datum transformation, consult the metadata of each dataset. Tools like GDAL DEM or the Vertical Datum Transformation plugin in QGIS can shift vertical values to a common datum (e.g., EGM2008). Without this step, vertical offsets can reach several meters between different source types.
Clipping to Study Area
Reduce computation time and memory usage by clipping each dataset to the boundaries of your simulated domain plus a small buffer (e.g., 1 km). In QGIS, use Raster → Extraction → Clip Raster by Extent. For vector elevation contours, clip with the Clip tool in the vector menu. Ensure all clipped extents are identical so that resampling and merging align properly.
Resampling to a Common Resolution
Decide on a target resolution that balances detail with simulation performance. For aerosol modeling on Aerosimulations.com, a 10-30 meter resolution is typical for local-scale studies, while 90 meters is acceptable for regional or global simulations. Use GDAL warp -tr or QGIS's Raster → Align Rasters tool to resample all datasets to the same cell size. Choose a resampling method that matches your data type:
- Bilinear or cubic for continuous elevation surfaces; these produce smoother results and are appropriate for LiDAR and SRTM.
- Nearest neighbor for categorical auxiliary data (land cover, slope classes).
- Lanczos for high-resolution data when you want to preserve edge sharpness.
After resampling, check that the grid extents and cell alignments are identical across all rasters using GDAL info -stats or QGIS's Raster Information panel.
Filling Voids and Removing Artifacts
If your primary dataset (e.g., SRTM) contains voids, fill them before merging. Use GDAL fillnodata with the -b option to interpolate from surrounding valid pixels. For large voids (e.g., over water bodies), it is better to substitute the void area with a secondary dataset like ASTER GDEM or a bathymetry product. In QGIS, the Raster Calc tool with conditional expressions can replace no-data cells with values from the secondary raster.
To remove systematic artifacts (stripes, speckle), apply a low-pass filter or a median filter with a small kernel (e.g., 3x3) only in the affected regions. Avoid aggressive smoothing that eliminates real terrain ridges and valleys.
Methods for Combining Elevation Data
Once your datasets are preprocessed to consistency, you can apply one or a combination of merging strategies. The choice depends on the data quality, the spatial distribution of high-resolution data, and the target resolution of your final DEM.
Data Overlay (High-Resolution Patch)
This is the most intuitive approach: you replace a subset of your base DEM (e.g., SRTM) with a higher-resolution dataset (e.g., LiDAR) covering an area of interest. In QGIS, use the Raster Calculator with a conditional statement:
if( "lidar" != -9999, "lidar", "srtm" )
This preserves the LiDAR values where they exist and falls back to SRTM elsewhere. The transition at the boundary can be abrupt, so consider feathering a blend zone of 200-500 m using a distance-weighted function to avoid an artificial edge in your simulation.
Weighted Merging Based on Data Quality
Assign weights to each dataset based on its accuracy, resolution, or temporal relevance. LiDAR might get a weight of 0.7 within its extent, while SRTM gets 0.3. In QGIS, use Raster Calculator:
"lidar" * 0.7 + "srtm" * 0.3
For more nuanced blending, create a distance weight map from the LiDAR boundary so that the weight transitions smoothly. This preserves the high-fidelity LiDAR in the center of your study area while maintaining continuity with the surrounding SRTM data.
Mosaic with Blending (Seamless Merge)
GIS software offers mosaic tools that automatically blend overlapping areas. In QGIS, use Raster → Miscellaneous → Merge and check the "Use a blending algorithm" option. GDAL has the gdal_merge.py script with the -p flag to compute a weighted average in overlap zones. The blending algorithm considers each pixel's distance to the nearest no-data boundary within each source, creating a smooth transition. This method is best when your datasets have similar resolution and accuracy over the overlap region.
Kriging and Geostatistical Interpolation
If you have scattered high-quality elevation points (e.g., LiDAR returns or survey points) and a coarser base DEM, consider kriging to create a continuous surface that honors both datasets. Kriging models the spatial autocorrelation of elevation and produces a best linear unbiased estimate. In QGIS, use the Interpolation plugin (TIN, IDW, or Kriging) with the LiDAR points as primary input and the base DEM as a covariate or drift term. This method is computationally intensive but yields statistically robust surfaces for critical simulations.
Hydrologic Enforcement
When merging datasets for aerosol simulations that involve terrain-guided flow (air dispersion models often use elevation-derived slope and aspect), ensure that river channels and valley bottoms are continuous. Use a hydrologic conditioning tool (e.g., GDAL fill sinks or TauDEM) on the merged DEM to remove depressions and enforce flow accumulation. This step avoids artificial barriers that could misdirect particle transport in your simulation.
Step-by-Step Workflow Using GIS Tools (QGIS and GDAL)
Here is a complete, repeatable workflow that you can adapt to your data sources and study area.
Step 1: Data Acquisition
Download your source DEMs. Common portals include:
- USGS Earth Explorer for SRTM, NASADEM, and 3DEP LiDAR.
- NASA Earthdata Search for ASTER GDEM v3 and ALOS PALSAR.
- Copernicus PANDA for GLO-30.
- Local government data portals for regional LiDAR.
Store all downloads in a project folder with clear naming conventions (e.g., lidar_2020.tif, srtm_30m.tif).
Step 2: Standardize Coordinate Systems
Check the CRS of each dataset using QGIS Layer Properties → Information. Use Raster → Projections → Assign Projection if missing, then Reproject to your target CRS (e.g., EPSG:32633 for UTM zone 33N). For vertical datum, use GDAL DEM with the -of option for vertical shift grids if available, or use the Proj library command-line cs2cs to transform heights.
Step 3: Clip to Common Extent
Create a polygon shapefile of your study area plus buffer. Use Raster → Extraction → Clip Raster by Mask Layer on each source DEM. Verify that all output rasters have identical dimensions and cell alignment by checking their properties.
Step 4: Resample to Target Resolution
Decide on a target resolution. For this example, we choose 10 meters to retain LiDAR detail. Use the following GDAL command for each dataset:
gdalwarp -tr 10 10 -r bilinear -te xmin ymin xmax ymax input.tif output_10m.tif
In QGIS, use Raster → Align Rasters with "bilinear" as the resampling method.
Step 5: Fill Voids in the Base DEM
If your SRTM or ASTER DEM has no-data pixels, fill them using GDAL fillnodata:
gdal_fillnodata.py input.tif output_filled.tif -md 100
Use a maximum distance of 100-200 pixels to avoid unrealistic interpolation over large water bodies. For ocean areas, substitute with a bathymetry dataset like GEBCO or SRTM15+.
Step 6: Merge Using Mosaic with Blending
Create a mosaic of the preprocessed source rasters. In QGIS, use Raster → Miscellaneous → Build Virtual Raster (VRT) first to preview the merge without writing a new file. Once the VRT looks good, run GDAL Merge with the -n -9999 (no-data value) and -create options. For a weighted merge, use the QGIS Raster Calculator as described earlier.
Step 7: Hydrologic Conditioning
Use GDAL fill demo or the r.fill.dir module in GRASS GIS (available via QGIS Processing Toolbox) to fill sinks in the merged DEM. Set the smoothing option to 1 to avoid over-flattening. Export the conditioned DEM as a high-compression LZW-compressed GeoTIFF to reduce file size for upload to Aerosimulations.com.
Step 8: Validation
Compare the merged DEM against ground control points (if available) or against the original high-resolution source using GDAL cal to compute RMSE and mean error. Plot elevation profiles along cross-sections to visualize the transition zone. If the RMSE exceeds acceptable thresholds (e.g., >2 m for a 10 m resolution model), adjust the blending weights or add a linear correction.
Quality Control and Validation
Validation ensures that your merged DEM is fit for aerosol modeling. Even minor errors in elevation can distort wind fields and concentration patterns in Aerosimulations.com.
Visual Inspection
Create hillshade and slope maps from the merged DEM. Apply aspect-based coloring (e.g., using the QGIS terrain shader) to reveal artifacts. Look for:
- Sharp linear discontinuities along the boundaries of your source datasets.
- Stepped or terraced patterns that indicate resampling artifacts.
- Unnatural pits or spikes that suggest void filling errors.
If you see these, adjust your blending method or apply a post-merge median filter with a 3x3 kernel.
Statistical Validation Against Independent Data
If you have withheld LiDAR points or RTK GPS survey points, compute the RMSE between the merged DEM and these checkpoints. Also compute the mean absolute error (MAE) and bias. For aerosol simulations, a positive bias (merged DEM higher than ground truth) can lead to overestimated wind speeds in valleys. Use the following Python snippet with GDAL and numpy to compute statistics:
import gdal
import numpy as np
ds = gdal.Open('merged_dem.tif')
dem = ds.ReadAsArray()
gcps = load_gcps() # your checkpoints
errors = [dem[row, col] - z for row, col, z in gcps]
rmse = np.sqrt(np.mean(np.array(errors)**2))
print(f'RMSE: {rmse:.2f} m')
Hydrologic Consistency Check
Delineate streams from the merged DEM using r.watershed in GRASS or the QGIS Channel Network tool. Overlay the derived stream network on a high-resolution satellite image or existing hydrography dataset. The streams should align well; if they cross ridges or disappear because of artificial depressions, re-run the sink filling step with a stronger threshold.
Simulation Sensitivity Test
Run a simple aerosol dispersion test on Aerosimulations.com using both the original single-source DEM and your merged DEM. Compare the plume trajectory and deposition pattern. If the differences are substantial (e.g., venturi effect in valleys), document the change and decide whether to refine the merged DEM further. This step directly links your data processing effort to simulation outcomes.
Importing the Combined Data into Aerosimulations.com
With a validated merged DEM in hand, the final step is to bring it into Aerosimulations.com.
Export in the Correct Format
Aerosimulations.com accepts GeoTIFF (preferred), ASCII Grid, and NetCDF. Export your merged DEM in GeoTIFF format using LZW compression to reduce file size while retaining full precision. Use the following GDAL command:
gdal_translate -co COMPRESS=LZW -co PREDICTOR=2 merged_dem.tif merged_dem_compressed.tif
If your DEM exceeds the platform's file size limit (typically 2 GB for uncompressed), consider splitting it into tiles.
Specify Terrain Parameters
On the Aerosimulations.com project setup page, navigate to the Terrain section. Upload your GeoTIFF and select the appropriate CRS. The system will automatically extract elevation, slope, and aspect arrays for the simulation grid. Set the "terrain roughness" parameter to match the land cover of your area (e.g., urban, forest, open water). For highly detailed merged DEMs, enable the "high resolution terrain" option to use 10-meter or finer native resolution.
Check Alignment with Other Model Inputs
Ensure your merged DEM aligns exactly with the meteorological grid and emission source coordinates. A mismatch of even a few pixels can shift the plume path. Use the Raster → Align Rasters tool to snap the DEM to the grid of your meteorological data (e.g., WRF output). If you are using land use/land cover (LULC) data, confirm that its spatial extent and CRS match the DEM.
Run a Baseline Simulation
Perform a short baseline simulation (e.g., 24 hours) with the merged DEM to verify that no numerical instabilities arise from the terrain. Inspect the output velocity field near steep slopes and around the boundaries of your high-resolution LiDAR patch. If unusual divergence patterns appear, return to the preprocessing stage and apply a heavier smoothing to the transition zone.
Best Practices for Long-Term Success
- Maintain a Processing Log: Record every preprocessing step, parameter value, and software version in a Jupyter notebook or Markdown file. Reproducibility is critical when you or a colleague need to update the DEM six months later with new LiDAR data.
- Version Control Your Datasets: Use Git LFS or cloud storage to track changes to your source and merged DEMs. Tag versions that correspond to specific simulation studies.
- Validate with Field Data: Whenever possible, collect RTK GPS or drone survey points in key terrain features (valleys, ridge lines, urban edges) to build a permanent validation dataset for your region.
- Stay Updated: New DEM releases (e.g., Copernicus GLO-30 enhanced, NASADEM updates) can improve your base layer. Revisit your merge workflow annually to incorporate improved data.
- Leverage Community Tools: Explore the GDAL ecosystem for advanced terrain analysis, and the WhiteboxTools library for LiDAR-specific preprocessing.
Conclusion
Combining multiple elevation data sources is not an optional refinement—it is a necessary step for achieving the terrain accuracy that modern aerosol simulations demand. By systematically preprocessing each dataset, choosing the right merging method, and validating the result, you create a digital elevation model that captures both the broad topography and the fine-scale landforms that drive dispersion, deposition, and transport. Aerosimulations.com provides the platform to turn this merged DEM into actionable environmental insights.
Start with the data available in your region: download SRTM as your global base, source LiDAR for critical local areas, and fill gaps with ASTER or ALOS PALSAR. Follow the QGIS and GDAL workflows outlined here to merge them with confidence. Your simulations will reward you with more realistic wind fields, more accurate concentration contours, and ultimately better decision-support for air quality management, emergency response, and environmental monitoring.