anyone,
first day Grass programming with python scripting; first prob;
simple I want to reclass the same raster several times; and save the file with the value loop variable at the end ... can not get it working;
import sys
import os
import atexit
import grass.script as grass
def cleanup():
pass
def main():
for i in range (2,4):
out = "reclasstest" + str(i)
rulesvar = "C:\Grass_data\datareclassfile") + str(i)
grass.run_command("r.reclass",
overwrite = True,
input = "glg@PERMANENT",
output = out,
rules = rulesvar)
return 0
if __name__ == "__main__":
options, flags = grass.parser()
atexit.register(cleanup)
sys.exit(main())
greetz, piet