0

We are writing a script with the simple Python editor (GRASS GIS). We try to set the rules for a reclass command within the script (without creating a txt.file manually).

Is it possible to set the rules within the script or is it possible to create a txt.file with the simple Python editor?

1
  • Have you tried using Python functions to write your text file? This sounds like something you should research at Stack Overflow rather than ask here. – PolyGeo Jan 10 '20 at 19:40
0

You can take a look at existing Python code in the main GRASS GIS repository, for example here:

https://github.com/OSGeo/grass/blob/master/scripts/r.reclass.area/r.reclass.area.py#L139

Here, the output of one command is used to generate the rules file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.