kgobakis

[Java] Change cell values in a raster

Discussion created by kgobakis on Mar 6, 2012
Hi,
I want to change the cell values on a raster.
I make a raster that reprend fire danger. The danger levels are "VERY LOW"=1(raster cell value),"LOW"=2,"MEDIUM"=3,"HIGH"=4,"EXTREME"=5. On every raster i have only 2 of the danger levels appear ie 4,5. I use IRasterRenderer to assign the name and a color for each danger level. But if i have not the all different raster values (1-5) only the raster values that i have appear on the TOCBean ie. raster values=2,3 => appear on the TOCBean "LOW" and "MEDIUM" and the raster changes to the assing colors. But i want all the danger levels to appear on the TOCBean. So i want to change 5 cell values of the raster (0,0)=1,(0,1)=2,(0,2)=3,(0,3)=4,(0,4)=5 so all the danger levels to appear on the TOCBean.

Outcomes