DownloadSRTMTiles¶
Download or list SRTM tiles
Description¶
This application allows selecting the appropriate SRTM tiles that covers a list of images. It builds a list of the required tiles. Two modes are available: the first one download those tiles from the USGS SRTM3 website (http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/), the second one list those tiles in a local directory. In both cases, you need to indicate the directory in which directory tiles will be download or the location of local SRTM files.
This application has several output images and supports “multi-writing”. Instead of computing and writing each image independently, the streamed image blocks are written in a synchronous way for each output. The output images will be computed strip by strip, using the available RAM to compute the strip size, and a user defined streaming mode can be specified using the streaming extended filenames (type, mode and value). Note that multi-writing can be disabled using the multi-write extended filename option: &multiwrite=false, in this case the output images will be written one by one. Note that multi-writing is not supported for MPI writers.
Parameters¶
Input images list -il image1 image2...
List of images on which you want to determine corresponding SRTM tiles.
Input vector data list -vl vectorfile1 vectorfile2...
List of vector data files on which you want to determine corresponding SRTM tiles.
Input tile names -names string1 string2...
List of SRTM tile names to download. This list is added to the tiles derived from input images or vectors.The names should follow the SRTM tile naming convention, for instance N43E001.
Tiles directory -tiledir directory
Mandatory
Directory where SRTM tiles are stored. In download mode, the zipped archives will be downloaded to this directory. You’ll need to unzip all tile files before using them in your application. In any case, this directory will be inspected to check which tiles are already downloaded.
Download/List corresponding SRTM tiles -mode [download|list]
Default value: download
- Download
Download corresponding tiles on USGE server. - List tiles
List tiles in an existing local directory.
Examples¶
From the command-line:
otbcli_DownloadSRTMTiles -il QB_Toulouse_Ortho_XS.tif -mode list -tiledir /home/user/srtm_dir/
From Python:
import otbApplication
app = otbApplication.Registry.CreateApplication("DownloadSRTMTiles")
app.SetParameterStringList("il", ['QB_Toulouse_Ortho_XS.tif'])
app.SetParameterString("mode","list")
app.SetParameterString("tiledir", "/home/user/srtm_dir/")
app.ExecuteAndWriteOutput()