<commit_before>QGIS interface
==============

The OTB QGIS plugin provides a GUI for OTB applications directly into QGIS. Note that OTB is not distributed with the plugin and needs to be installed separately. Binary packages for OTB can be found on the [download page](https://www.orfeo-toolbox.org/download).

The plugin requires QGIS 3.2 or later, and is fully integrated within QGIS since version 3.8. 

This page explains how to setup the plugin with QGIS 3.8 or later. For QGIS version between 3.2 and 3.8 the instructions on this (page)[https://gitlab.orfeo-toolbox.org/orfeotoolbox/qgis-otb-plugin#otb-provider-for-qgis-processing] should be followed.


Plugin configuration
--------------------


Plugin activation
^^^^^^^^^^^^^^^^^

The plugin should be configured to find the OTB library : 

Open processing settings : 


`Settings -> Options -> Processing (left panel)`

You can see OTB under "Providers":

* Expand OTB tab
* Tick Activate option
* Set OTB folder. This is location of your OTB installation.
* Set OTB application folder. This is location of your OTB applications. ``<OTB_FOLDER>/lib/otb/applications``
* Click "ok" to save settings and close dialog. If settings are correct, you will have OTB algorithms loaded  in Processing toolbox


Documentation of OTB settings available in QGIS Processing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Activate**: This is a checkbox to activate or deactivate OTB provider. Any invalid settings in OTB folder will uncheck this when saved.

* **OTB folder**: This is the directory where OTB is available. Valid values are listed below.

* **OTB application folder**: This is the location(s) of OTB applications. Multiple paths are allowed to use custom/proprietary OTB applications.

* **Logger level** (optional): Level of logger to use by OTB applications. The level of logging controls the amount of details printed during algorithm execution.
Possible values for logger level are INFO, WARNING, CRITICAL, DEBUG. You can refer to otb::Logger documentation for more on this values. This value is INFO by default. This is an advanced user configuration.

* **Maximum RAM to use** (optional): by default OTB applications use system RAM as available. You can however instruct OTB to use a specific amount of RAM from available using this option.
A value of 128 is ignored by OTB processing provider. This is an advanced user configuration.

* **Geoid file** (optional): Path to geoid file.Value of this options is set for elev.dem.geoid and elev.geoid parameters in OTB applications.
Setting this value globally help users to share it across multiple processing algorithms. This value is empty by default.

* **SRTM tiles folder** (optional): Directory where SRTM tiles are available.
SRTM data can be stored locally to avoid connecting to downloading of files during processing.
Value of this options is set for elev.dem.path and elev.dem parameters in OTB applications.
Setting this value globally help users to share it across multiple processing algorithms. This value is empty by default.<commit_msg>Apply suggestion to Documentation/Cookbook/rst/QGISInterface.rst<commit_after>QGIS interface
==============

The OTB QGIS plugin provides a GUI for OTB applications directly into QGIS. Note that OTB is not distributed with the plugin and needs to be installed separately. Binary packages for OTB can be found on the [download page](https://www.orfeo-toolbox.org/download).

The plugin requires QGIS 3.2 or later, and is fully integrated within QGIS since version 3.8. 

This page explains how to setup the plugin with QGIS 3.8 or later. For QGIS version between 3.2 and 3.8 the instructions on this (page)[https://gitlab.orfeo-toolbox.org/orfeotoolbox/qgis-otb-plugin#otb-provider-for-qgis-processing] should be followed.


Plugin configuration
--------------------


Plugin activation
^^^^^^^^^^^^^^^^^

The plugin should be configured to find the OTB library : 

Open processing settings : 


`Settings -> Options -> Processing (left panel)`

You can see OTB under "Providers":

* Expand OTB tab
* Tick Activate option
* Set OTB folder. This is location of your OTB installation.
* Set OTB application folder. This is location of your OTB applications. ``<OTB_FOLDER>/lib/otb/applications``
* Click "ok" to save settings and close dialog. If settings are correct, you will have OTB algorithms loaded  in Processing toolbox


Documentation of OTB settings available in QGIS Processing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Activate**: This is a checkbox to activate or deactivate OTB provider. Any invalid settings in OTB folder will uncheck this when saved.

* **OTB folder**: This is the directory where OTB is available. Valid values are listed below.

* **OTB application folder**: This is the location(s) of OTB applications. Multiple paths are allowed to use custom/proprietary OTB applications.

* **Logger level** (optional): Level of logger to use by OTB applications. The level of logging controls the amount of details printed during algorithm execution.
Possible values for logger level are INFO, WARNING, CRITICAL, DEBUG. You can refer to otb::Logger documentation for more on this values. This value is INFO by default. This is an advanced user configuration.

* **Maximum RAM to use** (optional): by default OTB applications use system RAM as available. You can however instruct OTB to use a specific amount of RAM from available using this option.
A value of 128 is ignored by OTB processing provider. This is an advanced user configuration.

* **Geoid file** (optional): Path to geoid file. Value of this options is set for elev.dem.geoid and elev.geoid parameters in OTB applications.
Setting this value globally help users to share it across multiple processing algorithms. This value is empty by default.

* **SRTM tiles folder** (optional): Directory where SRTM tiles are available.
SRTM data can be stored locally to avoid connecting to downloading of files during processing.
Value of this options is set for elev.dem.path and elev.dem parameters in OTB applications.
Setting this value globally help users to share it across multiple processing algorithms. This value is empty by default.
{'fraction_non_alphanumeric': 0.0899453902987472, 'fraction_numerical': 0.004176035978156119, 'mean_word_length': 4.476693051890941, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3007277', 'n_tokens_mistral': 1663, 'n_tokens_neox': 1536, 'n_words': 857}