SRTM DEM data downloader in Whitebox GAT

I just finished developing a tool for Whitebox GAT that will automatically download Shuttle Radar Topography Mission (SRTM) digital elevation models (DEMs) from the USGS SRTM FTP site. SRTM-3 data are among the best global elevation data, with a grid resolution of approximately 90 m. In many areas SRTM data provide the only topographic data set available. Within the United States, the SRTM-1 dataset provides an improved 30 m resolution. Not only does this Whitebox tool retrieve the SRTM tiles contained within the bounding box of a specified area of interest, but it will also import the tiles to Whitebox GAT, fill missing data holes (which are common with SRTM data in rugged terrain) and mosaic the tiles.

Whitebox's new Retrieve SRTM Data tool

Whitebox’s new Retrieve SRTM Data tool

There have been many times in the past when I have needed to download numerous SRTM files, import the files, fill the missing data holes, and finally mosaic the individual tiles. It can be a laborious workflow indeed. This tool will save me a great deal of time, and so I’m rather excited about it. It’s as though the data magically appear in Whitebox!

SRTM data in Whitebox GAT

SRTM data in Whitebox GAT

Of course, with Whitebox GAT’s extensive Terrain Analysis and Hydrological Analysis toolboxes, there’s plenty of interesting things that you can do once those data do magically appear.

90 m DEM of the entire British Isles

90 m DEM of the entire British Isles. (Note that the image is of a coarser resolution than the actual DEM.)

As an example, I created the SRTM-3 90 m DEM of the entire British Isles shown above in 4 minutes, 56.27 seconds, including the time to download 91 individual SRTM tiles, fill their missing data gaps, and mosaic the tiles. My son was even watching Netflix during my downloading, so I can only imagine how much that slowed things down! I only wish that other data providers could follow a similar data sharing model as the USGS and use an anonymous FTP server to distribute their data. If that were the case, we could have many other data sets automatically ingested directly into Whitebox. I’ll release this new SRTM retrieval tool in the next public release of Whitebox GAT (v 3.2.1), which will likely be sometime later this summer. If you are as keen to try it out as I am, email me for a preview copy. If you have any other comments or feedback, please leave them in the comments section below. As always, best wishes and happy geoprocessing.

John Lindsay

*****EDIT*****

Version 3.2.1 of Whitebox has now been released, with the SRTM downloader tool embedded in the Data Layers menu. Please let me know if you have any issues in using the tool.

****EDIT****

I’ve included an image of the DEM of Ireland for John below:

SRTM DEM of Ireland

SRTM DEM of Ireland (Click to enlarge)

10 thoughts on “SRTM DEM data downloader in Whitebox GAT

  1. SaultDon says:

    I request for us Canucks, GeoBase DEMs at 50/250k (ftp://ftp2.cits.rncan.gc.ca/pub/geobase/official/cded/) and CanVec 50k Vector Data (ftp://ftp2.cits.rncan.gc.ca/pub/canvec/). They’re both distributed under an Open Data license.

    I think these types of download tools would benefit by allowing the user to point to a vector or raster file as their Area of Interest as well if they don’t want to enter Lat/Lon pairs. It would also be nice to have a single download tool where the first pulldown is a selection of the dataset your after.

    CanVec comes in a multitude of formats (GML, FileGDB, shape/zipped) and each require a little bit of massaging to make it usable.

    • I too wish that this were possible. Unfortunately, the problem with GeoBase and the CanVec datasets are that they are not available through an anonymous FTP site…you need to have a GeoBase account set up and be logged in to download the data. That doesn’t lend itself to this style of automatic downloading. Canada’s data sharing policies are kilometres behind the US, I’m afraid. They’re getting better though so maybe there’s hope for us Canucks!

      John

      • SaultDon says:

        The GeoBase site is just archaic, but you can click on those FTP links and an anonymous account works =) I think GeoBase just asks for an account because of the “old days” and once you have the FTP links, no need to go to GeoBase at all.

        I have scripts on linux that download these via anonymous ftp account and have worked like that for ages. The CanVec FTP used to have a notice asking that users use their email as their username, but that’s no longer the case since the adoption of the Open Data licenses.

        http://data.gc.ca/eng/open-government-licence-canada

      • I didn’t realize that that was the case. I’ll have to take a closer look at it to see if I can develop a similar script for downloading GeoBase/CanVec data into Whitebox. I know several people that would be thrilled by that.

  2. johnwallx says:

    This looks like a great tool, but I am unable to get it to work. I have saved the script as a Groovy script. Searched for “pluginHost.zoomToFullExtent()” and commented it out with “//”. I am attempting to download data of Ireland (Start Lat: 56, End Lat: 51, Start Long: -11, End Long: -5). I thought that my numbers might be reversed (Start and End). So, I switched those. It results in a DEM (.dep) that has erroneous data and is unable to be zoomed to. It also impacts the Layers tab causing it to switch to scroll. I’m uncertain why this might be the case. Any ideas? Did I miss a step?

    • Hi John,

      Thanks for your comment. It’s odd that you ran into this error because I used the same starting and ending lat/long values and you and I got myself one perfect DEM of the whole of Ireland (and a few bits of that other nearby island). I’ve updated my original post to include this beautiful DEM. Whether you include the high lat/long or the low lat/long value as the starting or ending value shouldn’t matter as I’ve programmed the tool to handle either case. It may be that I need to update the code for the SRTM download tool that is currently in the repository, but I don’t recall making changes to it recently. It may have worked for me because I am using the tool in the trunk version of Whitebox rather than 3.2.0. I’m going to try to take some time this week and release version 3.2.1. Hopefully this will resolve whatever problem it is you are experiencing.

    • Hi John,

      Just to let you know, I’ve now released v. 3.2.1 which has the SRTM tool embedded and it should work for you. It seemed that the problem was that the tool was calling a function that was not available in 3.2.0. I guess that’s what you get with beta versions of things! Anyhow, let me know if you have any further problems.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s