Closed kerryleith closed 1 year ago
Meltons ruggedness value should reflect the maximum catchment relief / catchment area^0.5 rather than the local relief / area^0.5 as is currently implemented.
Finding the max catchment relief in topotoolbox is doing my head in, but there's an implementation for SAGA here: https://sourceforge.net/p/saga-gis/code/ci/master/tree/saga-gis/src/tools/terrain_analysis/ta_hydrology/melton_ruggedness.cpp#l23
FYI, a work-around using SAGA GIS via Matlab in windows:
%save grid to temporary file GRIDobj2geotiff(DEM,'temp.tif'); %path to SAGA gis files (NOT QGIS installed version) exepath = 'C:\saga-8.2.2_x64\'; %convert to saga grid, run Meltons ratio tool, convert back to tif, and replace .tfw file system(sprintf('%s%s%s%s%s%s', exepath,'saga_cmd io_gdal 0',' -FILES:', 'temp.tif',' -GRIDS:', 'temp.sgrd')) system(sprintf('%s%s%s%s%s%s', exepath,'saga_cmd ta_hydrology 23',' -DEM:', 'temp.sgrd',' -MRN:', 'mrn.sgrd')) system(sprintf('%s%s%s%s%s%s%s%s', exepath,'saga_cmd io_gdal 1',' -GRIDS:', 'mrn.sgrd', ' -FILE:', 'mrn.tif', ' -FORMAT:', 'GeoTIFF')) movefile('temp.tfw', 'mrn.tfw'); mrn = GRIDobj('mrn.tif'); imageschs(DEM,mrn, 'caxis', [0 16])
delete('temp.tif', 'temp.sgrd', 'temp.sdat', 'temp.prj', 'temp.mgrd') delete('mrn.tif', 'mrn.tfw', 'mrn.sgrd', 'mrn.sdat', 'mrn.prj', 'mrn.mgrd')
Thanks Kerry, and sorry that it took a while to answer. Now, there is a new function to calculate Melton's ruggedness. Cheers, Wolfgang
Meltons ruggedness value should reflect the maximum catchment relief / catchment area^0.5 rather than the local relief / area^0.5 as is currently implemented.
Finding the max catchment relief in topotoolbox is doing my head in, but there's an implementation for SAGA here: https://sourceforge.net/p/saga-gis/code/ci/master/tree/saga-gis/src/tools/terrain_analysis/ta_hydrology/melton_ruggedness.cpp#l23
FYI, a work-around using SAGA GIS via Matlab in windows:
%save grid to temporary file GRIDobj2geotiff(DEM,'temp.tif'); %path to SAGA gis files (NOT QGIS installed version) exepath = 'C:\saga-8.2.2_x64\'; %convert to saga grid, run Meltons ratio tool, convert back to tif, and replace .tfw file system(sprintf('%s%s%s%s%s%s', exepath,'saga_cmd io_gdal 0',' -FILES:', 'temp.tif',' -GRIDS:', 'temp.sgrd')) system(sprintf('%s%s%s%s%s%s', exepath,'saga_cmd ta_hydrology 23',' -DEM:', 'temp.sgrd',' -MRN:', 'mrn.sgrd')) system(sprintf('%s%s%s%s%s%s%s%s', exepath,'saga_cmd io_gdal 1',' -GRIDS:', 'mrn.sgrd', ' -FILE:', 'mrn.tif', ' -FORMAT:', 'GeoTIFF')) movefile('temp.tfw', 'mrn.tfw'); mrn = GRIDobj('mrn.tif');
imageschs(DEM,mrn, 'caxis', [0 16])
delete('temp.tif', 'temp.sgrd', 'temp.sdat', 'temp.prj', 'temp.mgrd') delete('mrn.tif', 'mrn.tfw', 'mrn.sgrd', 'mrn.sdat', 'mrn.prj', 'mrn.mgrd')