Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
beb26e04
Commit
beb26e04
authored
7 years ago
by
Guillaume Pasero
Browse files
Options
Downloads
Patches
Plain Diff
DOC: update python usage section
parent
ea4a6656
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documentation/Cookbook/rst/OTB-Applications.rst
+14
-9
14 additions, 9 deletions
Documentation/Cookbook/rst/OTB-Applications.rst
with
14 additions
and
9 deletions
Documentation/Cookbook/rst/OTB-Applications.rst
+
14
−
9
View file @
beb26e04
...
...
@@ -192,7 +192,12 @@ Using the Python interface
~~~~~~~~~~~~~~~~~~~~~~~~~~
The applications can also be accessed from Python, through a module
named ``otbApplication``.
named ``otbApplication``. However, there are technical requirements to use it.
If you use OTB through standalone packages, you should use the supplied
environment script ``otbenv`` to properly setup variables such as
``PYTHONPATH`` and ``OTB_APPLICATION_PATH`` (on Unix systems, don't forget to
source the script). In other cases, you should set these variables depending on
your configuration.
On Unix systems, it is typically available in the ``/usr/lib/otb/python``
directory. Depending on how you installed OTB, you may need to configure the
...
...
@@ -202,14 +207,6 @@ becomes available from Python.
On Windows, you can install the ``otb-python`` package, and the module
will be available from an OSGeo4W shell automatically.
In this module, two main classes can be manipulated :
- ``Registry``, which provides access to the list of available
applications, and can create applications
- ``Application``, the base class for all applications. This allows to
interact with an application instance created by the ``Registry``
As for the command line and GUI launchers, the path to the application
modules needs to be properly set with the ``OTB_APPLICATION_PATH``
environment variable. The standard location on Unix systems is
...
...
@@ -218,6 +215,14 @@ available in the ``otb-bin`` OSGeo4W package, and the environment is
configured automatically so you don’t need to tweak
``OTB_APPLICATION_PATH``.
In the ``otbApplication`` module, two main classes can be manipulated :
- ``Registry``, which provides access to the list of available
applications, and can create applications
- ``Application``, the base class for all applications. This allows to
interact with an application instance created by the ``Registry``
Here is one example of how to use Python to run the ``Smoothing``
application, changing the algorithm at each iteration.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment