Tutorial: Create a groundwater level map from borehole data and a DEM

11. Replace nodata values with DEM elevation

Because the scatter plot looks reasonable, we're going to replace the nodata values in the elevation field of the Boreholes_Z.shp layer with the values from the DEM.

1. Open the attribute table from Boreholes_Z.shp layer.

2. Click to deselect all.

3. Click to toggle to editing mode.

4. Change the output to elevation and click the button to build the expression.

5. In the Expression dialogue build the following expression:

if( "elevation" < 0,  "Z" ,  "elevation" )

This means: if the elevation field has values less than zero, then use the Z field values, else use the elevation field values.

6. Click OK.

The expression should now look like this in the attribute table:

7. Click Update All.

Now all missing values have been replaced with the elevation from the DEM.

8. Click  to to toggle off editing and click Save to save the results.

In the next section we're going to calculate the absolute groundwater levels in the boreholes.