Commit d9440dda authored by Daniel McInerney's avatar Daniel McInerney

Merge remote-tracking branch 'upstream/develop' into develop

parents 22671f44 a3a97ef2
Language: Cpp
BasedOnStyle: Mozilla
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: true
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: All
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: GNU
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 200
# ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '$'
IndentCaseLabels: true
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 0
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: true
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: true
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 2
UseTab: Never
# top-most EditorConfig file
root = true
# Apply to all code files
# A newline ending every file
insert_final_newline = true
# Set default charset
charset = utf-8
# 4 space indentation
indent_style = space
indent_size = 2
# Various options
trim_trailing_whitespace = true
### Summary
#### Summary
Gives a short summary of the changes.
### Rationale
#### Rationale
Explain the rationale for the changes (possible link to a Request For Comments or to an issue).
### Implementation Details
#### Classes and files
#### Implementation Details
##### Classes and files
Give an overview of the implementation: main changes made to classes, files and modules. Do not paste complete diff, as it is available in the merge request already.
#### Applications
##### Applications
Describe any changes made to existing applications, or new applications that have been added.
#### Tests
##### Tests
Describe the testing strategy for new features.
### Documentation
##### Documentation
List or link documentation modifications that were made (doxygen, example, Software Guide, application documentation, CookBook).
#### Additional notes
### Additional notes
<!--- List remaining open issues if any, and additional notes. -->
List remaining open issues if any, and additional notes.
#### Copyright
### Copyright
The copyright owner is *COPYRIGHT OWNER (OR OWNER'S AGENT)* and has signed the ORFEO ToolBox Contributor License Agreement.
The copyright owner is *COPYRIGHT OWNER (OR OWNER'S AGENT)* and has signed the ORFEO ToolBox Contributor License Agreement
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: vote.
- The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
\ No newline at end of file
......@@ -104,7 +104,7 @@ endif ()
find_library ( QWT_LIBRARY
NAMES qwt qwt${QWT_MAJOR_VERSION} qwt-qt5
......@@ -120,7 +120,7 @@ endif()
find_library(CBLAS_LIBRARY NAMES cblas)
find_library(CBLAS_LIBRARY NAMES cblas blas PATH_SUFFIXES blas)
......@@ -174,6 +174,10 @@ if(NOT OTB_INSTALL_PACKAGE_DIR)
set (OTB_INSTALL_DESCR_DIR "share/otb/description")
#convert path to native for reconfiguring
......@@ -11,14 +11,33 @@ that they only affect default values, and that settings in extended
filenames, applications, monteverdi or custom C++ code might override
those values.
* ``OTB_DEM_DIRECTORY``: Default directory were DEM tiles are stored. It should only contain ```.hgt`` or or georeferenced ``.tif`` files. Empty if not set (no directory set)
* ``OTB_GEOID_FILE``: Default path to the geoid file that will be used to retrieve height of DEM above ellipsoid. Empty if not set (no geoid set)
* ``OTB_MAX_RAM_HINT``: Default maximum memory that OTB should use for processing, in MB. If not set, default value is 128 MB.
* ``OTB_LOGGER_LEVEL``: Default level of logging for OTB. Should be one of ``DEBUG``, ``INFO``, ``WARNING``, ``CRITICAL`` or ``FATAL``, by increasing order of priority. Only messages with a higher priority than the level of logging will be displayed. If not set, default level is ``INFO``.
* ``OTB_DEM_DIRECTORY``: Default directory were DEM tiles are
stored. It should only contain ```.hgt`` or or georeferenced
``.tif`` files. Empty if not set (no directory set)
* ``OTB_GEOID_FILE``: Default path to the geoid file that will be used
to retrieve height of DEM above ellipsoid. Empty if not set (no
geoid set)
* ``OTB_MAX_RAM_HINT``: Default maximum memory that OTB should use for
processing, in MB. If not set, default value is 128 MB.
* ``OTB_LOGGER_LEVEL``: Default level of logging for OTB. Should be
one of ``DEBUG``, ``INFO``, ``WARNING``, ``CRITICAL`` or ``FATAL``,
by increasing order of priority. Only messages with a higher
priority than the level of logging will be displayed. If not set,
default level is ``INFO``.
In addition to OTB specific environment variables, the following
environment variable are parsed by third party libraries and also
affect how OTB works:
* ``GDAL_CACHEMAX``: Gdal has an internal cache mechanism to avoid reading or decoding again image chunks. This environnement variable controls how much memory Gdal can use for caching. By default, Gdal can use up to 5 percents of available RAM on system, which may be a lot. Moreover, caching is only needed if the processing chain is likely to request the same chunk several times, which is not likely to happen for a standard pixel based OTB pipeline. Setting a lower value allows to allocate more memory to OTB itself (using applications ``-ram`` parameter or ``OTB_MAX_RAM_HINT`` environment variable). If value is small (less than 100 000, it is assumed to be in megabytes, otherwise, it is assumed to be in bytes.
* ``GDAL_NUM_THREADS``: Gdal can take advantage of multi-threading to decode some formats. This variable controls the number of threads Gdal is allowed to use.
* ``OPJ_NUM_THREADS``: OpenJpeg can take advantage of mutli-threading when decoding images. This variable controls the number of threads OpenJpeg is allowed to use.
* ``ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS``: This variable allows to control the number of threads used by ITK for processing.
.. _extended-filenames:
Extended filenames
.. _extended-filenames:
Extended filenames is an interesting feature of OTB. With it, you can control
several aspects of the beahvior of the OTB in the OTB-Applications or in our
......@@ -116,7 +116,7 @@ FAQ
Q: Unable to import otbApplication library with Python3
......@@ -126,10 +126,9 @@ A: You need to add a symlink to to make it work
Here is the solution:
- find the libpython3.5XX on your system : find /usr/lib -iname *libpython3.5*
(on Ubuntu 14.04, it is /usr/lib/x86_64-linux-gnu/
- create a symlink : ln -s path/to/lib/python3.5XX
- Find the libpython3.5XX on your system : ``find /usr/lib -iname *libpython3.5*``
(on Ubuntu 14.04, it is ``/usr/lib/x86_64-linux-gnu/``)
- Create a symlink : ``ln -s path/to/lib/python3.5XX path/to/lib/``
- Try to import otbApplication again
See this discussion on `OTB issue tracker <>`_
This archive provides a development kit for the ORFEO ToolBox library which
allows to easily compile OTB and facilitate the creation of programs based on
It contains shared libraries of OTB dependencies and helper scripts for the
configuration and the compilation of the library.
Note that OTB sources are not included in the archive (see instructions below).
- cmake (>= 3.2)
- gcc (>= 4.9)
- git
Extract XDK
cd /opt (You can use another a directory of your own choice)
chmod +x OTB-|release|
**You now will have a directory named OTB-|release|-xdk-Linux64 in \'/opt\'**
Setup environment
There is a helper script in package called **xdkenv.profile**. This script export
required environments to configure and build OTB.
cd /opt/OTB-|release|-xdk-Linux64
. ./xdkenv.profile
Test environment setup by checking value of CMAKE_PREFIX_PATH
The above command will output:
Download, Configure and build OTB
mkdir -p /opt/OTB/build && cd /opt/OTB
git clone --depth=1 --branch=develop source
cd build && cmake ../source
make -j2
* By default, all OTB\_USE\_\* variables in OTB are set to FALSE except for 6S and SiftFast. You can check/activate them in your cmake-gui/ccmake.
* If you need to activate Qt4 modules (Monteverdi, Ice, QtWidget, ApplicationEngine ..), you must set *QT_BINARY_DIR*.
This is because Qt tools ( moc, rcc, et al) are reported as not found by cmake due to incorrect path in "qmake -query"
......@@ -137,7 +137,6 @@ SET( Tex_SRCS
\chapter{Contributors Guidelines}
This chapter is concerned with the contributor guidelines.
Here, you can find useful information about:
\item remote modules,
\item how to submit them,
\item what are the acceptance/release policies
\item what are the licence compliances
\item ...
in OTB sources.
A wiki page is also available here : \url{}.
\section{How to Contribute}
\item This section has to be reviewed by PSC
\item Some guidelines only apply after modularization is completed
Contributions through Remote Modules is the preferred way if your contribution is about adding new classes or application to bring new features to OTB.
Please also refer to ITK guidelines for remote modules (\url{}).
\section{What are remote modules?}
Remote modules are just like regular modules, except they are not distributed inside OTB source code.
In the Modules/Remote folder of the OTB sources, you can add any number of directories containing valid modules. You will then be able to activate those module through CMake configuration, and build them.
But there is more. Let assume that you have a valid remote module, hosted somewhere on a Git repository. We can add a special CMake file in the Modules/Remote that will tell CMake that this remote module is available, and can be activated during CMake configuration. Upon activation, CMake will first checkout the remote module source code into Modules/Remote, and then build it as a regular module.
But there is more. Once the CMake file describing your module is added into Remote/Modules, you can benefit from OTB development services just like any other module: dashboard build, packaging, doxygen documentation ...
To make it short, by contributing a remote module:
\item You still host the code of your contribution, which is not mixed with other parts of OTB,
\item Any user building OTB will be able to fetch and build your module,
\item Your module will be built on dashboard, packaged for official releases and documented by OTB automatic documentation processes,
\item You do not need permissions to push changesets on OTB repositories.
\section{How to get your remote module inside OTB? }
\item Follow the instructions on writing a remote module in order to have a working remote module inside your local source code tree (\ref{sec:writemodule}).
\item Host the remote module code on a publicly available git repository. If you do not have access to a git server, bitbucket or github can provide this service for you.
\item Write a short email to the otb-developers list, detailing your contributed remote module, and providing the cmake file to add into Modules/Remote so as to get it into OTB, as well as evidence that you comply with the remote module policy (see below).
\item Remote module acceptance policy compliance will be checked by the otb-developers list,
\item Acceptance of remote module is submitted to vote on otb-developers (to be reviewed by PSC).
If accepted, your CMake file will be placed into the Modules/Remote folder inside OTB source tree.
During the OTB release process, all module complying with the remote module release policy will be packaged along with standard modules.
A remote module can be removed from Modules/Remote (this only requires to remove the CMake file describing it), if:
\item It does no longer comply with the remote module acceptance policy (in which case the decision is submitted to vote on otb-developers),
\item The author of the remote module ask to remove it.
\section{Remote module acceptance policy }
So as to get your module accepted as an official remote module, you should comply with the following:
\item Remote module source code should be hosted on a publicly available Git repository
\item Author of the remote module should be identified and registered to otb-developers mailing list
\item Author of the remote module accepts to be contacted by developers or users regarding issues with his module (on a best effort basis),
\item Remote module source code should comply with OTB style as much as possible,
\item Remote module source code should be documented using doxygen tags,
\item Remote module should provide a minimal set of tests to ensure build of template code and basic non-regression testing,
\item Remote module should come with a form of documentation (website, publication, readme file ...)
\item Remote module should not embed code from any third party software (unless strong arguments are given by the author, in which case an exception can be made),
\item Remote module should avoid depending on new third parties if possible,
\item Remote module author should be the copyright owner and comply with licences of any third party, which in turn should comply with terms of OTB licence (to be reviewed by PSC)
\item Author of remote module should provide a small description of the remote module to be added on OTB website.
An internal module should \textbf{never} depend on a remote module whatsoever.
\section{Remote module release policy }
During the OTB release process, a remote module will be included in source and binary packages if:
\item Dashboard submission exist and show that the remote module:
\item Builds on all plateform,
\item Passes all tests on the reference platform,
\item Does not have any test crashing (i.e. failing with core dump or memory issues) on remaining platform
\item The remote module complies with the remote module acceptance policy at the time of the Release Candidate
Developers will notify remote modules authors of existing issues at Release Candidate. If by 3 day to the final release dates, some issues listed above still exist, the remote module will be removed from the release source and binary packages.
Moreover, remote module bringing in new third party dependencies will not be included in binary packages.
......@@ -49,6 +49,7 @@ Patrick Imbo (CS),
Remi Cresson (Irstea),
Rik Bellens,
Romain Garrigues (CS),
Santiago Pena Luque (CNES),
Sebastiaan Couwenberg (Debian GIS),
S\'ebastien Dinot (CS),
S\'ebastien Harasse (CS),
......@@ -59,4 +60,5 @@ Tishampati Dhar,
Victor Poughon (CNES),
Vincent Poulain (CNES),
Vincent Schut (Sarvision),
Yannick Reynard
Yannick Reynard,
Yannick Tanguy (CNES)
......@@ -126,7 +126,7 @@ See table \ref{tab:otb-dependencies} for the full list of dependencies.
\textbf{OPENGL} & \url{} & no & - \\
\textbf{Qt} & \url{} & no & 4 \\
\textbf{Qt} & \url{} & no & 5 \\
\textbf{QWT} & \url{} & no & 6 \\
......@@ -170,8 +170,7 @@ $ mkdir install
The OTB project uses a git branching model where \texttt{develop} is the current development version.
It contains the latest patches and represents the work in progress towards the next release.
For more information on OTB and git, including how to decide which branch to want to compile, please see the
OTB wiki page at \url{}.
For more information regarding the use of Git in the project please have a look at : \url{}. See the (\url{}) to have more inforamtion on how to contribute to OTB.
Checkout the relevant branch now:
......@@ -294,16 +293,16 @@ want to build) :
Qt library: Unlike other dependencies building Qt4 on all platform is not trivial task but
Qt library: Unlike other dependencies building Qt5 on all platform is not trivial task but
OTB SuperBuild makes best effort to make it easier for you. So there is still
some additional package installation, one has to do as a pre-requistie for SuperBuild
On a GNU/Linux you must have Qt X11 dependencies installed.
See Qt 4.8 documentation for list of packages that needs to be installed
before starting superbuild.
For a debian 8.1 systeme, I installed all Qt4 dependencies with below 'apt-get install'
See Qt 5 documentation for list of packages that needs to be installed
before starting superbuild.
For a Debian 8.1 system, I installed all Qt5 dependencies with below 'apt-get install'
\texttt{apt-get install libx11-dev libxext-dev libxt-dev libxi-dev libxrandr-dev libgl-dev libglu-dev}
You can also deactivate QT4 and skip this by passing \texttt{-DOTB\_USE\_QT4=OFF} to cmake.
You can also deactivate QT5 and skip this by passing \texttt{-DOTB\_USE\_QT=OFF} to cmake.
This will give you OTB install without monteverdi, mapla and gui application launchers.
For Mac OSX you need to install XCode and Windows 7,8.1,10 requires MSVC 2015 or higher.
......@@ -410,7 +409,7 @@ $ make install
\textbf{OTB\_USE\_LIBKML} & OTBlibkml & OTBKMZWriter OTBIOKML OTBAppKMZ \\
\textbf{OTB\_USE\_QT4} & OTBQt4 & OTBQtWidget \\
\textbf{OTB\_USE\_QT} & OTBQt & OTBQtWidget \\
\textbf{OTB\_USE\_QWT} & OTBQwt & OTBMonteverdiGUI OTBMonteverdi \\
......@@ -264,10 +264,6 @@ colorlinks,linkcolor={blue},citecolor={blue},urlcolor={blue},
\chapter{Release Notes}
%Comment generation of wrapping documentation for release 3.2
\chapter{Wrappings to other languages}
......@@ -144,7 +144,7 @@ private:
// Software Guide : BeginLatex
// Application parameters declaration is done using \code{AddParameter()} method.
// \code{AddParameter()} requires the input parameter type
// (ParameterType_InputImage, ParameterType_Int, ParameterType_Float), its name and description.
// (ParameterType\_InputImage, ParameterType\_Int, ParameterType\_Float), its name and description.
// \subdoxygen{otb}{Wrapper}{Application} class contains methods to set parameters characteristics.
// Software Guide : EndLatex
......@@ -138,7 +138,7 @@ public:
* \return the point projected in the image coordinates system.
* \throw None
void TransformPointToPhysicalPoint(const PointType& point) const
PointType TransformPointToPhysicalPoint(const PointType& point) const
// why no loop on VDimension ?
PointType physicalPoint;
......@@ -114,7 +114,11 @@ typedef mpl::map
< typename T
#if GDAL_VERSION_NUM >= 2030000
, T ( OGRFeature::*ptr_to_function )(int) const
, T ( OGRFeature::*ptr_to_function )(int)
, typename FinalReturnType = T
> class MemberGetterPtr