A command-line tool for downloading Copernicus Digital Elevation Model (DEM) tiles from the Copernicus Data Space Ecosystem (CDSE) S3 storage.
- Interactive and batch modes - Guided setup or scriptable automation
- Geographic filtering - Download only tiles within a bounding box
- Resumable downloads - Automatically skip already downloaded files
- Parallel downloads - Configurable concurrent downloads for faster transfers
- Multiple datasets - Support for GLO-30, GLO-90, and EEA-10 datasets
- Mask selection - Download DEM, EDM, FLM, HEM, or WBM files
- Dry-run mode - Preview files before downloading
- Auto-discovery - Automatically finds available datasets and versions
- .NET 9.0 SDK or later
- A CDSE account with S3 credentials from Copernicus Data Space Ecosystem
- Register at dataspace.copernicus.eu
- Go to your profile settings
- Generate S3 credentials (Access Key and Secret Key)
git clone https://github.com/yourusername/CopernicusDemDownloader.git
cd CopernicusDemDownloader/src/CopernicusDemDownloader
dotnet build -c ReleaseThe executable will be at bin/Release/net9.0/CopernicusDemDownloader.exe (Windows) or bin/Release/net9.0/CopernicusDemDownloader (Linux/macOS).
cd src/CopernicusDemDownloader
dotnet run -- [options]Simply run the tool without credentials to start interactive mode:
CopernicusDemDownloaderThis will guide you through:
- Entering S3 credentials
- Selecting a dataset (GLO-30, GLO-90, EEA-10)
- Selecting a version
- Choosing mask types (DEM, EDM, FLM, etc.)
- Setting output directory
- Optionally specifying a bounding box
- Configuring parallelism
For scripting and automation, use batch mode with credentials:
# Using command-line options
CopernicusDemDownloader --batch \
--access-key YOUR_ACCESS_KEY \
--secret-key YOUR_SECRET_KEY \
--dataset GLO-30 \
--bbox -10,35,30,70 \
--output ./dem_europe
# Using environment variables
export CDSE_ACCESS_KEY=your_access_key
export CDSE_SECRET_KEY=your_secret_key
CopernicusDemDownloader --batch --dataset GLO-90 --bbox 10,45,11,46Download GLO-30 DEM tiles for Europe:
CopernicusDemDownloader --batch --dataset GLO-30 --bbox -10,35,30,70 --output ./europe_demDownload GLO-90 tiles for a small area with 8 parallel downloads:
CopernicusDemDownloader --batch --dataset GLO-90 --bbox 10,45,12,47 --parallel 8Preview files without downloading:
CopernicusDemDownloader --batch --dataset GLO-30 --bbox 10,45,11,46 --dry-runDownload DEM and water body mask files:
CopernicusDemDownloader --batch --dataset GLO-30 --bbox 10,45,11,46 --masks DEM,WBMResume an interrupted download:
CopernicusDemDownloader --batch --dataset GLO-30 --bbox 10,45,11,46 --output ./my_download
# Run the same command again - already downloaded files will be skippedForce re-download of existing files:
CopernicusDemDownloader --batch --dataset GLO-30 --bbox 10,45,11,46 --force| Option | Description | Default |
|---|---|---|
--interactive |
Force interactive mode | Auto-detect |
--batch |
Non-interactive batch mode | false |
--access-key |
S3 access key | CDSE_ACCESS_KEY env var |
--secret-key |
S3 secret key | CDSE_SECRET_KEY env var |
--output |
Output directory | ./CopDEM_<dataset> |
--dataset |
Dataset: EEA-10, GLO-30, GLO-90 | GLO-30 |
--version-year |
Dataset version (e.g., 2024_1) | Latest |
--prefix |
Custom S3 prefix (overrides --dataset) | - |
--bbox |
Bounding box: minLon,minLat,maxLon,maxLat | None (all tiles) |
--masks |
Mask types: DEM,EDM,FLM,HEM,WBM | DEM |
--parallel |
Number of parallel downloads | CPU cores |
--retries |
Max retry attempts per file | 3 |
--state-file |
State file name for resume | download_state.json |
--dry-run |
List files without downloading | false |
--force |
Re-download existing files | false |
--endpoint |
S3 endpoint URL | CDSE endpoint |
--bucket |
S3 bucket name | eodata |
| Dataset | Resolution | Coverage | Description |
|---|---|---|---|
| GLO-30 | 30m | Global | Copernicus DEM GLO-30 (DGED format) |
| GLO-30-DTED | 30m | Global | Copernicus DEM GLO-30 (DTED format) |
| GLO-90 | 90m | Global | Copernicus DEM GLO-90 (DGED format) |
| GLO-90-DTED | 90m | Global | Copernicus DEM GLO-90 (DTED format) |
| EEA-10 | 10m | Europe | High-resolution European DEM (requires CCM access) |
Add -PUBLIC suffix for public variants (e.g., GLO-30-PUBLIC).
| Mask | Description |
|---|---|
| DEM | Digital Elevation Model (height data) |
| EDM | Editing Mask |
| FLM | Filling Mask |
| HEM | Height Error Mask |
| WBM | Water Body Mask |
| Variable | Description |
|---|---|
CDSE_ACCESS_KEY |
S3 access key (alternative to --access-key) |
CDSE_SECRET_KEY |
S3 secret key (alternative to --secret-key) |
- Use bounding box: Always specify
--bboxto avoid scanning the entire dataset (500k+ files) - Adjust parallelism: Use
--parallelto balance speed vs. system resources - Resume support: Re-run the same command to resume interrupted downloads
Apache 2.0 License
- Data provided by the Copernicus Data Space Ecosystem
- Copernicus DEM is produced by the European Space Agency (ESA)