DHI-GRAS / budyko-qgis

QGIS interface to Budyko Hydological Model maintained by DTU Environment
GNU General Public License v3.0
4 stars 5 forks source link

Automate SRTM download and preprocessing? #1

Closed j08lue closed 5 years ago

j08lue commented 6 years ago

The steps are:

  1. Download relevant SRTM tiles from http://srtm.csi.cgiar.org/
  2. Merge SRTM tiles in QGIS using Raster – Miscellaneous – Merge. Specify no data value as -32768! Sometimes the algorithm crashes on the way for reasons that are not understood, but still produces the merged layer. In this case you can proceed and manually add the new layer to the project.
  3. Reproject to metric coordinate system (UTM) in QGIS using Raster-Projections-Warp. Specify no data value as -32768!
  4. Aggregate SRTM to a suitable spatial resolution, using GRAS command r.resamp.stats from the Processing Toolbox in QGIS
  5. Cut out region of interest in QGIS with Raster – Extraction – Clipper. Specify no data value as -32768!

OBS: Before running TauDEM algorithms, ensure that your no data value is a float (e.g. -32768) and not “nan” or similar. TauDEM does read the GDAL no-data tag (or similar) in the tiff metadata, but is unable to deal with non-float values in general. This can yield ridiculous results (particularly if you have ocean cells in your DEM).

j08lue commented 6 years ago

As for the SRTM download, there is a SRTM download plugin for QGIS, but it seems not to be easily scriptable. We could install it with the toolbox though and advise the users to use it. Only downside: This plugin requires a NASA Earthdata account, while SRTM can also be retrieved from anonymous sources.

Alternatives: we could use this code https://svn.openstreetmap.org/applications/utils/import/srtm2wayinfo/python/srtm.py and build our own downloader. Or we build on our own Earthdata downloader.

But the most important part is actually the preprocessing with GDAL and GRASS.

radosuav commented 6 years ago

Steps 2-5 are implemented in merge_and_warp script.