I would like to modify a raster (pixel values) in QGIS.

The plugins "value tools" can easily provide me with the value of the pixel of my raster. However I don't know how to modify it.

I have found the Q&A titled Manually correcting raster DEM (OpenSource)? which says that it is possible to do it in GRASS. I'v spent several hours on trying to understand how grass works without success.

I can't find the d.rast.edit tool in the sextante plugin.

Is there another way to acess it?


8 Answers 8


Since this is the #1 Google result for 'qgis raster editing' at this time, I thought I'd add that there is now the 'Serval' plugin that lets you modify pixels much like in Paint.

How to use: https://github.com/erpas/serval/wiki


Update: there is this easy way:

  1. make point layer with points over pixels you want change. With column called "newvalue"
  2. Use Raster / Conversion / Rasterize
    • select you point layer, field "newvalue"
    • as target use your raster/grid.
    • keep existing size and resolution


If there are applicable rules than as it was mentioned in other answers there is Raster Calculator.

If you can't use d.rast.edit (as mentioned in linked thread) I am not aware of any visual tool of to do it manually. The workaround is to export raster to ASCII Gridded XYZ (*.xyz) (or other text format) so you can edit it in text editor where you find your x/y and change the z.

There is also paid software called Leveler (http://www.daylongraphics.com/products/leveller/) - raster/grid visual editor which allow to modify surface in "Simcity" style. I haven't found any free tool for that.


SAGA GIS allows you to edit pixel values in a raster, one at a time. This is very useful for some purposes, e.g. remote sensing where you might what to select a specific pixel for spectral analysis. If you select the grid that you want to edit in the 'manager' panel, select the 'attributes' tab in the properties panel, and you can select a single pixel, or drag and select a block of pixels on screen, and then type in their values into the matrix that will be displayed under the attributes.

An option modify one pixel at a time with QGIS is to use the experimental plugin Serval to set a different value to a specific pixel.


Try this: The Serval plugin for QGIS allows editing values of a single raster cell.


But I'm searching a tool to modify raster values along a line/polyline with values at ends of lines/polyline taken from raster.

  • 2
    Welcome to GIS SE! Is this an answer, a question, or both?
    – Aaron
    Commented Jun 15, 2017 at 11:49

Or using ThRasE Qgis plugin designed for that.

Disclosure: I developed this plugin, and I don't want to promote it, I just want to share another option


You can use the Raster Calculator in QGIS. This tutorial was a big help for me:


  • 1
    Thank for this tutorial. However, it might be a little tricky to use this tool just to modify few pixels !
    – Renaud
    Commented Nov 14, 2012 at 8:56

If you want to do this by code you can use the GDAL library :


  • I can't wait the plugin using this command of the gdal library to get a UI to modify a raster. It is funny to see how many tool exists to modify a vector layer and nothing for raster !
    – Renaud
    Commented Nov 14, 2012 at 8:59

You can only remap one value at a time with Raster Calculator and it doesn't let you specify the value type of the raster; it uses float 32 I think, which wasteful if just a byte is required. Rastercalc is better, but still only allows you to remap one value at a time.

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.