Skip to content

Latest commit

 

History

History
161 lines (104 loc) · 6.69 KB

File metadata and controls

161 lines (104 loc) · 6.69 KB

README

How to Download Copernicus DEM for Sen2VM

Prerequisite: A valid CDSE user account from https://dataspace.copernicus.eu/


Introduction

Digital Elevation Models (DEM) are essential for geolocation and orthorectification in Sen2VM. Users can use different types of DEM (cf Inputs Description).

Sen2VM requires DEM data organized per square degree (see §DEM format requirements). The recommended way to obtain Copernicus DEM in the correct format is to use the CDSE-Copernicus-DEM-downloader tool, which downloads individual 1°×1° geocells from the Copernicus Data Space Ecosystem.


Recommended Method: CDSE-Copernicus-DEM-downloader

The CDSE-Copernicus-DEM-downloader is a lightweight tool that searches and downloads Copernicus DEM tiles by Sentinel-2 MGRS tile identifiers, producing the per-square-degree format required by Sen2VM.

Tip

This tool is included in the Sen2VM project under CDSE-Copernicus-DEM-downloader/. If you use the bundled copy, adjust the paths below accordingly.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/senbox-org/CDSE-Copernicus-DEM-downloader.git
    cd CDSE-Copernicus-DEM-downloader
  2. Download the Copernicus Sentinel-2 tiling system KML file from Sentiwiki, unzip it, and place the KML file in ./cdse-copernicus-dem-downloader/auxiliary/.

  3. Create and activate the conda environment:

    conda env create -f environment.yml
    conda activate cdse-copernicus-dem-downloader

Usage

The tool accepts MGRS tile IDs (e.g. 32UMA, 31TCJ) or SAFE product names. Run from the cdse-copernicus-dem-downloader/ directory.

Single MGRS tile:

python cdse_copernicus_dem_downloader.py --m DGED --r 90 --t 32UMA --o /path/to/output/DEM

Multiple tiles from a text file:

Create a file (e.g. input_tiles.txt) with one MGRS tile ID or SAFE filename per line:

32UMA
31TCJ
31TDG

Then run:

python cdse_copernicus_dem_downloader.py --m DGED --r 90 --i /path/to/input_tiles.txt --o /path/to/output/DEM

Options:

Option Description
--r {30,90} DEM resolution in metres (30 or 90)
--m {DTED,DGED} DEM model (DGED recommended for Sen2VM)
--t TILE Single MGRS tile ID
--i FILE Input file with list of tiles
--o DIR Output directory for DEM files
--config [PATH] Use XML configuration file
--reset Reset stored credentials

Note

On first run, you will be prompted for your CDSE username (email) and password. Credentials are encrypted and stored in credentials/credentials.yaml for later use.

Important

Sen2VM expects DGED format. DTED is not supported by Sen2Cor and may cause compatibility issues. Use --m DGED.

Quick User Guide

A more detailed user guide is available: CDSE DEM Downloader Quick User Guide


Alternative: CDSE Browser Workflow (Not Recommended for Sen2VM)

The Copernicus Data Space Browser offers a Copernicus DEM Mosaic workflow that produces a single raster covering your Area of Interest (AOI).

Warning

Do not use this workflow for Sen2VM. The DEM Mosaic outputs a single file that often spans more than one square degree. Sen2VM dynamically reads DEM data per square degree (cf input_description.md §1.3.1). When given a mosaic larger than 1°×1°, the code only loads part of it, resulting in geolocation without altitude data over the rest of the scene—and thus incorrect orthorectification. Use the CDSE-Copernicus-DEM-downloader instead.

If you still need to use the Browser workflow (e.g. for manual inspection or non-Sen2VM use):

  1. Go to https://browser.dataspace.copernicus.eu/ and log in.
  2. Define your AOI (polygon, file upload, or WKT).
  3. Search for Copernicus DEM, select format and resolution.
  4. Select a product, open the Copernicus DEM Mosaic workflow, and submit an order.
  5. Download the result when processing is completed.

Select Product and Workflow


Notes and Warnings

Note

Copernicus DEM data is available in different formats and resolutions. Ensure you select the appropriate type for your use case (DGED recommended for Sen2VM).

Tip

For more details, refer to the official Copernicus DEM documentation.


References


README