Commit 1655ef07 authored by Julien Osman's avatar Julien Osman

Merge branch 'develop' into 2024-metadata-refac

parents eaf9c1c9 87e74857
Pipeline #5498 passed with stages
in 89 minutes and 7 seconds
......@@ -84,6 +84,7 @@ Rémi Cresson <remi.cresson@irstea.fr> Rémi <remi.cresson@t
Rémi Cresson <remi.cresson@irstea.fr> remi <remi.cresson@irstea.fr>
Rémi Cresson <remi.cresson@irstea.fr> remi cresson <remi.cresson@teledetection.fr>
Rémi Cresson <remi.cresson@irstea.fr> remicres <remi.cresson@teledetection.fr>
Rémi Cresson <remi.cresson@irstea.fr> remi cresson <remi.cresson@inrae.fr>
Sebastien Harasse <sebastien.harasse@c-s.fr>
Stephane Albert <stephane.albert@c-s.fr>
Stephane Albert <stephane.albert@c-s.fr> Stephane ALBERT <stephane.albert@c-s.fr>
......
......@@ -77,10 +77,18 @@ scp ref.sha otbpush@otb5-vm2.orfeo-toolbox.org:${jobs_directory}/
#Untar doc
if [ "$CI_COMMIT_REF_NAME" = "develop" ]
then
#Cookbook
ssh otbpush@otb5-vm2.orfeo-toolbox.org \
tar -xf ${jobs_directory}/CookBook-*-html.tar.gz -C ${jobs_directory}/
tar -xf ${jobs_directory}/CookBook-*-html.tar.gz -C ${jobs_directory}/
ssh otbpush@otb5-vm2.orfeo-toolbox.org \
rm -rf /home/otbpush/test/CookBook/*
rm -rf /home/otbpush/test/CookBook/*
ssh otbpush@otb5-vm2.orfeo-toolbox.org \
mv ${jobs_directory}/CookBook-*/* /home/otbpush/test/CookBook/.
mv ${jobs_directory}/CookBook-*/* /home/otbpush/test/CookBook/.
# Doxygen
ssh otbpush@otb5-vm2.orfeo-toolbox.org \
rm -rf /home/otbpush/test/Doxygen/*
# Strip first component of the tar (Doxygen/html/...)
ssh otbpush@otb5-vm2.orfeo-toolbox.org \
tar -xf ${jobs_directory}/OTB-Doxygen-*.tar.bz2 -C /home/otbpush/test/Doxygen/ --strip-components=1
fi
QGIS interface
==============
The OTB QGIS plugin provides a GUI for OTB applications directly into QGIS. Note that OTB is not distributed with the plugin and needs to be installed separately. Binary packages for OTB can be found on the [download page](https://www.orfeo-toolbox.org/download).
OTB Applications are fully integrated in QGIS since QGIS 3.8.
You can configure OTB for QGIS according to the:
The plugin requires QGIS 3.2 or later, and is fully integrated within QGIS since version 3.8.
This page explains how to setup the plugin with QGIS 3.8 or later. For QGIS version between 3.2 and 3.8 the instructions on this (page)[https://gitlab.orfeo-toolbox.org/orfeotoolbox/qgis-otb-plugin#otb-provider-for-qgis-processing] should be followed.
Plugin configuration
--------------------
Plugin activation
^^^^^^^^^^^^^^^^^
The plugin should be configured to find the OTB library :
Open processing settings :
`Settings -> Options -> Processing (left panel)`
You can see OTB under "Providers":
* Expand OTB tab
* Tick Activate option
* Set OTB folder. This is location of your OTB installation.
* Set OTB application folder. This is location of your OTB applications. ``<OTB_FOLDER>/lib/otb/applications``
* Click "ok" to save settings and close dialog. If settings are correct, you will have OTB algorithms loaded in Processing toolbox
Documentation of OTB settings available in QGIS Processing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* **Activate**: This is a checkbox to activate or deactivate OTB provider. Any invalid settings in OTB folder will uncheck this when saved.
* **OTB folder**: This is the directory where OTB is available. Valid values are listed below.
* **OTB application folder**: This is the location(s) of OTB applications. Multiple paths are allowed to use custom/proprietary OTB applications.
* **Logger level** (optional): Level of logger to use by OTB applications. The level of logging controls the amount of details printed during algorithm execution.
Possible values for logger level are INFO, WARNING, CRITICAL, DEBUG. You can refer to otb::Logger documentation for more on this values. This value is INFO by default. This is an advanced user configuration.
* **Maximum RAM to use** (optional): by default OTB applications use system RAM as available. You can however instruct OTB to use a specific amount of RAM from available using this option.
A value of 256 is ignored by OTB processing provider. This is an advanced user configuration.
* **Geoid file** (optional): Path to geoid file. Value of this options is set for elev.dem.geoid and elev.geoid parameters in OTB applications.
Setting this value globally help users to share it across multiple processing algorithms. This value is empty by default.
* **SRTM tiles folder** (optional): Directory where SRTM tiles are available.
SRTM data can be stored locally to avoid connecting to downloading of files during processing.
Value of this options is set for elev.dem.path and elev.dem parameters in OTB applications.
Setting this value globally help users to share it across multiple processing algorithms. This value is empty by default.
- `QGIS Provider documentation for latest LTR <https://docs.qgis.org/latest/en/docs/user_manual/processing/3rdParty.html>`_.
- `QGIS Provider documentation <https://docs.qgis.org/testing/en/docs/user_manual/processing/3rdParty.html>`_.
Compatibility between QGIS and OTB versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-------------------------------------------
There are compatibility issues between the different versions of OTB and QGIS. Any version
of OTB compiled with GDAL 3.X is not compatible with QGIS 3.12 or below. This is the case
......@@ -73,6 +26,27 @@ The table below summarizes which version of OTB can be used with which version o
| OTB 7.1.0 | Not Compatible | Compatible |
+---------------+-----------------+--------------------+
Troubleshoot
------------
As of QGIS 3.8 the otb plugin is in the core. It might get messy if you have a previously installed plugin. Try to remove the old plugin before launching QGIS.
Use OTB in old QGIS version (3.6 and less)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. warning:: Please consider upgrading your QGIS version.
Since QGIS 3.8 and with 3.10 LTR version, the configuration of OTB Application is
directly done in QGIS Provider (see above).
If you use older version of QGIS (from 3.2 to 3.6), you need to install an
additional plugin in order to use OTB applications. This plugin is available
`here <https://gitlab.orfeo-toolbox.org/orfeotoolbox/qgis-otb-plugin>`_
with specific installation instructions.
Troubleshooting
^^^^^^^^^^^^^^^
As of QGIS 3.8 the OTB plugin is in the core. It might get messy if you
have a previously installed plugin. Try to remove the old plugin before
launching QGIS.
Issue tracking
^^^^^^^^^^^^^^
If you encounter issues with integration of OTB application into QGIS,
please `fill an issue <https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/new?issue[assignee_id]=&issue[milestone_id]=>`_ into the OTB issue tracker with `qgis` label.
Welcome to Orfeo ToolBox!
=========================
`Orfeo ToolBox (OTB) <http://orfeo-toolbox.org>`_ is an open-source project for
`Orfeo ToolBox (OTB) <https://www.orfeo-toolbox.org/>`_ is an open-source project for
state-of-the-art remote sensing. Built on the shoulders of the open-source
geospatial community, it can process high resolution optical, multispectral and
radar images at the terabyte scale. A wide variety of applications are
......@@ -32,7 +32,7 @@ joining `our community <https://www.orfeo-toolbox.org/community/>`_ and
For other documentation, be sure to read:
- OTB's website: `www.orfeo-toolbox.org <https://www.orfeo-toolbox.org/>`_
- `Doxygen <http://orfeo-toolbox.org/doxygen/>`_, for exhaustive documentation
- `Doxygen <https://www.orfeo-toolbox.org/doxygen/>`_, for exhaustive documentation
of the C++ API.
Table of Contents
......
......@@ -475,7 +475,7 @@ to positive reference samples (either represented as a raster labeled
image or as a vector data containing the reference classes). It will
compute the confusion matrix and precision, recall and F-score of each
class too, based on the
`ConfusionMatrixCalculator <http://www.orfeo-toolbox.org/doxygen-current/classotb_1_1ConfusionMatrixCalculator.html>`_
`ConfusionMatrixCalculator <https://www.orfeo-toolbox.org/doxygen/classotb_1_1ConfusionMatrixCalculator.html>`_
class.
If you have made an unsupervised classification, it must be specified
......
......@@ -55,91 +55,121 @@ public:
typedef Superclass::VariableLengthVectorType VariableLengthVectorType;
typedef Superclass::ImageKeywordlistType ImageKeywordlistType;
/** Get the radiometric bias from the ossim metadata */
/** Get the radiometric bias from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetPhysicalBias() const
{
itkExceptionMacro("GetPhysicalBias not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the radiometric gain from the ossim metadata */
/** Get the radiometric gain from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetPhysicalGain() const
{
itkExceptionMacro("GetPhysicalGain not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the solar irradiance from the ossim metadata */
/** Get the solar irradiance from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetSolarIrradiance() const
{
itkExceptionMacro("GetSolarIrradiance not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging acquisition day from the ossim metadata */
/** Get the imaging acquisition day from the ossim metadata
* \deprecated
*/
int GetDay() const override
{
itkExceptionMacro("GetDay not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging acquisition month from the ossim metadata */
/** Get the imaging acquisition month from the ossim metadata
* \deprecated
*/
int GetMonth() const override
{
itkExceptionMacro("GetMonth not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging acquisition year from the ossim metadata */
/** Get the imaging acquisition year from the ossim metadata
* \deprecated
*/
int GetYear() const override
{
itkExceptionMacro("GetYear not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging acquisition hour from the ossim metadata */
/** Get the imaging acquisition hour from the ossim metadata
* \deprecated
*/
int GetHour() const override
{
itkExceptionMacro("GetHour not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging acquisition minute from the ossim metadata */
/** Get the imaging acquisition minute from the ossim metadata
* \deprecated
*/
int GetMinute() const override
{
itkExceptionMacro("GetMinute not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging production day from the ossim metadata */
/** Get the imaging production day from the ossim metadata
* \deprecated
*/
int GetProductionDay() const override
{
itkExceptionMacro("GetProductionDay not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging production month from the ossim metadata */
/** Get the imaging production month from the ossim metadata
* \deprecated
*/
int GetProductionMonth() const override
{
itkExceptionMacro("GetProductionMonth not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging production year from the ossim metadata */
/** Get the imaging production year from the ossim metadata
* \deprecated
*/
int GetProductionYear() const override
{
itkExceptionMacro("GetProductionYear not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the sat elevation from the ossim metadata */
/** Get the sat elevation from the ossim metadata
* \deprecated
*/
double GetSatElevation() const
{
itkExceptionMacro("GetSatElevation not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the sat azimuth from the ossim metadata */
/** Get the sat azimuth from the ossim metadata
* \deprecated
*/
double GetSatAzimuth() const
{
itkExceptionMacro("GetSatElevation not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the first wavelength for the spectral band definition */
/** Get the first wavelength for the spectral band definition
* \deprecated
*/
VariableLengthVectorType GetFirstWavelengths() const
{
itkExceptionMacro("GetFirstWavelengths not implemented in DefaultImageMetadataInterface, no captor type found");
}
/** Get the last wavelength for the spectral band definition */
/** Get the last wavelength for the spectral band definition
* \deprecated
*/
VariableLengthVectorType GetLastWavelengths() const
{
itkExceptionMacro("GetLastWavelengths not implemented in DefaultImageMetadataInterface, no captor type found");
......
......@@ -53,43 +53,69 @@ public:
typedef Superclass::VariableLengthVectorType VariableLengthVectorType;
typedef Superclass::ImageKeywordlistType ImageKeywordlistType;
/** Get the radiometric bias from the ossim metadata */
/** Get the radiometric bias from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetPhysicalBias() const override;
/** Get the radiometric gain from the ossim metadata */
/** Get the radiometric gain from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetPhysicalGain() const override;
/** Get the solar irradiance from the ossim metadata */
/** Get the solar irradiance from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetSolarIrradiance() const override;
/** Get the imaging acquisition day from the ossim metadata : IMAGING_DATE metadata variable */
/** Get the imaging acquisition day from the ossim metadata : IMAGING_DATE metadata variable
* \deprecated
*/
int GetDay() const override;
/** Get the imaging acquisition month from the ossim metadata : IMAGING_DATE metadata variable */
/** Get the imaging acquisition month from the ossim metadata : IMAGING_DATE metadata variable
* \deprecated
*/
int GetMonth() const override;
/** Get the imaging acquisition year from the ossim metadata : IMAGING_DATE metadata variable */
/** Get the imaging acquisition year from the ossim metadata : IMAGING_DATE metadata variable
* \deprecated
*/
int GetYear() const override;
/** Get the imaging acquisition hour from the ossim metadata : IMAGING_DATE metadata variable */
/** Get the imaging acquisition hour from the ossim metadata : IMAGING_DATE metadata variable
* \deprecated
*/
int GetHour() const override;
/** Get the imaging acquisition year from the ossim metadata : IMAGING_DATE metadata variable */
/** Get the imaging acquisition year from the ossim metadata : IMAGING_DATE metadata variable
* \deprecated
*/
int GetMinute() const override;
/** Get the imaging production day from the ossim metadata : DATASET_PRODUCTION_DATE metadata variable */
/** Get the imaging production day from the ossim metadata : DATASET_PRODUCTION_DATE metadata variable
* \deprecated
*/
int GetProductionDay() const override;
/** Get the imaging production month from the ossim metadata : DATASET_PRODUCTION_DATE metadata variable */
/** Get the imaging production month from the ossim metadata : DATASET_PRODUCTION_DATE metadata variable
* \deprecated
*/
int GetProductionMonth() const override;
/** Get the imaging production year from the ossim metadata : DATASET_PRODUCTION_DATE metadata variable */
/** Get the imaging production year from the ossim metadata : DATASET_PRODUCTION_DATE metadata variable
* \deprecated
*/
int GetProductionYear() const override;
/** Get the sat elevation from the ossim metadata */
/** Get the sat elevation from the ossim metadata
* \deprecated
*/
double GetSatElevation() const override;
/** Get the sat azimuth from the ossim metadata */
/** Get the sat azimuth from the ossim metadata
* \deprecated
*/
double GetSatAzimuth() const override;
/** Get the first wavelength for the spectral band definition */
......
......@@ -52,43 +52,69 @@ public:
typedef Superclass::VariableLengthVectorType VariableLengthVectorType;
typedef Superclass::ImageKeywordlistType ImageKeywordlistType;
/** Get the radiometric bias from the ossim metadata */
/** Get the radiometric bias from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetPhysicalBias() const override;
/** Get the radiometric gain from the ossim metadata */
/** Get the radiometric gain from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetPhysicalGain() const override;
/** Get the solar irradiance from the ossim metadata */
/** Get the solar irradiance from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetSolarIrradiance() const override;
/** Get the imaging acquisition day from the ossim metadata : "Acquisition Date/Time" metadata variable */
/** Get the imaging acquisition day from the ossim metadata : "Acquisition Date/Time" metadata variable
* \deprecated
*/
int GetDay() const override;
/** Get the imaging acquisition month from the ossim metadata : "Acquisition Date/Time" metadata variable */
/** Get the imaging acquisition month from the ossim metadata : "Acquisition Date/Time" metadata variable
* \deprecated
*/
int GetMonth() const override;
/** Get the imaging acquisition year from the ossim metadata : "Acquisition Date/Time" metadata variable */
/** Get the imaging acquisition year from the ossim metadata : "Acquisition Date/Time" metadata variable
* \deprecated
*/
int GetYear() const override;
/** Get the imaging acquisition hour from the ossim metadata : "Acquisition Date/Time" metadata variable */
/** Get the imaging acquisition hour from the ossim metadata : "Acquisition Date/Time" metadata variable
* \deprecated
*/
int GetHour() const override;
/** Get the imaging acquisition year from the ossim metadata : "Acquisition Date/Time" metadata variable */
/** Get the imaging acquisition year from the ossim metadata : "Acquisition Date/Time" metadata variable
* \deprecated
*/
int GetMinute() const override;
/** Get the imaging production day from the ossim metadata : "Creation Date" metadata variable */
/** Get the imaging production day from the ossim metadata : "Creation Date" metadata variable
* \deprecated
*/
int GetProductionDay() const override;
/** Get the imaging production month from the ossim metadata : "Creation Date" metadata variable */
/** Get the imaging production month from the ossim metadata : "Creation Date" metadata variable
* \deprecated
*/
int GetProductionMonth() const override;
/** Get the imaging production year from the ossim metadata : "Creation Date" metadata variable */
/** Get the imaging production year from the ossim metadata : "Creation Date" metadata variable
* \deprecated
*/
int GetProductionYear() const override;
/** Get the sat elevation from the ossim metadata */
/** Get the sat elevation from the ossim metadata
* \deprecated
*/
double GetSatElevation() const override;
/** Get the sat azimuth from the ossim metadata */
/** Get the sat azimuth from the ossim metadata
* \deprecated
*/
double GetSatAzimuth() const override;
/** Get the first wavelength for the spectral band definition */
......
......@@ -144,16 +144,22 @@ public:
Please use bool GetSensorID(std::string& ) **/
std::string const GetSensorID() const;
/** Get the sensor ID from the ossim metadata */
/** Get the sensor ID from the ossim metadata
* \deprecated
*/
bool GetSensorID(std::string& sensorId) const;
// otbMetadataGetMacro(SensorID, std::string);
/** Get the number of bands from the ossim metadata */
/** Get the number of bands from the ossim metadata
* \deprecated
*/
UnsignedIntType GetNumberOfBands() const;
// otbMetadataGetMacro(NumberOfBands, unsigned int);
/** Get the band name from the ossim metadata */
/** Get the band name from the ossim metadata
* \deprecated
*/
StringVectorType GetBandName() const;
// otbMetadataGetMacro(BandName, std::vector<std::string>);
......@@ -165,39 +171,57 @@ public:
double GetYPixelSpacing() const;
// otbMetadataGetMacro(YPixelSpacing, double);
/** Get the imaging acquisition day from the ossim metadata */
/** Get the imaging acquisition day from the ossim metadata
* \deprecated
*/
virtual int GetDay() const {return -1;}
// otbMetadataGetMacro(Day, int);
/** Get the imaging acquisition month from the ossim metadata */
/** Get the imaging acquisition month from the ossim metadata
* \deprecated
*/
virtual int GetMonth() const {return -1;}
// otbMetadataGetMacro(Month, int);
/** Get the imaging acquisition year from the ossim metadata */
/** Get the imaging acquisition year from the ossim metadata
* \deprecated
*/
virtual int GetYear() const {return -1;}
// otbMetadataGetMacro(Year, int);
/** Get the imaging acquisition hour from the ossim metadata */
/** Get the imaging acquisition hour from the ossim metadata
* \deprecated
*/
virtual int GetHour() const {return -1;}
// otbMetadataGetMacro(Hour, int);
/** Get the imaging acquisition minute from the ossim metadata */
/** Get the imaging acquisition minute from the ossim metadata
* \deprecated
*/
virtual int GetMinute() const {return -1;}
// otbMetadataGetMacro(Minute, int);
/** Get the imaging production day from the ossim metadata */
/** Get the imaging production day from the ossim metadata
* \deprecated
*/
virtual int GetProductionDay() const {return -1;}
// otbMetadataGetMacro(ProductionDay, int);
/** Get the imaging production month from the ossim metadata */
/** Get the imaging production month from the ossim metadata
* \deprecated
*/
virtual int GetProductionMonth() const {return -1;}
// otbMetadataGetMacro(ProductionMonth, int);
/** Get the imaging production year from the ossim metadata */
/** Get the imaging production year from the ossim metadata
* \deprecated
*/
virtual int GetProductionYear() const {return -1;}
// otbMetadataGetMacro(ProductionYear, int);
/** Convert the band names provided by ossim to the official band names */
/** Convert the band names provided by ossim to the official band names
* \deprecated
*/
virtual StringVectorType GetEnhancedBandNames() const {return StringVectorType();}
/** Get the 3 spectral band numbers corresponding to the default display for visualization,
......
......@@ -37,12 +37,14 @@ namespace otb
/**
* Reads no data flag from the MetaDataDictionary dict to flags and values
* vectors. Returns true upon success.
* \deprecated
*/
bool OTBMetadata_EXPORT ReadNoDataFlags(const itk::MetaDataDictionary& dict, std::vector<bool>& flags, std::vector<double>& values);
/**
* Write no data flags to the MetaDataDictionary dict from flags and values
* vectors. Returns true upon success.
* \deprecated
*/
void OTBMetadata_EXPORT WriteNoDataFlags(const std::vector<bool>& flags, const std::vector<double>& values, itk::MetaDataDictionary& dict);
......
......@@ -55,79 +55,105 @@ public:
typedef Superclass::VariableLengthVectorType VariableLengthVectorType;
typedef Superclass::ImageKeywordlistType ImageKeywordlistType;
/** Get the radiometric bias from the ossim metadata */
/** Get the radiometric bias from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetPhysicalBias() const override
{
itkExceptionMacro("GetPhysicalBias not implemented in OpticalDefaultImageMetadataInterface, no captor type found");
}
/** Get the radiometric gain from the ossim metadata */
/** Get the radiometric gain from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetPhysicalGain() const override
{
itkExceptionMacro("GetPhysicalGain not implemented in OpticalDefaultImageMetadataInterface, no captor type found");
}
/** Get the solar irradiance from the ossim metadata */
/** Get the solar irradiance from the ossim metadata
* \deprecated
*/
VariableLengthVectorType GetSolarIrradiance() const override
{
itkExceptionMacro("GetSolarIrradiance not implemented in OpticalDefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging acquisition day from the ossim metadata */
/** Get the imaging acquisition day from the ossim metadata
* \deprecated
*/
int GetDay() const override
{
itkExceptionMacro("GetDay not implemented in OpticalDefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging acquisition month from the ossim metadata */
/** Get the imaging acquisition month from the ossim metadata
* \deprecated
*/
int GetMonth() const override
{
itkExceptionMacro("GetMonth not implemented in OpticalDefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging acquisition year from the ossim metadata */
/** Get the imaging acquisition year from the ossim metadata
* \deprecated
*/
int GetYear() const override
{
itkExceptionMacro("GetYear not implemented in OpticalDefaultImageMetadataInterface, no captor type found");
}
/** Get the imaging acquisition hour from the ossim metadata */