Request for changes-115: Refactoring of DownloadSRTMTiles
[Request for Changes - 115] Refactoring of DownloadSRTMTiles
- Author: Guillaume
- Additional Contributors (if different than authors)
- Submitted on 08.09.2017
- Proposed target release: 6.2
- Adopted : +3 Julien, Victor, Rémi
- Merged : 2f51a92981c11e2e8e63f6c6dd3b1bde0bcf32ce
This RFC is a refactoring of the application DownloadSRTMTiles.
Following discussions during last OTB Users Days, issues have been raised about this application : no support of SSL in OTB packages, application unable to check tiles already downloaded and tiles not available in SRTM.
Here is a description of the main changes in the application:
- there is a single parameter for tile directory : "tiledir" ("mode.download.outdir" and "mode.list.indir" has been removed)
- there is a default list of SRTM tiles hard-coded in the application. It is used to check SRTM / nonSRTM tiles. The storage structure for tile identifier is lightweight (memory size for the whole SRTM list : between 35kB and 42kB).
- reports have been changed, the application now gives the number of : nonSRTM tiles, local tiles and tiles to be downloaded. In "list" mode, the status of each tile is returned in the logs.
- For the moment, the coverage ratio is only computed based on the ratio of SRTM tiles over the total number of tiles covered.
- there are several ways to define the requested area (they can be used simultaneously):
- an image list
- a vector data list
- a list of tile names
An example of output with 'list' mode:
bin/otbcli_DownloadSRTMTiles -il ../../src/OTB-Data/Examples/QB_Toulouse_Ortho_PAN.tif -vl ../../src/OTB-Data/Input/waterways.shp -names N67E001 -tiledir ../../src/OTB-Data/Input/DEM/srtm_directory -mode list 2017-09-08 11:35:19 (INFO): Total candidate tiles: 16 2017-09-08 11:35:19 (INFO): --> 1 missing tiles in SRTM (coverage ratio is 93%) 2017-09-08 11:35:19 (INFO): --> 2 tiles already in the directory 2017-09-08 11:35:19 (INFO): --> 13 tiles to download 2017-09-08 11:35:19 (INFO): Status of each tile (NotSRTM/Local/Missing): N67E001 = NotSRTM N43E001 = Local N44E003 = Local N42W001 = Missing N42E000 = Missing N42E001 = Missing N42E002 = Missing N42E003 = Missing N43W001 = Missing N43E000 = Missing N43E002 = Missing N43E003 = Missing N44W001 = Missing N44E000 = Missing N44E001 = Missing N44E002 = Missing
Test updated with new parameter names.
SuperBuild & Packaging
M SuperBuild/CMake/External_curl.cmake M SuperBuild/CMake/External_openssl.cmake
In order to download tiles from the SRTM server, cURL has to have HTTPS support. For that, the following choice has been made in SuperBuild:
- On Linux : we compile OpenSSL, and build cURL using OpenSSL.
- On Mac and Windows : cURL doesn't use OpenSSL, but the native SSL implementation
- In order to do that, cURL has been upgraded to 7.54.1