I have digitised multiple small polygons over a city boundary and its floodplain. I would like to create a raster of the run-off coefficient out of it (for a flood model). Therefore I would like to assign into my empty raster (of the run-off coefficient) different fixed values according to the shape (polygons) file that I have created. How do I do this in QGIS?

1 Answer 1


If you haven't created the raster yet, you can use the Rasterize (raster to vector) core tool. It will allow you to specify a field you'd like to burn the values in (the runoff coefficient in your case).

If you've already created a raster, you can overwrite its cell values by using the Rasterize (overwrite with attribute) core tool. Similar principle as the above-mentioned one, but you'll use an existing raster as the input layer.

  • thanks you for your answer, however it seem I will have to prompt this into the GDAL command to overwrite my file...Is there a way to do WITHOUT the GDAL command i.e. and using the normal menus of QGIS?
    – Mel
    Jun 5, 2020 at 2:59
  • Hi @Mel, for the vast majority of raster manipulations, QGIS calls in the GDAL toolbox and it's a built-in package if you've installed QGIS from the standalone installer, so you should be able to run the Rasterize tool from QGIS with "QGIS menus" and outlooks. Alternatively, you could use the v.to.rast tool from the GRASS toolbox, which is also built-in (but you have to run QGIS with GRASS). Or you could use the Rasterize tool from SAGA, again another built-in package.
    – Overlord84
    Jun 5, 2020 at 5:18

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.