I have about 100 raster (grid) files (in the "ascii grid" format) of drought index. All cover the same area of interest but at different times of year. I need to create images from the grids with exactly same color scheme: index>100 - dark red, index 50-99 - red, index 25-49 orange, index 10-25 yellow, index 0 - 10 white.

I tried to do this in SAGA GIS, but SAGA GIS always automatically generates the color scheme by dividing the full range of values in equal intervals.

Is there any free GIS that you would recommend for doing this type of task? (I have some small experience with bat file or python scripting..)

4 Answers 4


Have a look at the raster package in R. You can plot your grids in a loop with a defined color scheme.

brk <- c(0, 10, 25, 50, 100)
col <- c('yellow', 'orange', 'red', 'darkred')

d <- dir("path/to/your/grids", pattern= ".asc")
for(i in d){
    r <- raster(i)
    plot(r, col=col, breaks=brk)

(code not tested...)

  • I ended up using R for my task. I used the sp package and the spplot function. Now I have a script that does all that I need in a loop: for each day: extract values, create a SpatialPointsDataFrame, create a SpatialGridDataFrame using kriging interpolation, and plot the grid with a pre-defined color scheme with the spPlot function. Apr 9, 2013 at 10:17

Try GridConvert or Landserf. The first one has better Batch capabilities, the latter is better for visualization purposes.

Nevertheless I think both are not ideal, if you want to use the same colormap for each converted raster. I'd wonder if it is possible to define a specific colormap and attach it to every raster image in GDAL.


You could do this very easily in GRASS GIS using r.colors and by defining your own colour scheme using the rules option. More details here


You could define your own color scheme in SAGA. Have a look at the object properties window:

Settings - Colors - Type - Lookup Table

You could save your color scheme and apply it to each of your raster grids.

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.