!Tested with DJI Mavic 3 Enterprise & DJI Matrice 350 RTK!
Small script that turns a pile of 1-metre German DGM raster tiles into a single, cloud-optimised GeoTIFF in geographic WGS-84 coordinates and ellipsoidal heights. Can be used for any other tiles as well.
-
Download tiles • Reads the Metalink catalogue .meta4 files • Uses
aiohttp+aiofilesto fetch every listed GeoTIFF -
Mosaic in UTM32N or any other CRS
• Merges the tiles with Rasterio -
Vertical datum shift (DHHN2016 (or any other orthometric heights) → WGS-84 ellipsoid)
• Loads the national geoid model
• Adds the geoid undulation to every pixel -
Re-project & COG
• Callsgdal.Warpto transform the temp raster to EPSG 4326, bilinear resample, LZW-compress and tile.
• Output: a ready-to-serve GeoTIFF at native ground resolution.
- GDAL ≥ 3.10 (
gdal/libgdal-core) - Rasterio 1.4
- NumPy ≥ 2.0
- aiohttp 3.12 · aiofiles 24.1
- tqdm 4.67
This package was developed and tested on Windows Server 2016 running python=3.9. We use conda to create a new environment:
user@userpc: /dtm_loader$ conda env create -f environment.yml conda activate dtm_loader