A DTM folder is needed to process data with MAJA to match the geographical extent of the corresponding L1C input product. When using startmaja, the creation of the folder in Maja-format is automatically attempted. For this the repRAW
and repGSW
directories in your folders.txt
file need to be set.
If you wish to prepare the DTM prior to launch startmaja (eg. for network access constraints), you may use the dtmcreation tool outside of startmaja. The binary is located is the same directory (eg. ‘~/MAJA/4.8.0/bin’) :
usage: dtmcreation [-h] -p PRODUCT [-o OUT_DIR] [-d DEM_DIR] [-w WATER_DIR] [-t TEMP_DIR] [--type_dem {srtm,eudem,glo30}] [-c COARSE_RES] [--full_res_only] [--geotiff_compression] [-v] [--add_r3_res]
optional arguments:
-h, --help show this help message and exit
-p PRODUCT, --product PRODUCT
The path to a Landsat-8, Spot, Venus or Sentinel-2 L1C/L2A product folder.
-o OUT_DIR, --out_dir OUT_DIR
Output directory. Default is the current directory.
-d DEM_DIR, --dem_dir DEM_DIR
The path to the folder containing the downloaded DEM files/archives.If not existing, an attempt will be made to download them.
-w WATER_DIR, --water_dir WATER_DIR
The path to the folder containing the GSW occurence .tif-files.If not existing, an attempt will be made to download them.
-t TEMP_DIR, --temp_dir TEMP_DIR
The path to temp the folder.If not existing, it is set to a /tmp/ location
--type_dem {srtm,eudem,glo30}
DEM type. Default is srtm.
-c COARSE_RES, --coarse_res COARSE_RES
Coarse resolution in meters. Default is 240
--full_res_only Output full resolution imgs only. Discards the coarse_res parameter.
--geotiff_compression
Activate internal geotiff compression to save disk space and read time.
-v, --version show program's version number and exit
--add_r3_res add 60m resolution to the DTM. Be careful, this parameter is available only with Sentinel-2 product.
As an example, for a Sentinel-2 product and a 120m resolution :
~/MAJA/4.8.0/bin/dtmcreation -p ~/L1C/LosAngeles/T11SLT /S2A_MSIL1C_20230503T182921_N0509_R027_T11SLT_20230503T233258.SAFE -o ~/DTM/ -w ~/DTM/gsw -t /tmp -c 120