source: branches/PublicaMundi_David-devel/docs/kernel/orfeotoolbox.rst @ 695

Last change on this file since 695 was 663, checked in by nbozon, 10 years ago

various enhancements and missing doc files

File size: 4.3 KB
RevLine 
[659]1.. _kernel-orfeotoolbox:
2   
3Optional Orfeo Toolbox support
4======================
5
6`Orfeo Toolbox <http://orfeo-toolbox.org/otb/>`_ provides simple to advanced algorithms for processing imagery available from remote sensors.
[663]7The optional Orfeo Toolbox support is available since `ZOO-Project 1.5 <http://zoo-project.org>`__. It allows to execute the `OTB Applications <http://orfeo-toolbox.org/otb/otb-applications.html>`_ directly as ZOO WPS Services thanks to a :ref:`kernel_index` specific internal mechanism which is detailed in this section.
[659]8
9.. note:: 
10
11   |otb| `Orfeo Toolbox <https://www.orfeo-toolbox.org>`__ is an open source image processing library. Learn more by reading its `documentation <https://www.orfeo-toolbox.org/documentation/>`__.
12 
13
14.. |otb| image:: ../_static/orfeotoolbox.png
15       :height: 115px
16       :width: 150px
17       :scale: 30%
18       :alt: Orfeo Toolbox logo
19
20
21Installation and configuration
22------------------------------
23
[663]24Follow the step described bellow in order to activate the ZOO-Project optional Orfeo Toolbox support.
[659]25
26Prerequisites
[663]27.....................
[659]28
29   * latest `ZOO-Kernel <http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel>`_ trunk version
[663]30   * Orfeo Toolbox (`OTB 4.2.1 <http://orfeo-toolbox.org/otb/>`_)
31   * Insight Segmentation and Registration Toolkit  (`ITK-4.7 <http://itk.org/ITK/resources/software.html/>`_)
[659]32
33Installation steps
34...........................
35
36.. Note:: These installation steps were successfully tested on Ubuntu 14.4 LTS
37
38.. Note:: For OTB and ITK, the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS must first be set to ``-fPIC``
39
40Download lastest ZOO-Kernel code from SVN.
41
42.. code-block:: guess
43
44    svn checkout http://svn.zoo-project.org/svn/trunk/zoo-kernel zoo-kernel
45
46Then compile ZOO-Kernel using the needed configuration options as shown bellow:
47
48.. code-block:: guess
49
50     cd zoo-kernel
51     autoconf
52     ./configure  --with-otb=/usr/local --with-itk=/usr/local --with-itk-version=4.7
53     make
54     cp zoo_loader.cgi /usr/lib/cgi-bin
55
56Configuration steps
[663]57....................................
[659]58
59Main configuration file
[663]60*************************
[659]61
62Add the following content to your ``/usr/lib/cgi-bin/main.cfg`` file
63in the ``[env]`` section:
64
65.. code-block:: guess
66
67       ITK_AUTOLOAD_PATH=/usr/local/lib/otb/applications
68
69Services configuration file
[663]70****************************
[659]71
72The build of the `otb2zcfg  <http://zoo-project.org/trac/browser/trunk/thirds/otb2zcfg>`_ utility is required to activate the available OTB Applications as WPS services. This can be done using the following command:
73
74.. code-block:: guess
75       
76         mkdir build
77         cd build
78         ccmake ..
79         make
80       
81Run the following command to generate all the needed zcfg files for the available OTB Application:
82
83.. code-block:: guess
84       
85         mkdir zcfgs
86         cd zcfgs
87         export ITK_AUTOLOAD_PATH=/your/path/to/otb/applications
88         ../build/otb2zcfg
89         mkdir /location/to/your/cgi-bin/OTB
90         cp *zcfg /location/to/your/cgi-bin/OTB
91       
92.. warning
93
94     The ITK_AUTOLOAD_PATH environment variable is required in the [env] section of your main.cfg.
95
[663]96Test requests
97****************************
[659]98
99Once done, OTB Applications should be listed as available WPS Services when runing a GetCapabilities request
100
101.. code-block:: guess
102
103        http://localhost/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS
104
105Each OTB Service can then be described individually using the DescribeProcess request, as for example:
106
107.. code-block:: guess
108
109   http://localhost/cgi-bin/zoo_loader.cgi?request=DescribeProcess&service=WPS&version=1.0.0&Identifier=OTB.BandMath
110
[663]111Here is an example request executing the *OTB.BandMath* Application with the `OTB Cookbook <https://www.orfeo-toolbox.org/CookBook/CookBook.html>`_ sample data as input
[659]112
113.. code-block:: guess
114
115   http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=OTB.BandMath&DataInputs=il=Reference@xlink:href=http://hg.orfeo-toolbox.org/OTB-Data/raw-file/ca154074b282/Examples/verySmallFSATSW.tif;il=Reference@xlink:href=http://hg.orfeo-toolbox.org/OTB-Data/raw-file/ca154074b282/Examples/verySmallFSATSW_nir.tif;out=float;exp=im1b3*cos%28im1b1%29,im1b2*cos%28im1b1%29,im1b1*cos%28im1b1%29&RawDataOutput=out@mimeType=image/png
116
117
118.. note::
119
[663]120   The usual ZOO GetStatus requests also work when using the OTB Applications as WPS Services.
[659]121
122
[663]123
[659]124   
125
126
127
128
129
130
Note: See TracBrowser for help on using the repository browser.

Search

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png