I am trying to extract the various flood depth extents from this Flood Depth Raster however I am struggling, and I am not sure if it is to do with all the values being under 1 Band. Would anyone know of a way to extract it into shapefiles or a format I can use to put in AutoCAD. I am only interest in the depths within the line which is why I've kept the style to show just 0.0m - 1.2m. I have left a sharepoint to the files.


My QGIS map with the raster depths classed into 0.3m ranges

Raster Layer Information

Raster Layer Bands Information

  • 1
    What do you mean by "I am only interest in the depths within the line..."? Are you saying you want to extract only the pixels that intersect the red line in your image? Nothing can be in a line as a line has no area...?
    – Hornbydd
    Commented Jun 20 at 8:45
  • I've already been able to extract the data within the shape extend but the problem still occurs where if I try to convert the raster using the Polygonize tool. The red line was to show the range I was interested in which was 0.0m to 1.2m as the depth max value is 83m
    – Jack
    Commented Jun 20 at 8:56

2 Answers 2


First of all you need to convert your line into a Polygon and then mask or clip your raster file with water depth based on the Polygon (mask layer) you just created. enter image description here enter image description here

The next step is to use raster calculator to select the pixels whose values are between a specific range and save a new raster image.

enter image description here

The last step is to convert the latter raster file into a Polygon. enter image description here

You need to repeat this process as many times as the number of layers/polygons you want to create.

To import a polygon into AutoCAD, saving or exporting the polygon as a .dxf file is a good idea. This format is widely supported by AutoCAD and other CAD software. Right-click on the layer and select "Export" or "Save As." Choose the file format as .dxf.

While .dxf is a straightforward option, you can also use shapefiles (.shp) in AutoCAD, particularly in AutoCAD Civil 3D. Use the command MAPIMPORT to import shapefiles.

  • This is great and works thank you, may I just ask why you then multiply by the band? I understand the part of the expression for between 0.3m and 0.6m.
    – Jack
    Commented Jun 20 at 9:35
  • If you want to keep the initial values, you need to multiply by the raster. Otherwise, you may use just the condition. Commented Jun 20 at 9:49

Based on your question I think you want to do two things:

  1. Extract values of the raster within the red site boundary shown on the image
  2. Convert the resulting raster to a series of polygons showing depths

For your extraction you need to ensure the red boundary is a polygon. You can then use the Clip Raster By Mask Layer tool in Raster>Extraction to remove just this section of the raster and save it into a new raster.

Once your have this subsection of the raster you can use the Raster to Vector conversion tools in Raster ► Conversion ► Polygonize (Raster to Vector) to convert the raster grid to polygons.

The raster to vector tool is a little heavy handed in terms of how it splits the polygon up. If you need specific value bands of depth e.g. 0.1 - 0.5 and the polygonise tool doesn't work to do this you may need to extract just those values using raster calculator and a raster mask. You can then polygonise these individual rasters.

  • I've tried the Polygonize Tool but it would just produce a layer and no shape plus I was keen to extract the depth Bands in 0.1m bands. I tried the raster calculator but I am having trouble with the Raster Calculator Expression
    – Jack
    Commented Jun 20 at 9:11

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.