[QGIS-Developer] Accessing GRASS GIS addons from within QGIS
Nikos Alexandris
nik at nikosalexandris.net
Wed Feb 6 07:43:26 PST 2019
Dear QGIS team,
Dear GRASS GIS team,
I kindly ask for some response on how to offer access to a GRASS GIS
add-on through QGIS.
I have asked again about this, months ago. Yet there are still
technicalities for which I need help to understand.
So, please bear with me and thank you in advance for any support.
I developed a GRASS GIS add-on which has been recently published as
an Open Source tool through the European Commission [0,1].
[0] https://gitlab.com/natcapes/r.estimap.recreation
[1] https://gitlab.com/natcapes/r.estimap.recreation/blob/master/C_2018_8970_F1_COMMISSION_DECISION_EN_V3_P1_1006093.PDF
The tool is in a working state, yet under bug-fixing and refactoring to
make it both easier to use and to maintain.
The official documentation of the QGIS project, leads to two ways to
"access" a GRASS GIS add-on through QGIS:
1. the QGIS GRASS plugin [2]
2. the Processing Toolbox [3] -- this wiki-page is created by me based
on detailed guidelines kindly provided by Médéric Ribreux
[2] https://www.qgis.org/en/site/getinvolved/development/addinggrasstools.html
[3] https://trac.osgeo.org/grass/wiki/QGIS-Processing-GRASS-Provider
1) For the QGIS GRASS plugin, there must be a way to update the file
https://github.com/qgis/QGIS/blob/b3d2619976a69d7fb67b884492da491dfaba287c/src/plugins/grass/modules/default.qgc
which sets up the list of available GRASS GIS modules under the QGIS
GRASS plugin. This file seems not to be writable for normal users, after
installation of QGIS, i.e. there is no write access to
non-admin/non-root users.
Under Linux, for example, this file is/might be under
`/usr/share/qgis/grass/modules` and its owner is `root`. And, there
seems no way to edit/update this file from within QGIS at run-time.
While I can customise locally, as root, my own QGIS GRASS plugin, and
add an entry for a/ny GRASS GIS add-on, I cannot, however, understand
how any user that installs QGIS, GRASS GIS and any desired GRASS GIS
add-on, can access it through QGIS.
Something similar is valid under Windows as well.
Can/should I write my own routine(s) to ensure the appearance of my/any
GRASS GIS add-on in the list of available QGIS GRASS modules? This is
something suggested in an earlier thread [*].
Is it possible at all to update this file at run-time, for any user,
under any major/well known operating system?
2) For the Processing Toolbox, my understanding is that it requires
significant effort to reflect the logic of a GRASS GIS module using
QGIS' Processing interface to GRASS GIS. Am I wrong?
If I go for the Processing option, however, is it possible to inegrate a
GRASS GIS add-on under the QGIS' Processing GRASS provider, at run-time?
Essentially, is it possible to write (new) "description" files under
`python/plugins/processing/algs/grass7/description/` which are likely
placed under directories owned by the root/admin user?
If none of the above can ensure access to a GRASS GIS add-on through
QGIS, one that is to be installed using `g.extension` after having
installed QGIS and GRASS GIS, what would you then recommend?
Do only core GRASS GIS modules work for any of the above mentioned
options?
Thank you,
Nikos Alexandris
--
Earlier posts:
https://lists.osgeo.org/pipermail/qgis-developer/2018-October/054828.html
[*] https://lists.osgeo.org/pipermail/qgis-developer/2018-October/054829.html
Related fora:
- https://gis.stackexchange.com/a/173536/5256
- https://gis.stackexchange.com/a/223770/5256
- https://gis.stackexchange.com/a/176723/5256
- https://gis.stackexchange.com/a/294157/5256
--
Nikos Alexandris | Remote Sensing & Geomatics
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3
More information about the QGIS-Developer
mailing list