DownloadSRTMTiles - Download or list SRTM tiles related to a set of images ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Download or list SRTM tiles Detailed 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. Parameters ---------- This section describes in details the parameters available for this application. Table [#]_ presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is *DownloadSRTMTiles* . .. [#] Table: Parameters table for Download or list SRTM tiles related to a set of images. +-------------+---------------------------------------+--------------------------+ |Parameter Key|Parameter Name |Parameter Type | +=============+=======================================+==========================+ |il |Input images list |Input image list | +-------------+---------------------------------------+--------------------------+ |vl |Input vector data list |Input vector data list | +-------------+---------------------------------------+--------------------------+ |names |Input tile names |String list | +-------------+---------------------------------------+--------------------------+ |tiledir |Tiles directory |Directory | +-------------+---------------------------------------+--------------------------+ |mode |Download/List corresponding SRTM tiles.|Choices | +-------------+---------------------------------------+--------------------------+ |mode download|Download | *Choice* | +-------------+---------------------------------------+--------------------------+ |mode list |List tiles | *Choice* | +-------------+---------------------------------------+--------------------------+ |inxml |Load otb application from xml file |XML input parameters file | +-------------+---------------------------------------+--------------------------+ |outxml |Save otb application to xml file |XML output parameters file| +-------------+---------------------------------------+--------------------------+ - **Input images list**: List of images on which you want to determine corresponding SRTM tiles. - **Input vector data list**: List of vector data files on which you want to determine corresponding SRTM tiles. - **Input tile names**: 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**: 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.** Available choices are: * **Download**: Download corresponding tiles on USGE server. * **List tiles**: List tiles in an existing local directory. - **Load otb application from xml file**: Load otb application from xml file. - **Save otb application to xml file**: Save otb application to xml file. Example ------- To run this example in command-line, use the following: :: otbcli_DownloadSRTMTiles -il QB_Toulouse_Ortho_XS.tif -mode list -tiledir /home/user/srtm_dir/ To run this example from Python, use the following code snippet: :: #!/usr/bin/python # Import the otb applications package import otbApplication # The following line creates an instance of the DownloadSRTMTiles application DownloadSRTMTiles = otbApplication.Registry.CreateApplication("DownloadSRTMTiles") # The following lines set all the application parameters: DownloadSRTMTiles.SetParameterStringList("il", ['QB_Toulouse_Ortho_XS.tif']) DownloadSRTMTiles.SetParameterString("mode","list") DownloadSRTMTiles.SetParameterString("tiledir", "/home/user/srtm_dir/") # The following line execute the application DownloadSRTMTiles.ExecuteAndWriteOutput() Limitations ~~~~~~~~~~~ None Authors ~~~~~~~ This application has been written by OTB-Team.