source: trunk/docs/kernel/orfeotoolbox.txt @ 567

Last change on this file since 567 was 567, checked in by nbozon, 8 years ago

Basic documentation for setting up the ZOO OTB support

  • Property svn:keywords set to HeadURL Date Author Id Rev
File size: 4.1 KB
Line 
1.. _kernel-orfeotoolbox:
2   
3How To Use the Orfeo Toolbox support
4=============================================
5
6:Authors: Nicolas Bozon, Gérald Fenoy, Jeff McKenna
7:Last Updated: $Date: 2015-02-09 16:44:50 +0000 (Mon, 09 Feb 2015) $
8
9The key idea of the ZOO `Orfeo Toolbox <http://orfeo-toolbox.org/otb/>`_  support implementation is to take advantage of the `OTB Applications <http://orfeo-toolbox.org/otb/otb-applications.html>`_ by using them directly as ZOO WPS Services, without any modifications. 
10
11Here is an overview of the installation procedure and the required configuration to activate the OTB support in ZOO-Project.
12
13.. Note:: These installation steps were successfully tested on Ubuntu 14.4 LTS
14
15.. contents:: Table of Contents
16    :depth: 3
17    :backlinks: top
18
19How to make it working ?
20------------------------
21
22Requirements
23**************
24
25   * latest `ZOO-Kernel <http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel>`_ trunk version
26   * Orfeo Toolbox (`OTB 4.2.1 <http://orfeo-toolbox.org/otb/>`_ )
27   * Insight Segmentation and Registration Toolkit  (`ITK-4.7 <http://itk.org/ITK/resources/software.html/>`_ )
28
29Installation steps
30********************
31
32.. Note:: For OTB and ITK, the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS must first be set
33
34Download lastest ZOO-Kernel code from SVN.
35
36.. code-block:: guess
37
38    svn checkout http://svn.zoo-project.org/svn/trunk/zoo-kernel zoo-kernel
39
40Then compile ZOO-Kernel using the needed configuration options as shown bellow:
41
42.. code-block:: guess
43
44     cd zoo-kernel
45     autoconf
46     ./configure  --with-xsltconfig=/usr/bin/xslt-config ** --with-otb=/usr/local --with-itk=/usr/local --with-itk-version=4.7 **
47     make
48     cp zoo_loader.cgi /usr/lib/cgi-bin
49
50Configuration steps
51*************************
52
53Main configuration file
54^^^^^^^^^^^^^^^^^^^^^^^
55
56Add the following content to your ``/usr/lib/cgi-bin/main.cfg`` file
57 in the ``[env]`` section:
58
59.. code-block:: guess
60
61       TK_AUTOLOAD_PATH=/usr/local/lib/otb/applications
62
63Services configuration file
64^^^^^^^^^^^^^^^^^^^^^^^^^^
65
66The 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:
67
68.. code-block:: guess
69       
70         mkdir build
71         cd build
72         ccmake ..
73         make
74       
75Run the following command to generate all the needed zcfg files for the available OTB Application:
76
77.. code-block:: guess
78       
79         mkdir zcfgs
80         cd zcfgs
81         export ITK_AUTOLOAD_PATH=/your/path/to/otb/applications
82         ../build/otb2zcfg
83         cp *zcfg /location/to/your/cgi-bin
84       
85.. warning
86
87     The ITK_AUTOLOAD_PATH environment variable is required in the [env] section of your main.cfg.
88
89Services configuration file
90^^^^^^^^^^^^^^^^^^^^^^^^^^
91
92Once done, OTB Applications should be listed as available WPS Services when runing a GetCapabilities request
93
94.. code-block:: guess
95
96        http://localhost/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS
97
98Each OTB Service can then be described individually using the DescribeProcess request, as for example:
99
100.. code-block:: guess
101
102   http://localhost/cgi-bin/zoo_loader.cgi?request=DescribeProcess&service=WPS&version=1.0.0&Identifier=OTB.BandMath
103
104And executed according to your needs, as for the following example executing OTB.BandMath with the OTB sample data as input
105
106.. code-block:: guess
107
108        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
109
110When executing OTB applications as WPS Services, it is also possible to check the OTB process status, as the following example suggests:
111
112.. code-block:: guess
113
114      http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=GetStatus&DataInputs=sid=1424457886&RawDataOutput=Result
115
116   
117
118
119
120
121
122
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

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