I'm trying to create a hydro-flattened DEM according to USGS specifications. I have two rasters, a DEM of my study area and a raster that only contains the water bodies that I have flattened so the pixels represent a flat surface for each of the lakes.
I've created a polygon mask that I've used to remove the lakes from the original DEM and used the saga:invertnodata tool to create an opposite mask that I used to generate the second raster containing only the flattened lakes.
When I try to combine the two rasters, my resulting image is blank with the only values recorded in the legend as 1.79769e+308 and -1.79769e+308 (for some reason -infinity is the upper bound but that may be trivial at this point).
I cannot for the life of me figure out why adding the two rasters (using simple addition in raster calculator) results in -infinity and +infinity. I suspect is has to do the masked values in each raster have a value of 'no data' but I've tried converting each raster's 'no data' values through gdal warp, translate, and a couple other tools that are supposed to convert no data values to a specified value.
Has anyone ever encountered this, or have another method to handle and convert 'no data' to 0?
gdalinfo
) the extent of two input files? If they are not the same raster calculation tends to produce nodata raster.gdalinfo
output of each file (two input files and the problematic output layer)? By the way (if in doubt), QGIS raster calculator can handle calculation between Float32 and Float64.