[GRASSLIST:1059] Re: reclass pixel values

Juergen uzs8jz at uni-bonn.de
Wed Oct 25 04:59:01 EDT 2000


For changing just a few cells in a raster map maybe 'd.rast.edit' is the
right choice for you.
Or you zoom to the part of the map you want to change using
'd.rast.zoom' and than change the cell values using 'r.mapcalc' with
something like than this:

newmap = if(oldmap==60,4,oldmap)
newmap1 = if(oldmap==70,5,oldmap)
...

After that, you can patch the maps together with 'r.patch'

Juergen



Andrzej Wroblewski wrote:
> 
> Hi !
> 
> Please help me to solve this problem:
> How convert data (raster, vector, site) from wgs84 coordinate system to UTM.
> 
> How can I change pixel values in small area of biggest picture. Using reclass implenented in GRASS 4.3, change all pixel with this value.
> For example:
> this is a part of raster data (presented in pixel values):
> 
> 2  2  2  2  2  3  3  4  3  2  3
> 3  3  2  3  4  5  6  4  4  4  3
> 4  4  5  5  5  5  5  5  4  4  3
> 4  5  5  4  4  4  4  5  3  3  3
> 4  5  5  60 60 70 60 5  4  5  5
> 4  5  6  60 60 70 70 5  5  5  5
> 6  6  50 50 60 40  6 6  6  5  4
> 3  4  4  5  5  4  3  3  3  3  4
> 5  5  5  4  3  3  4  5  5  3  3
> 5  5  6  7  5  5  5  5  6  6  6
> ...
> ...
> ...
> ..
> 60 60 40 56 54 34 54 70 60 ..
> 
> Pixel value range is 1-255.
> 
> I want change pixel only form central part. Not changing rest.
> 60-->4
> 70-->5
> 40-->3
> But if I use r.reclass, I change those values in whole picture.
> 
> Any idea ??




More information about the grass-user mailing list