I am also struggling with that.
At present time, the best solution I have found is the following:
- remove the bridges by doing so: (i) create a polygon for each bridge (or for all of them), (ii) rasterize those polygons, and (iii) use the raster(s) to eliminate bridges from the original DEM
- interpolate the gaps with focal statistics.
However, I encounter many trobules when dealing with point nr.2. Close to the banks the interpolation is very poor, even though I am using an irregular kernel filter for the focal statystics analysis.
UPDATED ANSWER
I found a solution which works pretty well:
- clip raster by extent with a polygon that contains the part you wish to modify
- create breaklines/points which will have an elevation (you need to add the Z field when you create the layer)
- assign elevations to breaklines/points: with the vertex editor right click on the feature, on the bottom right a panel with vertices/points coordinates will appear. There you can assign the elevation to the vertices/points.
- create a mask for the part of DEM you wish to modify: (i) polyognize (create a polygon inside the points/breaklines if they do not correspond to the clip-polygon); (ii) generate a raster from the polygon (v.to.rast with 1 inside and NULL outside. Settings: GRASS Region extent = Use layer extent and Source of raster values = Val; Value=1); (iii) use r.null to replace NULL values with zeroes (settings: The value to replace the null value by = 0).
- use TIN Interpolation to generate a raster from the points/breaklines: under Interpolation Attribute select Use Z as interpolation attribute (settings: GRASS Region extent = Use layer extent and choose a resolution that is smaller than the one of the original dtm);
- clip the dtm on the mask created at 4.(iii) with raster calculator using the formula
mask_0*DTM_interp;
- combine the original DTM with the interpolated one with the following expression in raster calculator:
"DTM_clipped_at_1" * ("mask_created_at_6"=0)+"DTM_interpolated_at_5"
By following these points you will interpolate a part of the raster and insert it in the old raster.