Greetings
I have a classification raster (with values that ranges from 1-20) and I
need to reclassify them. I mean, to change (as an example):
1- > 255
2- > 100
3 -> 150
and I need to implement this on a Python script. What do you suggest to do?
I mean, that is the most robust and easy way to imp
Peña
Sent: Tuesday, September 07, 2010 12:37 PM
To: GRASS user list
Subject: [GRASS-user] Python Script for changing raster values
Greetings
I have a classification raster (with values that ranges from 1-20) and I need
to reclassify them. I mean, to change (as an example):
1- > 255
2- &
Christian Schwartze wrote:
> Following code could be one approach:
>
> os.system("cat %s | r.recode input=map_a output=map_recl" % path_to_rules)
>
> where path_to_rules is a previously created (temp) file containg the
> reclassifiying rules as for example:
os.system() shouldn't be used. E.g.