I am building a groundwater model and I need to assign elevations to the base of geologic units (where the unit is present) and at a minimum thickness where the unit is not present. I have a topography raster that covers my entire model area and raster of the geologic units that cover only the area where the unit is present.
I want to use raster calculator to calculate layers base elevation based on whether the unit is present or not.
I tried using a Boolean expression in raster calculator.
For example, for layer 1. I want to assign the base elevation of the layer to the base of FILL where the FILL unit is present and where the unit is not present, assign base of layer to 1 m below the topography.
I was using the following expression
((("topography" - "FILL" >=1)* "FILL") + (("topography"-"FILL"<1)* topography_minus_1)
For some reason, this is not working and it only calculates a really tiny area instead of completely across the domain.
I thought it might have to do with the FILL unit being on a different grid to topography, so I tried r.resample to try and expand the extent of the FILL unit but when I put in the extent of the topography raster and try and resample, it crashes and then QGIS shuts down.
FILL dimensions X: 865 Y: 559 Bands: 1 TOPOGRAPHY dimensions X: 3295 Y: 2056 Bands: 1
How can I make these layers from my rasters based on a boolean expression?