OTB Plugin installation

From AWF-Wiki
(Difference between revisions)
Jump to: navigation, search
(Installation Guide for Windows)
(Configure QGIS Processing tools)
 
(117 intermediate revisions by 3 users not shown)
Line 1: Line 1:
* Download latest Orfeo toolbox standalone Binary packages. They are available for Windows 7 or higher, Linux, Mac OS and can be downloaded from the [https://www.orfeo-toolbox.org/download OTB download page].
+
=Windows10 (64bit) [[file:windows_logo.png|30px]]=
 
+
==Install OTB==
==Installation Guide for Windows==
+
Download OTB Version 8.1.1 (64bit) from this [https://www.orfeo-toolbox.org/packages/OTB-8.1.1-Win64.zip  download link].
Extract the downloaded OTB binary archive to a local folder (e.g. C:\opt). It contains command line and native otb graphical launchers.
+
Unzip the downloaded OTB binary archive to a local folder (e.g. C:\opt) '''without''' blanks, special symbols or umlauts.  
 
+
{{info|message=The extracted folder OTB-8.1.1-Win64|text=contains both command line and native otb graphical launchers. The applications may be launched standalone from the '''mapla.bat''' launcher. If you want to use the otbcli and otbgui launchers, you can initialize a command prompt with '''otbenv.bat'''.}}
Since QGIS 3.8 "Zanzibar" a Processing OTB plugin ist already included in the default QGIS distribution. No need to install an additional plugin. Proceed directly to Configure OTB plugin in QGIS.
+
 
+
For older QGIS Version you may install an external plugin:
+
* Start QGIS
+
* Open plugin manager {{mitem|text=Plugins -> Manage and Install Plugins}}
+
* Select Settings on left pane and then click {{button|text=Add..}} to add a new plugin repository.
+
* Write Name for repository. eg: {{typed|text=CNES plugin repository}}
+
* Write URL as {{typed|text=http://orfeo-toolbox.org/qgis/plugins.xml}} and click {{button|text=OK}}. The repository will be added to the list and status shown as connected. Click {{button|text=Reload all Repositories}}.
+
 
+
[[File:qgis_otb_plugin_manager.png|600px]]
+
 
+
* Select All on the left pane and type {{typed|text=otb}} into the search field.
+
* Select {{typed|text=Processing OTB provider}} and click {{button|text=Install Plugin}}. {{button|text=Close}}.
+
 
+
[[File:qgis_otb_plugin_install.png|600px]]
+
 
+
* Open plugin manager {{mitem|text=Plugins -> Manage and Install Plugins}}. Click on Installed tab on left and make sure box next to Processing OTB provider is checked.
+
 
+
==Configure OTB plugin in QGIS==
+
  
 +
==Configure QGIS Processing tools==
 +
* Start QGIS 3.28
 +
* Activate the Orfeo Toolbox plugin: {{mitem|text=Plugins -> Manage and Install Plugins -> Installed}}
 +
Click checkbox of '''Orfeo Toolbox provider''' plugin on.
 
*Open processing settings from the main menu:
 
*Open processing settings from the main menu:
 
{{mitem|text=Settings -> Options -> Processing (left panel)}}
 
{{mitem|text=Settings -> Options -> Processing (left panel)}}
Line 29: Line 14:
 
* Expand OTB tab
 
* Expand OTB tab
 
* Tick Activate box
 
* Tick Activate box
* Set OTB folder. This is location of your OTB installation (e.g. {{typed|text=C:\opt\OTB-6.6.1-Win64}})
+
* Maximum RAM to use: depends on the available RAM on your PC.
* Set OTB application folder. This is location of your OTB applications. (e.g. {{typed|text=C:\opt\OTB-6.6.1-Win64\lib\otb\applications}}).  
+
* Set OTB folder. This is location of your OTB installation (e.g. {{typed|text=C:\opt\OTB-8.1.1-Win64}})
* Click {{button|text=OK}} to save settings and close dialog. If settings are correct, you will have OTB algorithms loaded in QGIS Processing toolbox.
+
* Set OTB application folder. This is location of your OTB applications. (e.g. {{typed|text=C:\opt\OTB-8.1.1-Win64\lib\otb\applications}}). Use the file chooser button on the right side. The Multiple selection window opens. Click {{button|text=Add}} and search for the folder. {{button|text=OK}}.
 
+
 
[[File:qgis-otb-plugin_settings.png|600px]]
 
[[File:qgis-otb-plugin_settings.png|600px]]
 
+
* Click {{button|text=OK}} to save settings and close dialog. If settings are correct, OTB algorithms are loaded in QGIS Processing toolbox.
 
[[Category:Installation Guide]]
 
[[Category:Installation Guide]]
  
==Installation Guide for Mac OS==
+
=Mac OS [[file:apple_logo.png|30px]]=
* For the OTB Plugin installation Python 2.7 must be installed
+
==Install OTB==
* Download and install https://www.python.org/ftp/python/2.7.16/python-2.7.16-macosx10.9.pkg
+
Please read the official [https://www.orfeo-toolbox.org/CookBook/Installation.html installation instructions] for MacOSx.
[[File:python2.7.png|600px]]
+
* Uninstall other versions than OTB version 8.1.1. Open '''Finder'''. Search for OTB This Mac and delete the old OTB installation folder. Right click {{mitem|text=Move to Trash}}.
* Follow the instructions
+
* Open '''Documents''' folder in '''Finder'''. Create a new folder named e.g. '''otb'''.
 +
Download OTB '''MAC''' Version 8.1.1 from the OTB homepage [https://www.orfeo-toolbox.org/packages/OTB-8.1.1-Darwin64.run download link].
 +
''Save as:'' '''OTB-8.1.0-Darwin64.run'''.  
 +
''Where:'' Open the Documents folder and navigate to the newly created folder '''otb'''. {{button|text=Save}}.
 +
* Open Terminal
 +
<pre> cd Documents/otb </pre>
 +
* Run the installer
 +
<pre> chmod +x OTB-8.1.1-Darwin64.run
 +
./OTB-8.1.1-Darwin64.run</pre>
 +
*or (if it is downloadad as .txt)
 +
<pre> chmod +x OTB-8.1.1-Darwin64.run.txt
 +
./OTB-8.1.1-Darwin64.run.txt</pre>
 +
You will be asked to install '''xcode-select''' if it is available on your OS. Click {{button|text=Install}}.
 +
Ignore warnings and errors that python bindings are not correctly defined.
  
 +
If you want to use the otbcli and otbgui launchers, you can access them via a terminal prompt.
  
* Move OTB-6.6.1-Darwin64.run to the Applications folder
+
Configure the required environment variables permanently:
* Open Terminal and change direction to Applications
+
Change to your homes directory
<pre> cd /Applications </pre>
+
<pre>cd ~</pre>
* Make sure the xcrun is installed
+
Copy the line shown in your terminal without apostrophs.
<pre> xcode-select --install </pre>
+
Replace [yourUsername] with your user name!
* Install the OTB-6.6.1-Darwin64.run
+
<pre> . /Users/[yourUsername]/Documents/otb/OTB-8.1.1-Darwin64/otbenv.profile</pre>
<pre> chmod +x OTB-6.6.1-Darwin64.run </pre>
+
In terminal type:
<pre> ./OTB-6.6.1-Darwin64.run </pre>
+
<pre> nano .profile </pre>
 +
Paste the line into the editor. {{button|text=Strg + o}} and {{button|text=Enter}} for saving the file. {{button|text=Strg + x}}for file closing.
 +
Test the environment settings:
 +
<pre> source .profile </pre>
 +
Start Monteverdi Applications:
 +
<pre> mapla </pre>
 +
You may also start Mapla and Monteverdi from '''Applications'''.  
 +
* Open '''Finder'''. Navigate to Documents/otb/OTB-8.1.1-Darwin64.
 +
* Drag and drop '''Mapla''' and '''Monteverdi''' into '''Applications'''.
 +
* Navigate to '''Applications''' and start '''Mapla''' with double click.
  
 +
==Configure QGIS Processing tools==
 +
* Start QGIS 3.28
 +
* Open processing settings from the main menu:
 +
{{mitem|text=Settings -> Options -> Processing (left panel)}}
 +
You can see OTB under "Providers".
 +
* Expand OTB tab
 +
* Set OTB application folder using the file chooser on the right. Replace [yourUsername] with your user name! {{typed|text=/Users/[yourUsername]/Documents/otb/OTB-8.1.1-Darwin64/lib/otb/applications}}).
 +
* Set OTB folder. This is location of your OTB installation (e.g. {{typed|text=/Users/[yourUsername]/Documents/otb/OTB-8.1.1-Darwin64}})
 +
* Do not forget: Tick '''Activate''' on.
 +
* Click {{button|text=OK}} to save settings and close dialog. If settings are correct, you will have OTB algorithms correctly loaded in QGIS Processing toolbox.
  
* Start QGIS
+
[[File:QGIS_.png|600px]]
* Open plugin manager {{mitem|text=Plugins -> Manage and Install Plugins}}
+
* Select Settings on left pane and then click {{button|text=Add..}} to add a new plugin repository.
+
* Write Name for repository. eg: {{typed|text=CNES plugin repository}}
+
* Write URL as {{typed|text=http://orfeo-toolbox.org/qgis/plugins.xml}} and click {{button|text=OK}}. The repository will be added to the list and status shown as connected. Click {{button|text=Reload all Repositories}}.
+
  
[[File:qgis_otb_plugin_manager.png|600px]]
+
=Linux distros [[file:Tux.png|30px]]=
 +
==Install OTB==
 +
Click on Linux on the [https://www.orfeo-toolbox.org/download/  otb download page] and save the file OTB-8.1.1-Linux64.run to a local folder
 +
Open a terminal: {{button|text=Ctrl + alt + t}}
 +
<pre>
 +
chmod +x OTB-8.1.1-Linux64.run
 +
./OTB-8.1.0-Linux64.run
 +
</pre>
 +
The applications can be launched from the Mapla launcher. If you want to use the otbcli and otbgui launchers, you can initialize your environment with
 +
<pre>
 +
source OTB-8.1.1-Linux64/otbenv.profile
 +
</pre>
 +
Start the Monteverdi appllication launcher
 +
<pre>
 +
./OTB-8.1.1-Linux64/mapla.sh
 +
</pre>
  
* Select All on the left pane and type {{typed|text=otb}} into the search field.
+
==Configure QGIS Processing tools==
* Select {{typed|text=Processing OTB provider}} and click {{button|text=Install Plugin}}. {{button|text=Close}}.
+
* Start QGIS 3.28
 
+
* Open processing settings from the main menu:
[[File:qgis_otb_plugin_install.png|600px]]
+
 
+
* Open plugin manager {{mitem|text=Plugins -> Manage and Install Plugins}}. Click on Installed tab on left and make sure box next to Processing OTB provider is checked.
+
+
==Configure OTB plugin in QGIS for MacOS==
+
 
+
*Open processing settings from the main menu:
+
 
{{mitem|text=Settings -> Options -> Processing (left panel)}}
 
{{mitem|text=Settings -> Options -> Processing (left panel)}}
 
You can see OTB under "Providers".
 
You can see OTB under "Providers".
 
* Expand OTB tab
 
* Expand OTB tab
 
* Tick Activate box
 
* Tick Activate box
* Set OTB folder. This is location of your OTB installation (e.g. {{typed|text=/Applications/OTB-6.6.1-Darwin64}})
+
* Set OTB folder. This is location of your OTB installation (e.g. {{typed|text=/home/[username]/OTB-8.1.1-Linux64}})
* Set OTB application folder. This is location of your OTB applications. (e.g. {{typed|text=/Applications/OTB-6.6.1-Darwin64/lib/otb/applications}}).  
+
* Set OTB application folder. This is the location of your OTB applications. (e.g. {{typed|text=/home/<YourUserName>/OTB-8.1.1-Linux64/lib/otb/applications}}). Replace <YourUserName> with your user name.
 
* Click {{button|text=OK}} to save settings and close dialog. If settings are correct, you will have OTB algorithms loaded in QGIS Processing toolbox.
 
* Click {{button|text=OK}} to save settings and close dialog. If settings are correct, you will have OTB algorithms loaded in QGIS Processing toolbox.
 
[[File:QGIS_.png|600px]]
 

Latest revision as of 11:00, 12 April 2023

Contents

[edit] Windows10 (64bit) Windows logo.png

[edit] Install OTB

Download OTB Version 8.1.1 (64bit) from this download link. Unzip the downloaded OTB binary archive to a local folder (e.g. C:\opt) without blanks, special symbols or umlauts.

info.png The extracted folder OTB-8.1.1-Win64
contains both command line and native otb graphical launchers. The applications may be launched standalone from the mapla.bat launcher. If you want to use the otbcli and otbgui launchers, you can initialize a command prompt with otbenv.bat.

[edit] Configure QGIS Processing tools

  • Start QGIS 3.28
  • Activate the Orfeo Toolbox plugin: Plugins -> Manage and Install Plugins -> Installed

Click checkbox of Orfeo Toolbox provider plugin on.

  • Open processing settings from the main menu:

Settings -> Options -> Processing (left panel) You can see OTB under "Providers".

  • Expand OTB tab
  • Tick Activate box
  • Maximum RAM to use: depends on the available RAM on your PC.
  • Set OTB folder. This is location of your OTB installation (e.g. C:\opt\OTB-8.1.1-Win64)
  • Set OTB application folder. This is location of your OTB applications. (e.g. C:\opt\OTB-8.1.1-Win64\lib\otb\applications). Use the file chooser button on the right side. The Multiple selection window opens. Click Add and search for the folder. OK.

Qgis-otb-plugin settings.png

  • Click OK to save settings and close dialog. If settings are correct, OTB algorithms are loaded in QGIS Processing toolbox.

[edit] Mac OS Apple logo.png

[edit] Install OTB

Please read the official installation instructions for MacOSx.

  • Uninstall other versions than OTB version 8.1.1. Open Finder. Search for OTB This Mac and delete the old OTB installation folder. Right click Move to Trash.
  • Open Documents folder in Finder. Create a new folder named e.g. otb.

Download OTB MAC Version 8.1.1 from the OTB homepage download link. Save as: OTB-8.1.0-Darwin64.run. Where: Open the Documents folder and navigate to the newly created folder otb. Save.

  • Open Terminal
 cd Documents/otb 
  • Run the installer
 chmod +x OTB-8.1.1-Darwin64.run
./OTB-8.1.1-Darwin64.run
  • or (if it is downloadad as .txt)
 chmod +x OTB-8.1.1-Darwin64.run.txt
./OTB-8.1.1-Darwin64.run.txt

You will be asked to install xcode-select if it is available on your OS. Click Install. Ignore warnings and errors that python bindings are not correctly defined.

If you want to use the otbcli and otbgui launchers, you can access them via a terminal prompt.

Configure the required environment variables permanently:

Change to your homes directory
cd ~

Copy the line shown in your terminal without apostrophs. Replace [yourUsername] with your user name!

 . /Users/[yourUsername]/Documents/otb/OTB-8.1.1-Darwin64/otbenv.profile

In terminal type:

 nano .profile 

Paste the line into the editor. Strg + o and Enter for saving the file. Strg + xfor file closing. Test the environment settings:

 source .profile 

Start Monteverdi Applications:

 mapla 

You may also start Mapla and Monteverdi from Applications.

  • Open Finder. Navigate to Documents/otb/OTB-8.1.1-Darwin64.
  • Drag and drop Mapla and Monteverdi into Applications.
  • Navigate to Applications and start Mapla with double click.

[edit] Configure QGIS Processing tools

  • Start QGIS 3.28
  • Open processing settings from the main menu:

Settings -> Options -> Processing (left panel) You can see OTB under "Providers".

  • Expand OTB tab
  • Set OTB application folder using the file chooser on the right. Replace [yourUsername] with your user name! /Users/[yourUsername]/Documents/otb/OTB-8.1.1-Darwin64/lib/otb/applications).
  • Set OTB folder. This is location of your OTB installation (e.g. /Users/[yourUsername]/Documents/otb/OTB-8.1.1-Darwin64)
  • Do not forget: Tick Activate on.
  • Click OK to save settings and close dialog. If settings are correct, you will have OTB algorithms correctly loaded in QGIS Processing toolbox.

QGIS .png

[edit] Linux distros Tux.png

[edit] Install OTB

Click on Linux on the otb download page and save the file OTB-8.1.1-Linux64.run to a local folder Open a terminal: Ctrl + alt + t

chmod +x OTB-8.1.1-Linux64.run
./OTB-8.1.0-Linux64.run

The applications can be launched from the Mapla launcher. If you want to use the otbcli and otbgui launchers, you can initialize your environment with

source OTB-8.1.1-Linux64/otbenv.profile

Start the Monteverdi appllication launcher

./OTB-8.1.1-Linux64/mapla.sh

[edit] Configure QGIS Processing tools

  • Start QGIS 3.28
  • Open processing settings from the main menu:

Settings -> Options -> Processing (left panel) You can see OTB under "Providers".

  • Expand OTB tab
  • Tick Activate box
  • Set OTB folder. This is location of your OTB installation (e.g. /home/[username]/OTB-8.1.1-Linux64)
  • Set OTB application folder. This is the location of your OTB applications. (e.g. /home/<YourUserName>/OTB-8.1.1-Linux64/lib/otb/applications). Replace <YourUserName> with your user name.
  • Click OK to save settings and close dialog. If settings are correct, you will have OTB algorithms loaded in QGIS Processing toolbox.
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export