Closed nikosGeography closed 2 years ago
I'm pretty certain that all of the modules in this repo aren't in a default QGIS installation. All the modules here are addons, and aren't installed by default on GRASS.
If someone knows if there's a common, official way to add addons in QGIS, I'd like to hear. But at least I can help you to add it manually in your installation, with a dialog box and all.
I see you removed the issue template that contained some information I need to help you, like the platform you're using and it's version. Do you work on Windows?
Hello Nikos, QGIS Processing toolbox does not ship GRASS addons, only core modules. So, to use it, you need to launch GRASS and install the addon with g.extension r.gwr
.
Dunno how to install GRASS addons in QGIS though. I darkly remember there was some discussion on that in the past. One possible way that I can think of is using GRASS plugin in QGIS, open a mapset, get the terminal and run the g.extension command above. Still, that requires to set an environmental variable for the addon to work within QGIS:
Thank you all for your help. I am using Windows 10, GRASS GIS v7.8.6 and QGIS v3.18. As we speak I am trying to install the add-on in GRASS. In the picture attached, there are some boxes under "Options", should I check any of them?
I already edited the options for a "core" module for QGIS. QGIS has some .txt description files that create the dialog boxes. In Windows, the description files are in C:\OSGeo4W\apps\qgis\python\plugins\grassprovider\description\
. They are hand written for QGIS (some core modules don't have all the GRASS options to not scare off new users and help them homogenize the terminology between the software).
If having the addon installed in GRASS makes it possible for QGIS to find like any core module, then adding a description file should work. (Its clear that closing and reopening QGIS after installing the addon should be a good thing to do).
If we take for example the r.surf.idw.txt description file:
r.surf.idw
Surface interpolation utility for raster layers.
Raster (r.*)
QgsProcessingParameterRasterLayer|input|Name of input raster layer|None|False
QgsProcessingParameterNumber|npoints|Number of interpolation points|QgsProcessingParameterNumber.Integer|12|True|1|None
QgsProcessingParameterBoolean|-e|Output is the interpolation error|False
QgsProcessingParameterRasterDestination|output|Interpolated IDW
The first three lines are to identify the module:
The next lines are all the input and output parameters, one per line. Fields are separated by pipes (|
) The number of fields change, for example per type of input:
The next are a little more variable:
There is a help file, but this file is not up to date though: https://github.com/qgis/QGIS/blob/master/python/plugins/grassprovider/grass7.txt
Thank you @echoix for the detailed explanation. I managed to install the plugin as you can see in the image. There were some issues though.
ERROR: Unable to read manual page: [Errno 2] No such file or directory: 'C:\\Users\\Geography\\AppData\\Roaming\\GRASS7\\addons\\docs\\html\\r.gwr.html'
. I know that such directory doesn't exist. I found the the directory you mentioned above but mine is C:\Program Files\QGIS 3.22.2\apps\qgis\python\plugins\grassprovider\ex. But I can't find the r.gwr.txt description file.I see that the plugins installation folder is in C:\Users\Geography\AppData\Roaming\GRASS7\addons\
The description file effectively doesn't exist, I explained how to create it to show in QGIS for you. It is not needed at all to use in GRASS only.
It seems the Windows build failed: https://wingrass.fsv.cvut.cz/grass78/x86_64/addons/grass-7.8.6/logs/r.gwr.log
\|
I was searching for r.gwr in QGIS (v3.18 & v3.22) but I couldn't find it (same with GRASS GIS v7.8.6). I am using Windows 10, if that's relevant. Can you please help?