On 02/03/12 15:09, Johannes Radinger wrote:
Hi,I'd like to replace all values/categories "0" by real NULL values. Furthermore I want to do that in a Python script. I tried to do it with mapcalc in the script but then I loose the category labels: grass.mapcalc("$out= if($in==0,null(),$in)", out = "in", in = "in") I am not sure if r.reclass or r.recode can be the right module here? Anyway if yes, how can they be used with a rule supplied in the python script (sstdin?). The desired approach should keep the other categories and their labels. grass.run_command("r.reclass", input="in", output="out", rules=??)
Any reason not to use r.null with parameter setnull= ? Moritz _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
