Bug report #16423
Broken io_gdal raster import in SAGA LTR package shipped with OSGeo4W
|Affected QGIS version:||2.18.7||Regression?:||Yes|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||up/downstream|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24332|
This is a really weird issue. This ticket is meant to replace #16408 for sake of clarity.
This only affects Windows.
1) In OSGeo4w installer the option for SAGA LTR says "2.3.1", but once installed "saga_cmd" says 2.3.2, which is weird per se as SAGA 2.3.2 does not exist:
2) if launching SAGA GUI of this SAGA installation it apparently seems all ok, but for instance it misses the "Import > GDAL/OGR" tools which are available in any older and newer (or even the same) versions downloaded from SAGA site. This could be related to the next point, that is the more important
3) In this OSGEo4W SAGA LTR install the raster import operation (done with the "io_gdal" module) produces a WRONG raster, where 1 are replaced with NULLs. This DOES NOT happen in any older and newer (or even the same) versions downloaded from SAGA site. This is of course a deal breaker for Processing because it calls io_gdal any time a SAGA raster tool is used
You can test with this input
and this command
saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 0 -GRIDS "imported_raster.sgrd" -FILES "bacias_lee_2014_2018_17_Binary.tif"