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 am using r.patch to combine two raster maps in order to fill in the null values of the other. Is there a way to use r.patch but still maintaining the colortables of the separate raster maps? I do not want to change the colortable of input1 raster map A and input2 raster map B.

share|improve this question

It is only possible if the color table of the adjacent raster maps do not overlap. I don't know if r.patch maintains them but you could reassign the colors of the merged color tables after the patching (mosaicking). If there are no identical colors between the maps then the assignment (r.colors) should be successful.

share|improve this answer
I tired making the colors of the two maps different (with no identical colors). But still it did not display properly. The r.patch maintains the colortable of the 1st map in input – teamAngat Mar 22 '11 at 16:19
Perhaps try i.image.mosaic ( – markusN Mar 22 '11 at 16:54
I tried it but the result file could not be displayed in the map display. How can the .mosaic file be displayed? – teamAngat Mar 23 '11 at 9:03
Was there an error message? The result is like any other raster map... – markusN Mar 23 '11 at 13:43
I used the function to see the details of the generated map. I saw that there is an additional value of 255 for the cells when I used i.image.mosaic that is why the values were altered. I'm fixing it now. Thanks – teamAngat Mar 23 '11 at 14:06

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.