[Git][debian-gis-team/otb][upstream] New upstream version 8.1.2+dfsg
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Fri Jun 23 05:30:39 BST 2023
Bas Couwenberg pushed to branch upstream at Debian GIS Project / otb
Commits:
75cfa3eb by Bas Couwenberg at 2023-06-22T19:43:13+02:00
New upstream version 8.1.2+dfsg
- - - - -
20 changed files:
- .gitlab-ci.yml
- CMakeLists.txt
- Data/Baseline/OTB/Images/apTvPrOrthorectification_OTB_Metadata.tif
- Data/Baseline/OTB/Images/owTvOrthorectifTest_UTM.tif
- Data/Baseline/OTB/Images/owTvOrthorectifTest_WGS84.tif
- Data/Input/apTvPrOrthorectifTest_UTM_OutXML1.xml
- Docker/Dockerfile
- Modules/Applications/AppImageUtils/app/otbManageNoData.cxx
- Modules/Applications/AppImageUtils/app/otbMosaic.cxx
- Modules/Applications/AppOpticalCalibration/app/otbOpticalCalibration.cxx
- Modules/Applications/AppProjection/app/otbOrthoRectification.cxx
- Modules/Core/Metadata/src/otbSentinel1ThermalNoiseLookupData.cxx
- Modules/Filtering/MathParserX/src/otbParserXPlugins.cxx
- Modules/Filtering/Mosaic/include/otbStreamingMosaicFilterBase.hxx
- Modules/IO/IOGDAL/src/otbDEMHandler.cxx
- Modules/Wrappers/SWIG/src/python/StandaloneWrapper.in
- Packaging/CMakeLists.txt
- Packaging/PackageGlobals.cmake
- Packaging/installer_files.cmake
- RELEASE_NOTES.txt
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -169,22 +169,23 @@ ubuntu-xdk-build-doc:
artifacts: true
## CentOS superbuild
-centos-xdk-prepare:
+redhat-xdk-prepare:
extends: .common-prepare
- image: $BUILD_IMAGE_REGISTRY/otb-centos-superbuild-base:7.9.2009
+ image: $BUILD_IMAGE_REGISTRY/otb-redhat-superbuild-base:8
script:
- - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=centos-7.9.2009-gcc
+ - ctest -VV -S CI/prepare_superbuild.cmake -DIMAGE_NAME:string=redhat-8-gcc
-centos-xdk-build:
+redhat-xdk-build:
extends: .common-build
- image: $BUILD_IMAGE_REGISTRY/otb-centos-superbuild-base:7.9.2009
+ image: $BUILD_IMAGE_REGISTRY/otb-redhat-superbuild-base:8
script:
- - export QT_QPA_PLATFORM=offscreen
- - ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=centos-7.9.2009-gcc
- - ctest -V -S CI/main_packages.cmake -DIMAGE_NAME:string=centos-7.9.2009-gcc
+ - export DISPLAY=:99.0
+ - Xvfb :99 -screen 0 1280x1024x24 &
+ - ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=redhat-8-gcc
+ - ctest -V -S CI/main_packages.cmake -DIMAGE_NAME:string=redhat-8-gcc
- mv build_packages/OTB-*.run . || true
needs:
- - job: centos-xdk-prepare
+ - job: redhat-xdk-prepare
artifacts: true
@@ -385,7 +386,7 @@ deploy:
artifacts: true
- job: windows-10-build
artifacts: true
- - job: centos-xdk-build
+ - job: redhat-xdk-build
artifacts: true
update-archive:
@@ -426,17 +427,17 @@ release-container:
--form variables[OTB_TAG]=$CI_COMMIT_TAG
https://gitlab.orfeo-toolbox.org/api/v4/projects/126/trigger/pipeline
-release-docker:
- image:
- name: gcr.io/kaniko-project/executor:debug
- entrypoint: [""]
- stage: docker
- only:
- refs:
- - /^release-[0-9]+\.[0-9]+$/
- script:
- - /kaniko/executor --cleanup
- --verbosity warn
- --context $CI_PROJECT_DIR/Docker
- --dockerfile $CI_PROJECT_DIR/Docker/Dockerfile
- --destination $CI_REGISTRY_IMAGE/orfeotoolbox/otb:$CI_COMMIT_BRANCH
+# release-docker:
+# image:
+# name: gcr.io/kaniko-project/executor:debug
+# entrypoint: [""]
+# stage: docker
+# only:
+# refs:
+# - /^release-[0-9]+\.[0-9]+$/
+# script:
+# - /kaniko/executor --cleanup
+# --verbosity warn
+# --context $CI_PROJECT_DIR/Docker
+# --dockerfile $CI_PROJECT_DIR/Docker/Dockerfile
+# --destination $CI_REGISTRY_IMAGE/orfeotoolbox/otb:$CI_COMMIT_BRANCH
=====================================
CMakeLists.txt
=====================================
@@ -153,7 +153,7 @@ set(main_project_name ${_OTBModuleMacros_DEFAULT_LABEL})
# OTB version number.
set(OTB_VERSION_MAJOR "8")
set(OTB_VERSION_MINOR "1")
-set(OTB_VERSION_PATCH "1")
+set(OTB_VERSION_PATCH "2")
set(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}")
get_package_name(${OTB_SOURCE_DIR} ${PROJECT_NAME} OTB_VERSION_STRING2)
=====================================
Data/Baseline/OTB/Images/apTvPrOrthorectification_OTB_Metadata.tif
=====================================
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:85a028b0cbeec272341f732c2ccc530d54443bdc3f0478cf1192a6d732d5c1a9
+oid sha256:23a2dccaed09b441f5adb58cae1a306c96d53d5b1b1735f07509af7228243242
size 4262
=====================================
Data/Baseline/OTB/Images/owTvOrthorectifTest_UTM.tif
=====================================
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:fa18b3b7c2a5f9098ab1afbe911a1e7988073e139d17318b48eff24fbac151e2
-size 1077387
+oid sha256:934eadb6297cff954d1b4c3a9a9226a4dd66fcca2f7b1b4b071911b82efbcc35
+size 1004528
=====================================
Data/Baseline/OTB/Images/owTvOrthorectifTest_WGS84.tif
=====================================
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4c0407a127a70721a072a4b97051276c88d6516f2244140a30e6d9769fa3f7bd
-size 1022844
+oid sha256:14d90c602788b8aec1dcdb9ff0d7e4f864aa1bb212c7265b8bdced3be923a9a8
+size 1004534
=====================================
Data/Input/apTvPrOrthorectifTest_UTM_OutXML1.xml
=====================================
@@ -1,17 +1,14 @@
<?xml version="1.0" ?>
<OTB>
- <version>3.18</version>
- <build>18-05-2013</build>
- <platform>Linux</platform>
+ <version>8.1.1</version>
<application>
<name>OrthoRectification</name>
- <descr>This application allows ortho-rectifying optical images from supported sensors.
</descr>
+ <descr>This application allows ortho-rectifying optical and radar images from supported sensors.</descr>
<doc>
- <name>Ortho-rectification</name>
- <longdescr>An inverse sensor model is built from the input image metadata to convert geographical to raw geometry coordinates. This inverse sensor model is then combined with the chosen map projection to build a global coordinate mapping grid. Last, this grid is used to resample using the chosen interpolation algorithm. A Digital Elevation Model can be specified to account for terrain deformations. 
In case of SPOT5 images, the sensor model can be approximated by an RPC model in order to speed-up computation.</longdescr>
+ <longdescr>This application uses inverse sensor modelling combined with a choice of interpolation functions to resample a sensor geometry image into a ground geometry regular grid. The ground geometry regular grid is defined with respect to a map projection (see map parameter). The application offers several modes to estimate the output grid parameters (origin and ground sampling distance), including automatic estimation of image size, ground sampling distance, or both, from image metadata, user-defined ROI corners, or another ortho-image.A digital Elevation Model along with a geoid file can be specified to account for terrain deformations.In case of SPOT5 images, the sensor model can be approximated by an RPC model in order to speed-up computation.</longdescr>
<authors>OTB-Team</authors>
- <limitations>Supported sensors are Pleiades, SPOT5 (TIF format), Ikonos, Quickbird, Worldview2, GeoEye.</limitations>
- <seealso>Ortho-rectification chapter from the OTB Software Guide</seealso>
+ <limitations>Supported sensors (both optical and radar) are: GeoEye, Ikonos, Pleiades, Quickbird, RadarSat, Sentinel-1, SPOT5 (TIF format), SPOT6/7, TerraSAR-X, Worldview 1/2/3, and any TIF image with embedded RPC tags.
 Also note that the opt.gridspacing default value may not be suitable for all sensors. In particular, if this value is lower than the target ground sampling distance, the processing time may increase a lot. A warning is issued in this case. Typical values should be half the DEM ground sampling distance.</limitations>
+ <seealso> </seealso>
<tags>
<tag>Geometry</tag>
</tags>
@@ -20,31 +17,32 @@
<key>io.in</key>
<type>InputImage</type>
<name>Input Image</name>
- <value>/media/ssh/pc-inglada/media/TeraDisk2/LargeInput/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF</value>
+ <value>/home/tromain/Data/OTB-LargeInput/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF</value>
</parameter>
<parameter mandatory="true">
<key>io.out</key>
<type>OutputImage</type>
<name>Output Image</name>
- <value>/home/rashad/repos/orfeo/build/OTB_/test-build/Testing/Temporary/apTvPrOrthorectifTest_UTM_OutXML1.tif</value>
+ <pixtype>float</pixtype>
+ <value>/home/tromain/Devel/builds/otb8/OTB/build/Testing/Temporary/apTvPrOrthorectifTest_UTM_OutXML1.tif</value>
</parameter>
<parameter mandatory="true">
<key>map</key>
<type>Choice</type>
- <name>Output Cartographic Map Projection</name>
+ <name>Map Projection</name>
<value>utm</value>
</parameter>
<parameter mandatory="true">
<key>outputs.ulx</key>
- <type>Float</type>
+ <type>Double</type>
<name>Upper Left X</name>
- <value>374100.8125</value>
+ <value>374100.8</value>
</parameter>
<parameter mandatory="true">
<key>outputs.uly</key>
- <type>Float</type>
+ <type>Double</type>
<name>Upper Left Y</name>
- <value>4829185</value>
+ <value>4829184.8</value>
</parameter>
<parameter mandatory="true">
<key>outputs.sizex</key>
@@ -60,13 +58,13 @@
</parameter>
<parameter mandatory="true">
<key>outputs.spacingx</key>
- <type>Float</type>
+ <type>Double</type>
<name>Pixel Size X</name>
<value>0.5</value>
</parameter>
<parameter mandatory="true">
<key>outputs.spacingy</key>
- <type>Float</type>
+ <type>Double</type>
<name>Pixel Size Y</name>
<value>-0.5</value>
</parameter>
@@ -74,7 +72,7 @@
<key>elev.dem</key>
<type>Directory</type>
<name>DEM directory</name>
- <value>/home/rashad/repos/orfeo/OTB-Data/Input/DEM/srtm_directory/</value>
+ <value>/home/tromain/Devel/otb8/Data/Input/DEM/srtm_directory/</value>
</parameter>
<parameter mandatory="true">
<key>interpolator</key>
@@ -82,9 +80,15 @@
<name>Interpolation</name>
<value>linear</value>
</parameter>
+ <parameter mandatory="false">
+ <key>opt.ram</key>
+ <type>RAM</type>
+ <name>Available RAM (MB)</name>
+ <value>256</value>
+ </parameter>
<parameter mandatory="false">
<key>opt.gridspacing</key>
- <type>Float</type>
+ <type>Double</type>
<name>Resampling grid spacing</name>
<value>4</value>
</parameter>
=====================================
Docker/Dockerfile
=====================================
@@ -18,7 +18,7 @@
# limitations under the License.
#
FROM ubuntu:20.04
-ARG OTB_RELEASE=8.0.0
+ARG OTB_RELEASE=8.1.1
# Install system dependencies
COPY system-dependencies.txt .
=====================================
Modules/Applications/AppImageUtils/app/otbManageNoData.cxx
=====================================
@@ -195,10 +195,11 @@ private:
}
auto L2V = ListToVectorFilterType::New();
L2V->SetInput(outputList);
+ L2V->UpdateOutputInformation();
+ L2V->GetOutput()->GetImageMetadata().Bands = imd.Bands;
if (!ret)
{
// write the new NoData values in the output metadata (mode.apply.ndval)
- L2V->UpdateOutputInformation();
otb::WriteNoDataFlags(flags, values, L2V->GetOutput()->GetImageMetadata());
}
SetParameterOutputImage("out", L2V->GetOutput());
=====================================
Modules/Applications/AppImageUtils/app/otbMosaic.cxx
=====================================
@@ -280,7 +280,6 @@ private:
AddParameter(ParameterType_Float, "comp.feather.slim.length", "Transition length (In cartographic units)");
MandatoryOn("comp.feather.slim.length");
SetMinimumParameterFloatValue("comp.feather.slim.length", 0);
- MandatoryOff("comp.feather.slim.length");
// harmo (harmonization)
AddParameter(ParameterType_Group, "harmo", "Spectral bands harmonization mode");
@@ -793,13 +792,17 @@ private:
{
// If tmpdir is empty, we use the same output directory as for the output image
tmpdir = itksys::SystemTools::GetFilenamePath(outfname.c_str());
+ if (tmpdir.size() == 1)
+ // No path has been found -> "/"
+ tmpdir = "";
}
// Check that it ends with a POSIX separator
- if (tmpdir[tmpdir.size() - 1] != '/')
- {
- tmpdir.append("/");
- }
+ if (tmpdir.size() > 0)
+ if (tmpdir[tmpdir.size() - 1] != '/')
+ {
+ tmpdir.append("/");
+ }
m_TempFilesPrefix = tmpdir + outbfname;
otbAppLogINFO(<< "Temporary files prefix is: " << m_TempFilesPrefix);
=====================================
Modules/Applications/AppOpticalCalibration/app/otbOpticalCalibration.cxx
=====================================
@@ -383,7 +383,11 @@ private:
{
bool newInputImage = false;
std::string tempName = GetParameterString("in");
-
+ //In case the parameter "in" is a pointer to memory, tempName will be ""
+ if(tempName == "" && (GetParameterImage("in")!=NULL))
+ {
+ tempName = "From memory";
+ }
// Check if the input image change
if (tempName != m_inImageName)
{
=====================================
Modules/Applications/AppProjection/app/otbOrthoRectification.cxx
=====================================
@@ -56,7 +56,7 @@ enum
Mode_OrthoFit
};
-const float DefaultGridSpacingMeter = 4.0;
+const double DefaultGridSpacingMeter = 4.0;
namespace Wrapper
{
@@ -140,10 +140,10 @@ private:
SetParameterDescription("outputs.mode.orthofit", "Fit the size, origin and spacing to an existing ortho image (uses the value of outputs.ortho)");
// Upper left point coordinates
- AddParameter(ParameterType_Float, "outputs.ulx", "Upper Left X");
+ AddParameter(ParameterType_Double, "outputs.ulx", "Upper Left X");
SetParameterDescription("outputs.ulx", "Cartographic X coordinate of upper-left corner (meters for cartographic projections, degrees for geographic ones)");
- AddParameter(ParameterType_Float, "outputs.uly", "Upper Left Y");
+ AddParameter(ParameterType_Double, "outputs.uly", "Upper Left Y");
SetParameterDescription("outputs.uly",
"Cartographic Y coordinate of the upper-left corner (meters for cartographic projections, degrees for geographic ones)");
@@ -155,19 +155,19 @@ private:
SetParameterDescription("outputs.sizey", "Size of projected image along Y (in pixels)");
// Spacing of the output image
- AddParameter(ParameterType_Float, "outputs.spacingx", "Pixel Size X");
+ AddParameter(ParameterType_Double, "outputs.spacingx", "Pixel Size X");
SetParameterDescription("outputs.spacingx", "Size of each pixel along X axis (meters for cartographic projections, degrees for geographic ones)");
- AddParameter(ParameterType_Float, "outputs.spacingy", "Pixel Size Y");
+ AddParameter(ParameterType_Double, "outputs.spacingy", "Pixel Size Y");
SetParameterDescription("outputs.spacingy", "Size of each pixel along Y axis (meters for cartographic projections, degrees for geographic ones)");
// Lower right point coordinates
- AddParameter(ParameterType_Float, "outputs.lrx", "Lower right X");
+ AddParameter(ParameterType_Double, "outputs.lrx", "Lower right X");
SetParameterDescription("outputs.lrx",
"Cartographic X coordinate of the lower-right corner (meters for cartographic projections, degrees for geographic ones)");
- AddParameter(ParameterType_Float, "outputs.lry", "Lower right Y");
+ AddParameter(ParameterType_Double, "outputs.lry", "Lower right Y");
SetParameterDescription("outputs.lry",
"Cartographic Y coordinate of the lower-right corner (meters for cartographic projections, degrees for geographic ones)");
@@ -192,9 +192,9 @@ private:
SetParameterDescription("outputs.isotropic", isotropOss.str());
SetParameterInt("outputs.isotropic", 1);
- AddParameter(ParameterType_Float, "outputs.default", "Default pixel value");
+ AddParameter(ParameterType_Double, "outputs.default", "Default pixel value");
SetParameterDescription("outputs.default", "Default value to write when outside of input image.");
- SetDefaultParameterFloat("outputs.default", 0.);
+ SetDefaultParameterDouble("outputs.default", 0.);
MandatoryOff("outputs.default");
// Elevation
@@ -231,8 +231,8 @@ private:
"write large pieces of data, which can be achieved by increasing this parameter (pay attention to your system capabilities)");
// Displacement Field Spacing
- AddParameter(ParameterType_Float, "opt.gridspacing", "Resampling grid spacing");
- SetDefaultParameterFloat("opt.gridspacing", DefaultGridSpacingMeter);
+ AddParameter(ParameterType_Double, "opt.gridspacing", "Resampling grid spacing");
+ SetDefaultParameterDouble("opt.gridspacing", DefaultGridSpacingMeter);
SetParameterDescription("opt.gridspacing",
"Resampling is done according to a coordinate mapping deformation grid, "
"whose pixel size is set by this parameter, and "
@@ -286,14 +286,14 @@ private:
SetDefaultParameterInt("outputs.sizex", genericRSEstimator->GetOutputSize()[0]);
SetDefaultParameterInt("outputs.sizey", genericRSEstimator->GetOutputSize()[1]);
- SetDefaultParameterFloat("outputs.spacingx", genericRSEstimator->GetOutputSpacing()[0]);
- SetDefaultParameterFloat("outputs.spacingy", genericRSEstimator->GetOutputSpacing()[1]);
- SetDefaultParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0] - 0.5 * genericRSEstimator->GetOutputSpacing()[0]);
- SetDefaultParameterFloat("outputs.uly", genericRSEstimator->GetOutputOrigin()[1] - 0.5 * genericRSEstimator->GetOutputSpacing()[1]);
- SetDefaultParameterFloat("outputs.lrx", GetParameterFloat("outputs.ulx") +
- GetParameterFloat("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
- SetDefaultParameterFloat("outputs.lry", GetParameterFloat("outputs.uly") +
- GetParameterFloat("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
+ SetDefaultParameterDouble("outputs.spacingx", genericRSEstimator->GetOutputSpacing()[0]);
+ SetDefaultParameterDouble("outputs.spacingy", genericRSEstimator->GetOutputSpacing()[1]);
+ SetDefaultParameterDouble("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0] - 0.5 * genericRSEstimator->GetOutputSpacing()[0]);
+ SetDefaultParameterDouble("outputs.uly", genericRSEstimator->GetOutputOrigin()[1] - 0.5 * genericRSEstimator->GetOutputSpacing()[1]);
+ SetDefaultParameterDouble("outputs.lrx", GetParameterDouble("outputs.ulx") +
+ GetParameterDouble("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
+ SetDefaultParameterDouble("outputs.lry", GetParameterDouble("outputs.uly") +
+ GetParameterDouble("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
// Handle the spacing and size field following the mode
// chose by the user
@@ -324,10 +324,10 @@ private:
MandatoryOff("outputs.ortho");
// Update lower right
- SetParameterFloat("outputs.lrx",
- GetParameterFloat("outputs.ulx") + GetParameterFloat("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
- SetParameterFloat("outputs.lry",
- GetParameterFloat("outputs.uly") + GetParameterFloat("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
+ SetParameterDouble("outputs.lrx",
+ GetParameterDouble("outputs.ulx") + GetParameterDouble("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
+ SetParameterDouble("outputs.lry",
+ GetParameterDouble("outputs.uly") + GetParameterDouble("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
}
break;
case Mode_AutomaticSize:
@@ -355,8 +355,8 @@ private:
MandatoryOff("outputs.ortho");
ResampleFilterType::SpacingType spacing;
- spacing[0] = GetParameterFloat("outputs.spacingx");
- spacing[1] = GetParameterFloat("outputs.spacingy");
+ spacing[0] = GetParameterDouble("outputs.spacingx");
+ spacing[1] = GetParameterDouble("outputs.spacingy");
genericRSEstimator->ForceSpacingTo(spacing);
genericRSEstimator->Compute();
@@ -366,14 +366,14 @@ private:
SetParameterInt("outputs.sizey", genericRSEstimator->GetOutputSize()[1]);
// Reset Origin to default
- SetParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0] - 0.5 * genericRSEstimator->GetOutputSpacing()[0]);
- SetParameterFloat("outputs.uly", genericRSEstimator->GetOutputOrigin()[1] - 0.5 * genericRSEstimator->GetOutputSpacing()[1]);
+ SetParameterDouble("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0] - 0.5 * genericRSEstimator->GetOutputSpacing()[0]);
+ SetParameterDouble("outputs.uly", genericRSEstimator->GetOutputOrigin()[1] - 0.5 * genericRSEstimator->GetOutputSpacing()[1]);
// Update lower right
- SetParameterFloat("outputs.lrx",
- GetParameterFloat("outputs.ulx") + GetParameterFloat("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
- SetParameterFloat("outputs.lry",
- GetParameterFloat("outputs.uly") + GetParameterFloat("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
+ SetParameterDouble("outputs.lrx",
+ GetParameterDouble("outputs.ulx") + GetParameterDouble("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
+ SetParameterDouble("outputs.lry",
+ GetParameterDouble("outputs.uly") + GetParameterDouble("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
}
break;
case Mode_AutomaticSpacing:
@@ -408,18 +408,18 @@ private:
genericRSEstimator->Compute();
// Set the processed spacing relative to this forced size
- SetParameterFloat("outputs.spacingx", genericRSEstimator->GetOutputSpacing()[0]);
- SetParameterFloat("outputs.spacingy", genericRSEstimator->GetOutputSpacing()[1]);
+ SetParameterDouble("outputs.spacingx", genericRSEstimator->GetOutputSpacing()[0]);
+ SetParameterDouble("outputs.spacingy", genericRSEstimator->GetOutputSpacing()[1]);
// Reset Origin to default
- SetParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0] - 0.5 * genericRSEstimator->GetOutputSpacing()[0]);
- SetParameterFloat("outputs.uly", genericRSEstimator->GetOutputOrigin()[1] - 0.5 * genericRSEstimator->GetOutputSpacing()[1]);
+ SetParameterDouble("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0] - 0.5 * genericRSEstimator->GetOutputSpacing()[0]);
+ SetParameterDouble("outputs.uly", genericRSEstimator->GetOutputOrigin()[1] - 0.5 * genericRSEstimator->GetOutputSpacing()[1]);
// Update lower right
- SetParameterFloat("outputs.lrx",
- GetParameterFloat("outputs.ulx") + GetParameterFloat("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
- SetParameterFloat("outputs.lry",
- GetParameterFloat("outputs.uly") + GetParameterFloat("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
+ SetParameterDouble("outputs.lrx",
+ GetParameterDouble("outputs.ulx") + GetParameterDouble("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
+ SetParameterDouble("outputs.lry",
+ GetParameterDouble("outputs.uly") + GetParameterDouble("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
}
break;
case Mode_OutputROI:
@@ -447,14 +447,14 @@ private:
MandatoryOff("outputs.ortho");
ResampleFilterType::SpacingType spacing;
- spacing[0] = GetParameterFloat("outputs.spacingx");
- spacing[1] = GetParameterFloat("outputs.spacingy");
+ spacing[0] = GetParameterDouble("outputs.spacingx");
+ spacing[1] = GetParameterDouble("outputs.spacingy");
// Set the processed size relative to this forced spacing
if (std::abs(spacing[0]) > 0.0)
- SetParameterInt("outputs.sizex", static_cast<int>(std::ceil((GetParameterFloat("outputs.lrx") - GetParameterFloat("outputs.ulx")) / spacing[0])));
+ SetParameterInt("outputs.sizex", static_cast<int>(std::ceil((GetParameterDouble("outputs.lrx") - GetParameterDouble("outputs.ulx")) / spacing[0])));
if (std::abs(spacing[1]) > 0.0)
- SetParameterInt("outputs.sizey", static_cast<int>(std::ceil((GetParameterFloat("outputs.lry") - GetParameterFloat("outputs.uly")) / spacing[1])));
+ SetParameterInt("outputs.sizey", static_cast<int>(std::ceil((GetParameterDouble("outputs.lry") - GetParameterDouble("outputs.uly")) / spacing[1])));
}
break;
case Mode_OrthoFit:
@@ -492,15 +492,15 @@ private:
SetParameterInt("outputs.sizex", size[0]);
SetParameterInt("outputs.sizey", size[1]);
- SetParameterFloat("outputs.spacingx", spacing[0]);
- SetParameterFloat("outputs.spacingy", spacing[1]);
- SetParameterFloat("outputs.ulx", orig[0] - 0.5 * spacing[0]);
- SetParameterFloat("outputs.uly", orig[1] - 0.5 * spacing[1]);
+ SetParameterDouble("outputs.spacingx", spacing[0]);
+ SetParameterDouble("outputs.spacingy", spacing[1]);
+ SetParameterDouble("outputs.ulx", orig[0] - 0.5 * spacing[0]);
+ SetParameterDouble("outputs.uly", orig[1] - 0.5 * spacing[1]);
// Update lower right
- SetParameterFloat("outputs.lrx",
- GetParameterFloat("outputs.ulx") + GetParameterFloat("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
- SetParameterFloat("outputs.lry",
- GetParameterFloat("outputs.uly") + GetParameterFloat("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
+ SetParameterDouble("outputs.lrx",
+ GetParameterDouble("outputs.ulx") + GetParameterDouble("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
+ SetParameterDouble("outputs.lry",
+ GetParameterDouble("outputs.uly") + GetParameterDouble("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
}
}
break;
@@ -513,30 +513,30 @@ private:
if (m_OutputProjectionRef == otb::SpatialReference::FromWGS84().ToWkt())
{
// How much is 4 meters in degrees ?
- typedef itk::Point<float, 2> FloatPointType;
- FloatPointType point1, point2;
+ typedef itk::Point<double, 2> DoublePointType;
+ DoublePointType point1, point2;
- typedef otb::GeographicalDistance<FloatPointType> GeographicalDistanceType;
+ typedef otb::GeographicalDistance<DoublePointType> GeographicalDistanceType;
GeographicalDistanceType::Pointer geoDistanceCalculator = GeographicalDistanceType::New();
// center
- point1[0] = GetParameterFloat("outputs.ulx") + GetParameterFloat("outputs.spacingx") * GetParameterInt("outputs.sizex") / 2;
- point1[1] = GetParameterFloat("outputs.uly") + GetParameterFloat("outputs.spacingy") * GetParameterInt("outputs.sizey") / 2;
+ point1[0] = GetParameterDouble("outputs.ulx") + GetParameterDouble("outputs.spacingx") * GetParameterInt("outputs.sizex") / 2;
+ point1[1] = GetParameterDouble("outputs.uly") + GetParameterDouble("outputs.spacingy") * GetParameterInt("outputs.sizey") / 2;
// center + [1,0]
- point2[0] = point1[0] + GetParameterFloat("outputs.spacingx");
+ point2[0] = point1[0] + GetParameterDouble("outputs.spacingx");
point2[1] = point1[1];
double xgroundspacing = geoDistanceCalculator->Evaluate(point1, point2);
otbAppLogINFO("Output X ground spacing in meter = " << xgroundspacing);
// center + [0,1]
point2[0] = point1[0];
- point2[1] = point1[1] + GetParameterFloat("outputs.spacingy");
+ point2[1] = point1[1] + GetParameterDouble("outputs.spacingy");
double ygroundspacing = geoDistanceCalculator->Evaluate(point1, point2);
otbAppLogINFO("Output Y ground spacing in meter = " << ygroundspacing);
- double xgridspacing = DefaultGridSpacingMeter * GetParameterFloat("outputs.spacingx") / xgroundspacing;
- double ygridspacing = DefaultGridSpacingMeter * GetParameterFloat("outputs.spacingy") / ygroundspacing;
+ double xgridspacing = DefaultGridSpacingMeter * GetParameterDouble("outputs.spacingx") / xgroundspacing;
+ double ygridspacing = DefaultGridSpacingMeter * GetParameterDouble("outputs.spacingy") / ygroundspacing;
otbAppLogINFO(<< DefaultGridSpacingMeter << " meters in X direction correspond roughly to " << xgridspacing << " degrees");
otbAppLogINFO(<< DefaultGridSpacingMeter << " meters in Y direction correspond roughly to " << ygridspacing << " degrees");
@@ -544,11 +544,11 @@ private:
// Use the smallest spacing (more precise grid)
double optimalSpacing = std::min(std::abs(xgridspacing), std::abs(ygridspacing));
otbAppLogINFO("Setting grid spacing to " << optimalSpacing);
- SetParameterFloat("opt.gridspacing", optimalSpacing);
+ SetParameterDouble("opt.gridspacing", optimalSpacing);
}
else // if (m_OutputProjectionRef == otb::SpatialReference().ToWkt())
{
- SetParameterFloat("opt.gridspacing", DefaultGridSpacingMeter);
+ SetParameterDouble("opt.gridspacing", DefaultGridSpacingMeter);
} // if (m_OutputProjectionRef == otb::SpatialReference().ToWkt())
} // if (!HasUserValue("opt.gridspacing"))
} // if (HasValue("io.in"))
@@ -557,7 +557,7 @@ private:
void DoExecute() override
{
// Get the input image
- FloatVectorImageType* inImage = GetParameterImage("io.in");
+ FloatVectorImageType::Pointer inImage = GetParameterImage("io.in");
// Resampler Instantiation
m_ResampleFilter = ResampleFilterType::New();
@@ -575,10 +575,10 @@ private:
}
// Check spacing sign
- if (GetParameterFloat("outputs.spacingy") > 0.)
+ if (GetParameterDouble("outputs.spacingy") > 0.)
{
otbAppLogWARNING(<< "Wrong value for outputs.spacingy: Pixel size along Y axis should be negative, (outputs.spacingy="
- << GetParameterFloat("outputs.spacingy") << ")")
+ << GetParameterDouble("outputs.spacingy") << ")")
}
// Get Interpolator
@@ -621,21 +621,21 @@ private:
otbAppLogINFO("Generating output with size = " << size);
ResampleFilterType::SpacingType spacing;
- spacing[0] = GetParameterFloat("outputs.spacingx");
- spacing[1] = GetParameterFloat("outputs.spacingy");
+ spacing[0] = GetParameterDouble("outputs.spacingx");
+ spacing[1] = GetParameterDouble("outputs.spacingy");
m_ResampleFilter->SetOutputSpacing(spacing);
otbAppLogINFO("Generating output with pixel spacing = " << spacing);
ResampleFilterType::OriginType origin;
- origin[0] = GetParameterFloat("outputs.ulx") + 0.5 * GetParameterFloat("outputs.spacingx");
- origin[1] = GetParameterFloat("outputs.uly") + 0.5 * GetParameterFloat("outputs.spacingy");
+ origin[0] = GetParameterDouble("outputs.ulx") + 0.5 * GetParameterDouble("outputs.spacingx");
+ origin[1] = GetParameterDouble("outputs.uly") + 0.5 * GetParameterDouble("outputs.spacingy");
m_ResampleFilter->SetOutputOrigin(origin);
otbAppLogINFO("Generating output with origin = " << origin);
// Build the default pixel
FloatVectorImageType::PixelType defaultValue;
defaultValue.SetSize(inImage->GetNumberOfComponentsPerPixel());
- defaultValue.Fill(GetParameterFloat("outputs.default"));
+ defaultValue.Fill(GetParameterDouble("outputs.default"));
m_ResampleFilter->SetEdgePaddingValue(defaultValue);
otbAppLogINFO("Area outside input image bounds will have a pixel value of " << defaultValue);
@@ -644,12 +644,12 @@ private:
ResampleFilterType::SpacingType gridSpacing;
if (IsParameterEnabled("opt.gridspacing"))
{
- gridSpacing[0] = GetParameterFloat("opt.gridspacing");
- gridSpacing[1] = -GetParameterFloat("opt.gridspacing");
+ gridSpacing[0] = GetParameterDouble("opt.gridspacing");
+ gridSpacing[1] = -GetParameterDouble("opt.gridspacing");
- otbAppLogINFO("Using a deformation grid with a physical spacing of " << GetParameterFloat("opt.gridspacing"));
+ otbAppLogINFO("Using a deformation grid with a physical spacing of " << GetParameterDouble("opt.gridspacing"));
- if (GetParameterFloat("opt.gridspacing") == 0)
+ if (GetParameterDouble("opt.gridspacing") == 0)
{
otbAppLogFATAL("opt.gridspacing must be different from 0 ");
}
@@ -657,9 +657,9 @@ private:
// Predict size of deformation grid
ResampleFilterType::SpacingType deformationGridSize;
deformationGridSize[0] = static_cast<ResampleFilterType::SpacingType::ValueType>(
- std::abs(GetParameterInt("outputs.sizex") * GetParameterFloat("outputs.spacingx") / GetParameterFloat("opt.gridspacing")));
+ std::abs(GetParameterInt("outputs.sizex") * GetParameterDouble("outputs.spacingx") / GetParameterDouble("opt.gridspacing")));
deformationGridSize[1] = static_cast<ResampleFilterType::SpacingType::ValueType>(
- std::abs(GetParameterInt("outputs.sizey") * GetParameterFloat("outputs.spacingy") / GetParameterFloat("opt.gridspacing")));
+ std::abs(GetParameterInt("outputs.sizey") * GetParameterDouble("outputs.spacingy") / GetParameterDouble("opt.gridspacing")));
otbAppLogINFO("Using a deformation grid of size " << deformationGridSize);
if (deformationGridSize[0] * deformationGridSize[1] == 0)
@@ -670,8 +670,8 @@ private:
"opt.gridspacing units are the same as outputs.spacing units");
}
- if (std::abs(GetParameterFloat("opt.gridspacing")) < std::abs(GetParameterFloat("outputs.spacingx")) ||
- std::abs(GetParameterFloat("opt.gridspacing")) < std::abs(GetParameterFloat("outputs.spacingy")))
+ if (std::abs(GetParameterDouble("opt.gridspacing")) < std::abs(GetParameterDouble("outputs.spacingx")) ||
+ std::abs(GetParameterDouble("opt.gridspacing")) < std::abs(GetParameterDouble("outputs.spacingy")))
{
otbAppLogWARNING(
"Spacing of deformation grid should be at least equal to "
@@ -685,7 +685,7 @@ private:
}
// Output Image
- SetParameterOutputImage("io.out", m_ResampleFilter->GetOutput());
+ SetParameterOutputImage<FloatVectorImageType>("io.out", m_ResampleFilter->GetOutput());
}
ResampleFilterType::Pointer m_ResampleFilter;
=====================================
Modules/Core/Metadata/src/otbSentinel1ThermalNoiseLookupData.cxx
=====================================
@@ -99,8 +99,10 @@ int Sentinel1ThermalNoiseLookupData::GetRangeVectorIndex(int y) const
return i - 1;
}
}
-
- return -1;
+
+ otbGenericExceptionMacro(MissingMetadataException,<<"Missing LUT metadata for index : '"<<y<<"', you should call the calibration without 'removenoise' parameter")
+ //Avoid any segfault that occured when LUT missing metadata was missing
+ return 0;
}
int Sentinel1ThermalNoiseLookupData::GetAzimuthVectorIndex(int x, int y) const
@@ -116,7 +118,9 @@ int Sentinel1ThermalNoiseLookupData::GetAzimuthVectorIndex(int x, int y) const
}
}
- return -1;
+ otbGenericExceptionMacro(MissingMetadataException,<<"Missing LUT metadata for index : '"<<x<<" "<<y<<"', you should call the calibration without 'removenoise' parameter")
+ //Avoid any segfault that occured when LUT missing metadata was missing
+ return 0;
}
int Sentinel1ThermalNoiseLookupData::GetPixelIndex(int x, const std::vector<int> & vec) const
=====================================
Modules/Filtering/MathParserX/src/otbParserXPlugins.cxx
=====================================
@@ -728,7 +728,7 @@ void vmax::Eval(mup::ptr_val_type& ret, const mup::ptr_val_type* a_pArg, int a_i
assert(a_pArg[0]->GetType() == 'm');
- max = itk::NumericTraits<double>::min();
+ max = itk::NumericTraits<double>::NonpositiveMin();
m1 = a_pArg[0]->GetArray();
=====================================
Modules/Filtering/Mosaic/include/otbStreamingMosaicFilterBase.hxx
=====================================
@@ -331,7 +331,7 @@ void StreamingMosaicFilterBase<TInputImage, TOutputImage, TInternalValueType>::G
}
if (m_NoDataOutputPixel.GetSize() == 0)
{
- itkWarningMacro(<< "NoDataOutputPixel not set. Using zeros");
+ itkDebugMacro(<< "NoDataOutputPixel not set. Using zeros");
m_NoDataOutputPixel.SetSize(nbOfBands);
m_NoDataOutputPixel.Fill(itk::NumericTraits<InputImageInternalPixelType>::Zero);
}
=====================================
Modules/IO/IOGDAL/src/otbDEMHandler.cxx
=====================================
@@ -426,7 +426,7 @@ void DEMHandler::RegisterConfigurationInHandler(DEMHandlerTLS & tls) const
if (! m_DatasetList.empty()) {
if (! tls.OpenDEMVRTFile())
{
- otbLogMacro(Warning, << "An unexpected situation has occured: trying to open a VRT created from incompatible DEM files");
+ otbLogMacro(Warning, << "An unexpected situation has occurred: trying to open a VRT created from incompatible DEM files");
assert(false);
// The following should not be necessary. In the impossible case
// the VRT file could not be opened, we just clear everything in
=====================================
Modules/Wrappers/SWIG/src/python/StandaloneWrapper.in
=====================================
@@ -18,7 +18,7 @@
# limitations under the License.
#
-cmake_minimum_required(VERSION 3.10.1)
+cmake_minimum_required(VERSION 3.12)
project(OTBPythonWrappers)
if(POLICY CMP0072)
@@ -29,32 +29,14 @@ get_filename_component(PKG_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(PKG_PREFIX "${PKG_PREFIX}" PATH)
get_filename_component(PKG_PREFIX "${PKG_PREFIX}" PATH)
+find_package(Boost REQUIRED COMPONENTS filesystem serialization unit_test_framework)
find_package(OTB REQUIRED HINTS ${PKG_PREFIX}/@OTB_INSTALL_PACKAGE_DIR@)
list(APPEND CMAKE_MODULE_PATH ${OTB_CMAKE_DIR})
include(${OTB_USE_FILE})
-if(CMAKE_VERSION VERSION_LESS 3.12.0)
- set ( Python_ADDITIONAL_VERSIONS "3;2" )
- set ( PythonInterp_FIND_REQUIRED ${OTB_WRAP_PYTHON} )
- set ( PythonLibs_FIND_REQUIRED ${OTB_WRAP_PYTHON} )
- find_package( PythonInterp )
- if ( OTB_WRAP_PYTHON AND ( "x${PYTHON_VERSION_MAJOR}" STREQUAL "x2" ) )
- message (WARNING "Python3 not found. There is no longer support of \
- wrapping in python2 in OTB, but it can still be used.")
- endif()
- # Now that we have a python version the addditional versions should only
- # contain the version we have to get the corresponding libs
- set (Python_ADDITIONAL_VERSIONS "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
- find_package ( PythonLibs )
- include_directories(${PYTHON_INCLUDE_DIR})
-else()
- if(WIN32)
- set(Python_ROOT_DIR "C:/tools/Python37-x64")
- endif()
- find_package( Python REQUIRED COMPONENTS Interpreter Development)
- include_directories(${Python_INCLUDE_DIRS})
- set(PYTHON_LIBRARIES ${Python_LIBRARIES})
-endif()
+find_package( Python REQUIRED COMPONENTS Interpreter Development)
+include_directories(${Python_INCLUDE_DIRS})
+set(PYTHON_LIBRARIES ${Python_LIBRARIES})
find_package(Numpy)
if ( NUMPY_FOUND )
=====================================
Packaging/CMakeLists.txt
=====================================
@@ -113,8 +113,14 @@ get_package_name(${PACKAGE_OTB_SRC_DIR} PKG_OTB OTB_VERSION_STRING2)
# We stage/keep files that goes into final package in this directory
set(PKG_STAGE_DIR ${PACKAGE_NAME}-${OTB_VERSION_STRING2}-${PACKAGE_PLATFORM_NAME}${PACKAGE_ARCH}${NAME_SUFFIX})
-set(PATCHELF_PROGRAM "${CMAKE_BINARY_DIR}/PATCHELF/src/patchelf/src/patchelf")
-include(External_patchelf)
+# try to detect patchelf
+find_program(PATCHELF_PROGRAM NAMES patchelf)
+if(NOT PATCHELF_PROGRAM)
+ set(PATCHELF_PROGRAM "${CMAKE_BINARY_DIR}/PATCHELF/src/patchelf/src/patchelf")
+ include(External_patchelf)
+else()
+ set(__EXTERNAL_PATCHELF__ 1)
+endif()
include(PackageGlobals)
=====================================
Packaging/PackageGlobals.cmake
=====================================
@@ -123,6 +123,7 @@ set(LINUX_SYSTEM_DLLS
libEGL.so*
libxkbcommon*
libxcb-*
+ libpcre2*
)
# libexpat.so.*
# libfontconfig.so*
=====================================
Packaging/installer_files.cmake
=====================================
@@ -129,5 +129,7 @@ macro(installer_files)
add_executable(otb_loader ${CMAKE_CURRENT_SOURCE_DIR}/Files/otb_loader.cxx)
target_link_libraries(otb_loader ${CMAKE_DL_LIBS})
install(TARGETS otb_loader DESTINATION ${PKG_STAGE_DIR}/tools)
- add_dependencies(otb_loader PATCHELF)
+ if(NOT __EXTERNAL_PATCHELF__)
+ add_dependencies(otb_loader PATCHELF)
+ endif()
endmacro()
=====================================
RELEASE_NOTES.txt
=====================================
@@ -1,4 +1,24 @@
-OTB-v8.1.1 - Changes since version 8.1.0 (Wednesday 13th, 2023)
+OTB-v 8.1.2 - Changes since version 8.1.1 (June 22th, 2023)
+
+Bugs fixed:
+ * !960: BUG: Fix precision from float to double on the orthorectification app by Thibaut ROMAIN
+ * !954: BUG: calling vmax on an image with negative values returns 0 as max instead of the real max by Thibaut ROMAIN
+ * !949: Mosaic application fixes by Rémi CRESSON
+ * !945: BUG: Fix wrong in-memory connection to OpticalCalibration by Thibaut ROMAIN
+ * !944: Fix band metadata drop in ManageNoData application by Thibaut ROMAIN
+ * !948: BUG: Fix segmentation fault with some S1 products with SarCalibration app by Thibaut ROMAIN
+
+Documentation:
+ * !961: add a caption on python APi about the zonalstatistics app problem by Thibaut ROMAIN
+ * !956: add a before installation step in documentation to describe system dependencies to install by Thibaut ROMAIN
+ * !952: Add some tips to use OTB python interfaces with rasterio and numpy by Yannick TANGUY
+ * !947: Update Documentation/Cookbook/rst/recipes/sarprocessing.rst by Mickaël SAVINAUD
+
+CI:
+ * !959: Update CI to replace CentOS7 with RedHat 8, minor dependencies updates for compilation compatibility with Ubuntu 22 by Thibaut ROMAIN
+
+OTB-v 8.1.1 - Changes since version 8.1.0 (January 13th, 2023)
+--------------------------------------------------------------
Bugs fixed:
* !933: Improve DEMHandler performances which fixes #2307 Spatial shifting with Orthorectifcation of Sentinel 1 products by Luc Hermitte
@@ -10,8 +30,7 @@ CI:
* Update ZLIB to 1.2.13 by Thibaut ROMAIN (backport from !902)
OTB-v 8.1.0 - Changes since version 8.0.1 (September 14th, 2022)
----------------------------------------------------------------------
-
+----------------------------------------------------------------
Features added:
* !926: rpcSolver: Avoid setting equation system multiple times by Julien Osman
View it on GitLab: https://salsa.debian.org/debian-gis-team/otb/-/commit/75cfa3eb26d843354f2bd4d925de16b34726e1ad
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/otb/-/commit/75cfa3eb26d843354f2bd4d925de16b34726e1ad
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20230623/694ccb94/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list