Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Is it possible to manually correct a 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?

share|improve this question
Do you always want to edit one specific pixel at a time? Or do you want to change according to some rules? – underdark Nov 13 '12 at 11:29
I want to edit one specific pixel at a time – Renaud Nov 18 '12 at 17:19

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 ( - raster/grid visual editor which allow to modify surface in "Simcity" style. I haven't found any free tool for that.

share|improve this answer
A while back I asked for software to modify DEMs Simcity style :) Thanks for that!… – Mort Jun 12 '15 at 6:50

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

share|improve this answer
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 Nov 14 '12 at 8:59

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

share|improve this answer
Thank for this tutorial. However, it might be a little tricky to use this tool just to modify few pixels ! – Renaud Nov 14 '12 at 8:56

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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