Print
Written by Batuhan Osmanoglu   
Friday, 18 December 2009 21:12

Modified construct_dem.sh for downloading SRTM data

There are no FTP sites hosting the SRTM data anymore, which caused problems with available scripts. If you like you can read one of my previous articles about this: SRTM FTP Site Changed. I managed to modify the construct_dem.sh script which is a part of Doris.

I kept my modifications to a minimum, even if this meant not-so-nice implementation. From a user's point of view, what you need to know is that:

  • the modified script uses the USGS http site (http://dds.cr.usgs.gov/srtm/) as default.
  • You have to have the "wget" installed on your linux system. 
  • When using http sites it will index the links from the "http site" in a file named as the server name. (dds.cr.usgs.gov, is default).
  • This index file should be in your working directory. If not, it will be created.

The last item can be seen as a burden (bad coding etc.) but it really is OK assuming you generate all your DEMs at a central location. For example in my case there is a DEM folder in my work directory, and under that I have all my study areas. Also I wanted to stick to the original scripts "input options" for backward compatibility. Specifying index file name would require a modification to input parameters.

If you like to give it a try here is the construct_dem.sh (informal version 1.2)

 

Last Updated on Friday, 18 December 2009 22:08