What are some recommended approaches for flattening a broad area through a road, as a means of connecting the upstream and downstream parts of a stream bed?

I am not trying to connect these areas for flow accumulation or stream network computation, but to model the area as a dam within HEC-RAS - so single cell connections, that would work for watershed / flow accumulation focused analyses, will not work here.

The area I wish to flatten, preferably smoothed from upstream edge to downstream edge, is shown below in blue. Aerial imagery with LiDAR overlaid.

enter image description here

  • How many of these areas do you have? I can think of a potential work around, but its probably not the best to do across multiple instances
    – Lovette
    Jul 25, 2018 at 12:43
  • Just this one for now. However, this is a process that I will need to repeat on other DEMs, one area at a time / per DEM, one DEM per project.
    – traggatmot
    Jul 25, 2018 at 12:44
  • 1
    I'd replace the elevations within the blue polygon with a large negative elevation in the LiDAR DEM and then fill the resulting depression. Jul 25, 2018 at 13:50
  • @WhiteboxDev Now that is an interesting idea.
    – traggatmot
    Jul 25, 2018 at 16:06

2 Answers 2


I suggest rasterizing the polygon, replacing the values in the the DEM coincident with the polygon with large negative values, and then filling the modified DEM. This approach ensures that the flat surface cut into the road embankment has the elevation of the downstream-most edge of the polygon and will make any subsequent flow modelling easier. Here is an example:

enter image description here

enter image description here

In the above analysis, I used the Con tool to update the elevation values coincident with the polygon to -999.0, filled the modified DEM, and then used the Con tool a second time to create the final DEM (if value not in polygon assign original DEM, else assign filled DEM). This final step isn't strictly necessary but ensures that the filling only modifies grid cells in the polygon.

Also note that this process can be run once, simultaneously solving an arbitrary number of polygons.


Admittedly, this seems like a bit of a hack, but I think the general workflow will solve your problem.

  1. Draw a polygon over the area with "spurious" elevation values, i.e. your bridge. This should connect and maybe even slightly overlap the "correct" elevation values in the riparian area. Essentially your blue box
  2. Polygon to Raster, making sure to match cell size and snapping, and set cell values as Null or a value far outside the range of your elev raster.
  3. Burn the null raster into your elevation raster (SetNull may do the trick)
  4. Use a conditional statement and Focal Statistics to fill the Null values. Something like Con(IsNull("raster"),FocalStatistics("raster",NbrRectangle(4,4),"MEAN"),"raster"). The one issue here could be that the Focal Stats would draw from the slope out of the riparian area, but playing with the neighborhood could solve that.

This could be scripted to a degree, where you would feed in the new polygon for each instance of a bridge that you want to remove. It would then just require drawing appropriate polygons for each one.

EDIT: As suggested by WhiteboxDev in a comment above, Fill may be a good substitute for step 4 as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.