[GRASS-user] Python Script for changing raster values
Christian Schwartze
christian.schwartze at uni-jena.de
Tue Sep 7 07:36:21 EDT 2010
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:
1:1:1.1:1.1
2:2:7.5:7.5
3:3:0.4:0.4
Christian.
From: Luisa 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- > 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 implement this?
Thanks
Luisa
--------------------------------------------------------------------------------
_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100907/cdcc5539/attachment.html
More information about the grass-user
mailing list