Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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..)

share|improve this question
add comment

4 Answers

up vote 1 down vote accepted

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")
pdf('your_plots.pdf')
for(i in d){
    r <- raster(i)
    plot(r, col=col, breaks=brk)
    }
dev.off()

(code not tested...)

share|improve this answer
    
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. –  jirikadlec2 Apr 9 '13 at 10:17
add comment

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

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.