Hi,

There is a growing number of users who wants to use OTB external modules in 
QGis.
Even if the processing plugin has many OTB apps, there is a lot which are 
not integrated, like the remote modules applications (GRM, Mosaic, ...).
However, the process of adding a new app (an existing otbcli_Something) in 
the QGis processing plugin in quite easy.

This quick tutorial will explain how to :

-Build OTB with some remote modules (detailed step by step)
-Add the new app in QGis processing plugin

In a clean Ubuntu 14.04.
Here are the steps :

1) Edit the /etc/apt/sources.list and check that it contains :

deb http://archive.ubuntu.com/ubuntu trusty main universe
deb-src http://archive.ubuntu.com/ubuntu trusty main universe

2) Update/Upgrade/Install requiered packages

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install aptitude
sudo aptitude install make cmake-curses-gui build-essential git libtool 
automake libbz2-dev python-dev libjpeg-dev libboost1.55-dev zlib1g-dev 
libcurl4-gnutls-dev

3) Create a directory to install OTB in /work then clone repository

sudo mkdir /work
sudo chown $USER /work
mkdir /work/otb
cd /work/otb
mkdir installdir build
git clone https://[email protected]/git/otb.git OTB

4) Configure OTB superbuild, for example here without QT and without OPENCV

cd build
cmake /work/otb/OTB/SuperBuild -DCMAKE_INSTALL_PREFIX=/work/otb/installdir 
-DOTB_USE_OPENCV=OFF -DOTB_USE_QT4=OFF

5) build and install (you can use "make -j 8" if you have a 8xCpu)

make

6) Don't forget to add /work/otb/installdir/bin/ in your PATH (export 
PATH=$PATH:/work/otb/installdir/bin) 
and add /work/otb/installdir/lib/ in /etc/usr/ld.so.conf (then make a 
ldconfig to refresh)

7) Now, configure, build and install remotes modules (for example here with 
Mosaic) (you can use "make -j 8" if you have a 8xCpu)

cd /work/otb/build/OTB/build/
cmake /work/otb/OTB/ -DModule_Mosaic=ON
make
make install

8) Installed remote module can now be used !

otbcli_Mosaic


Okay. Now we want to use the new installed apps in QGis. In order to add 
any OTB app which is not in QGis (e.g. remote module app) you just have to 
add a .xml file in the 
/usr/share/qgis/python/plugins/processing/algs/otb/description/5.XXX/ 
folder (replace XXX by the version)
Attached are examples of .xml for GRM and Mosaic remote modules 
applications.

Hope this will help,

Rémi


-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: Mosaic.xml
Description: XML document

Attachment: GenericRegionMerging.xml
Description: XML document

Reply via email to