5

I have been using QGIS and Grass for ages and while I've noticed this issue before, I've not been bothered by it until now. It is (hopefully) a bit of a noob question but when I open GRASS in the QGIS Processing toolbox, I notice that a lot of standard utilities appear to be missing (e.g. r.in.bin and others - There are only 161 commands listed for Grass 6.4.3 and this figure should be much higher).

I am not talking about add-on plugins but standard parts of the GRASS toolset (according to the Grass documentation). Looking in the Grass bin folder, however, I can see the are there. It is not that the bin folder is not recognized as I can see many of the other utilities there in Processing. I have tried updating to the latest version of QGIS (2.18) with OsGeo4W and re-installing both Grass 6.4.3 and 7.2. I have checked the paths in Processing-options and all looks fine (in as much as the paths point to the top-level directory in each case as they always have).

How can I make the missing ones appear in the Processing toolbox?

6

The algorithms in the GRASS folder might be all there but the Processing framework requires a GRASS command to have an associated description file (saved as .txt files) to identify the correct input parameters. This is described in a grass.txt (or grass7.txt.) file which can be located in your QGIS directory. For example:

C:/Program Files/QGIS 2.18/apps/qgis/python/plugins/processing/algs/grass.txt

The following is mentioned in the first paragraph (emphasis mine):

Each GRASS command, to be executed from a processing framework element such as the toolbox or the graphical modeler, needs to be described to let it know the inputs required by the commands, the output it generates and the parameters that are used to configure it. Each command is described in a separate text file, although some commands might be split in several algorithms, needing thus several files and adding more than one new entry to the algorithms list. Splitting a grass command is usually done because the processing framework does not support optional parameters, so it will call GRASS using all parameters defined in the description file.

In the same directory mentioned above, there is a description folder which contains the files necessary for the processing framework. For me:

  • GRASS - 161 description files (161 geoalgorithms)
  • GRASS7 - 313 description files (314 geoalgorithms, I'm guessing two tools are using the same description file)

So if the algorithm you are looking for is not described in the description folder, it will not be shown in the Processing Toolbox. But you can still access all the GRASS tools by loading QGIS Desktop with 2.X.X with GRASS 7.X.X and enabling the GRASS plugin.

  • @MappaGnosis - Most welcome, hope it was helpful :) – Joseph Jan 9 '17 at 11:19
  • Very - I'm now writing a new description file for the tool(s) I want :) – MappaGnosis Jan 9 '17 at 11:42
  • @MappaGnosis - Nice one! If you get it working, please post it as an answer =) – Joseph Jan 9 '17 at 11:44
  • Not having much success :( I can get the dialog box to appear with all the correct options in it and it appears to run, produces and output file but that file is always empty. I've tried a couple of utilities and get the same thing. Mind you I get that same problem with one or two 'pre-described' utilities and get the impression that some utilities don't really work very well through the Processing toolbox from searching this forum! So I don't know whether it is my problem or a basic flaw in processing Toolbox. – MappaGnosis Jan 9 '17 at 16:02
  • @MappaGnosis - That is unfortunate! You could always ask a new question regarding your comment and see if anyone can successfully achieve this :). I'd be more than happy to test this too at some point. – Joseph Jan 9 '17 at 16:11

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.