Keith1815 / laharz

Create Lahar Maps with QGIS
Apache License 2.0
2 stars 1 forks source link

Ability to process rectangular pixels #11

Closed Keith1815 closed 4 months ago

Keith1815 commented 6 months ago

Fails when using a DEM which has rectangular pixels. This manifests when using SRTM 1 arc data above 50° north and below 50° south latitude where it is sampled at a resolution of 2 arc-second by 1 arc-second. There are probably other examples.

Keith1815 commented 5 months ago

When using QGIS and the GRASS r.stream.extract routine to creates the stream .tif file, the stream file is created as a 2 arc second square pixel map. As this is different from the DEM file the program reports an error and returns to the input screen.

As a temporary resolution, use the GDAL translate routine to convert the DEM into the same format as the streams file.

Keith1815 commented 5 months ago

The solution is for LaharZ to detect the file resolution differences and when necessary, run GDAL's translate routine to convert the DEM into the same format as the streams file (and write it out with the filename _c.tif). This will be resolved in Version 2.1

Keith1815 commented 4 months ago

In version 2.1.0, LaharZ will process rectangular pixels. In the case where the streams file (and flow direction file) has square pixels and the DEM file has rectangular ones, the DEM file is resampled using GDAL translate (to square pixels to match the streams file).