[QGIS-Developer] Add GRASS addon to QGIS?

João Gaspar joao.f.r.gaspar at gmail.com
Fri Jan 8 05:03:32 PST 2021


Hi Richard,
here what I found.

https://grass.osgeo.org/grass78/manuals/g.extension.html

The addons are installed in:
*GRASS GIS extensions are installed by g.extension into a dedicated
directory. The default is a directory for application data and settings
inside the user's home directory. On GNU/Linux it is $HOME/.grass7/addons,
on MS-Windows it is $APPDATA\GRASS7\addons. The name of the directory is
stored in the GRASS_ADDON_BASE environmental variab*le.


If you want to put the addon in the bin folder of the GRASS you need to use
-s flag:
"g.extension -s extension=v.transects"

The flag -s changes this install target directory to the GRASS GIS
installation directory (determined by GISBASE environmental variable, e.g.
/usr/) rather than the default directory defined as per GRASS_ADDON_BASE
(see also documentation for variables). g.extension checks if the user has
permission to write to GISBASE or GRASS_ADDON_BASE.


So what I understand you can try to append the environment variable
GRASS_ADDON_BASE in the custom variables inside QGIS settings (
https://docs.qgis.org/3.16/en/docs/user_manual/introduction/qgis_configuration.html#system-settings)
or
install directly in the GRASS directory using -s flag and this way probably
you don't need to append the custom variable in QGIS settings.

After that if the GRASS addon isn't listed on the Processing menu yet, you
need to add:
https://qgis.org/en/site/getinvolved/development/addinggrasstools.html

I hope this helps you.

Best regards,
João Gaspar


Richard Duivenvoorde <rdmailings at duif.net> escreveu no dia sexta, 8/01/2021
à(s) 11:23:

> Hi Devs,
>
> In the Processing algorithms there is an algorithm 'Transect', which puts
> 'transects' on the vertices(!) of a Linestring.
>
> For a 'problem' I have I need the transect to be on known distances along
> the Linestring (so INdependent) of the vertices of that LineString.
> (the main problem are the vertices in the lines when the line makes a turn
> (is not straigh). For straight lines I can use densify to add the right
> amount of vertices)
>
> If I am correct, this grass addon, is exactly what I need:
>
> https://grass.osgeo.org/grass78/manuals/addons/v.transects.html
>
> But, by default it is not available in QGIS algorithms.
> You even have to add it to GRAAS: you have to add it with:
>
> "g.extension extension=v.transects"
>
> (from
> https://gis.stackexchange.com/questions/290595/where-is-the-v-transects-algorithm-in-qgis
> )
>
> The final solution is a Processing model, so my question is if I can
> (easily) make that Grass algorithm work in a Processing Model?
>
> Thanks for any pointers/input.
>
> Regards,
>
> Richard Duivenvoorde
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210108/54ebf1c3/attachment.html>


More information about the QGIS-Developer mailing list