[otb] 01/08: Imported Upstream version 5.6.1+dfsg
Bas Couwenberg
sebastic at debian.org
Fri Aug 26 19:30:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository otb.
commit 5c204ffa872b014de49d3dc0570babb5f0ac723e
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Fri Aug 26 18:49:14 2016 +0200
Imported Upstream version 5.6.1+dfsg
---
CMakeLists.txt | 6 +-
.../AppClassification/app/otbSampleExtraction.cxx | 2 +-
.../AppClassification/app/otbSampleSelection.cxx | 4 +-
.../Statistics/include/otbPatternSampler.h | 2 +-
.../Statistics/include/otbPeriodicSampler.h | 2 +-
.../Statistics/include/otbRandomSampler.h | 2 +-
.../otbStreamingStatisticsVectorImageFilter.txx | 2 +-
.../Filtering/Wavelet/src/otbWaveletGenerator.cxx | 6 +-
.../include/otbPersistentSamplingFilterBase.txx | 33 +++++++-
.../include/otbSimpleParallelTiffWriter.txx | 2 +-
.../include/otbOGRDataSourceToLabelImageFilter.txx | 2 +-
.../OssimPlugins/src/ossim/ossimSentinel1Model.cpp | 2 +-
.../src/ossim/ossimSentinel1SarSensorModel.cpp | 2 +-
.../OssimPlugins/src/ossim/ossimStringUtilities.h | 95 ++++++++++++++++++++--
.../OssimPlugins/src/ossim/ossimTimeUtilities.cpp | 16 ++--
.../OssimPlugins/src/ossim/ossimTimeUtilities.h | 4 +-
.../OssimPlugins/test/ossimStringUtilitiesTest.cpp | 3 +-
Modules/ThirdParty/SPTW/src/sptw.cc | 1 +
.../src/otbApplicationLauncherCommandLine.cxx | 5 +-
RELEASE_NOTES.txt | 9 ++
20 files changed, 158 insertions(+), 42 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91a2226..be435b9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,7 +88,7 @@ set(main_project_name ${_OTBModuleMacros_DEFAULT_LABEL})
# OTB version number.
set(OTB_VERSION_MAJOR "5")
set(OTB_VERSION_MINOR "6")
-set(OTB_VERSION_PATCH "0")
+set(OTB_VERSION_PATCH "1")
set(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}")
string(TIMESTAMP OTB_BUILD_TIMESTAMP)
@@ -397,7 +397,9 @@ endmacro()
message("\n======================= Begin of OTB cmake summary =======================\n")
-message( ${OTB_GIT_STATUS_MESSAGE})
+if(OTB_GIT_STATUS_MESSAGE)
+ message( ${OTB_GIT_STATUS_MESSAGE})
+endif()
if(OTB_DATA_GIT_STATUS_MESSAGE)
message( ${OTB_DATA_GIT_STATUS_MESSAGE})
endif()
diff --git a/Modules/Applications/AppClassification/app/otbSampleExtraction.cxx b/Modules/Applications/AppClassification/app/otbSampleExtraction.cxx
index 64bd94a..440342f 100644
--- a/Modules/Applications/AppClassification/app/otbSampleExtraction.cxx
+++ b/Modules/Applications/AppClassification/app/otbSampleExtraction.cxx
@@ -146,7 +146,7 @@ private:
}
else
{
- otbAppLogFATAL("Unkown output field option : " << this->GetParameterString("outfield"));
+ otbAppLogFATAL("Unknown output field option : " << this->GetParameterString("outfield"));
}
diff --git a/Modules/Applications/AppClassification/app/otbSampleSelection.cxx b/Modules/Applications/AppClassification/app/otbSampleSelection.cxx
index b59bac6..11654d0 100644
--- a/Modules/Applications/AppClassification/app/otbSampleSelection.cxx
+++ b/Modules/Applications/AppClassification/app/otbSampleSelection.cxx
@@ -104,7 +104,7 @@ private:
" - layer : index specifying from which layer to pick geometries.\n"
" - field : set the field name containing the class.\n"
" - mask : an optional raster mask can be used to discard samples.\n"
- " - outrates : allows to output a CSV file that summarizes the sampling rates for each class.\n"
+ " - outrates : allows outputting a CSV file that summarizes the sampling rates for each class.\n"
"\nAs with the PolygonClassStatistics application, different types of geometry are supported : "
"polygons, lines, points. \nThe behavior of this application is different for each type of geometry :\n"
@@ -134,7 +134,7 @@ private:
SetParameterDescription("instats","Input file storing statistics (XML format)");
AddParameter(ParameterType_OutputFilename, "outrates", "Output rates");
- SetParameterDescription("outrates","Output rates (CSV formated)");
+ SetParameterDescription("outrates","Output rates (CSV formatted)");
MandatoryOff("outrates");
AddParameter(ParameterType_Choice, "sampler", "Sampler type");
diff --git a/Modules/Filtering/Statistics/include/otbPatternSampler.h b/Modules/Filtering/Statistics/include/otbPatternSampler.h
index f8e28ce..e341f1e 100644
--- a/Modules/Filtering/Statistics/include/otbPatternSampler.h
+++ b/Modules/Filtering/Statistics/include/otbPatternSampler.h
@@ -28,7 +28,7 @@ namespace otb
*
* \brief Periodic sampler for iteration loops
*
- * This class allows to do periodic sampling during an iteration loop.
+ * This class allows doing periodic sampling during an iteration loop.
*
* \ingroup OTBStatistics
*/
diff --git a/Modules/Filtering/Statistics/include/otbPeriodicSampler.h b/Modules/Filtering/Statistics/include/otbPeriodicSampler.h
index a7e0730..64b12e1 100644
--- a/Modules/Filtering/Statistics/include/otbPeriodicSampler.h
+++ b/Modules/Filtering/Statistics/include/otbPeriodicSampler.h
@@ -28,7 +28,7 @@ namespace otb
*
* \brief Periodic sampler for iteration loops
*
- * This class allows to do periodic sampling during an iteration loop.
+ * This class allows doing periodic sampling during an iteration loop.
*
* \ingroup OTBStatistics
*/
diff --git a/Modules/Filtering/Statistics/include/otbRandomSampler.h b/Modules/Filtering/Statistics/include/otbRandomSampler.h
index 205f791..e132c6b 100644
--- a/Modules/Filtering/Statistics/include/otbRandomSampler.h
+++ b/Modules/Filtering/Statistics/include/otbRandomSampler.h
@@ -28,7 +28,7 @@ namespace otb
*
* \brief Random sampler for iteration loops
*
- * This class allows to do random sampling during an iteration loop.
+ * This class allows doing random sampling during an iteration loop.
* It uses the MersenneTwisterRandomGenerator.
*
* \ingroup OTBStatistics
diff --git a/Modules/Filtering/Statistics/include/otbStreamingStatisticsVectorImageFilter.txx b/Modules/Filtering/Statistics/include/otbStreamingStatisticsVectorImageFilter.txx
index e76b876..c327cf3 100644
--- a/Modules/Filtering/Statistics/include/otbStreamingStatisticsVectorImageFilter.txx
+++ b/Modules/Filtering/Statistics/include/otbStreamingStatisticsVectorImageFilter.txx
@@ -563,7 +563,7 @@ PersistentStreamingStatisticsVectorImageFilter<TInputImage, TPrecision>
{
for (unsigned int c = 0; c < threadSecondOrder.Cols(); ++c)
{
- threadSecondOrder(r, c) += vectorValue[r] * vectorValue[c];
+ threadSecondOrder(r, c) += static_cast<PrecisionType>(vectorValue[r]) * static_cast<PrecisionType>(vectorValue[c]);
}
}
threadSecondOrderComponent += vectorValue.GetSquaredNorm();
diff --git a/Modules/Filtering/Wavelet/src/otbWaveletGenerator.cxx b/Modules/Filtering/Wavelet/src/otbWaveletGenerator.cxx
index a70046a..c2f4c74 100644
--- a/Modules/Filtering/Wavelet/src/otbWaveletGenerator.cxx
+++ b/Modules/Filtering/Wavelet/src/otbWaveletGenerator.cxx
@@ -36,7 +36,7 @@ WaveletGenerator<TMotherWaveletOperator>
{
std::ostringstream msg;
msg << "The mother wavelet ID " << TMotherWaveletOperator;
- msg << " is unkown or has to be implemented...\n";
+ msg << " is unknown or has to be implemented...\n";
throw itk::ExceptionObject(__FILE__, __LINE__, msg.str().c_str(), ITK_LOCATION);
return "Unknown";
@@ -49,7 +49,7 @@ WaveletGenerator<TMotherWaveletOperator>
{
std::ostringstream msg;
msg << "The mother wavelet ID " << TMotherWaveletOperator;
- msg << " is unkown or has to be implemented...\n";
+ msg << " is unknown or has to be implemented...\n";
throw itk::ExceptionObject(__FILE__, __LINE__, msg.str().c_str(), ITK_LOCATION);
}
@@ -60,7 +60,7 @@ WaveletGenerator<TMotherWaveletOperator>
{
std::ostringstream msg;
msg << "The mother wavelet ID " << TMotherWaveletOperator;
- msg << " is unkown or has to be implemented (check the txx file)...\n";
+ msg << " is unknown or has to be implemented (check the txx file)...\n";
throw itk::ExceptionObject(__FILE__, __LINE__, msg.str().c_str(), ITK_LOCATION);
}
diff --git a/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx b/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx
index 0d217c6..12e0f22 100644
--- a/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx
+++ b/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx
@@ -174,6 +174,16 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
// clean temporary inputs
this->m_InMemoryInputs.clear();
+ unsigned int numberOfThreads = this->GetNumberOfThreads();
+
+ unsigned int actualNumberOfThreads = numberOfThreads;
+
+ if(numberOfThreads > this->GetOutput()->GetRequestedRegion().GetSize()[1])
+ {
+ actualNumberOfThreads = this->GetOutput()->GetRequestedRegion().GetSize()[1];
+ }
+
+
// gather temporary outputs and write to output
const otb::ogr::DataSource* vectors = this->GetOGRData();
itk::TimeProbe chrono;
@@ -195,7 +205,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
itkExceptionMacro(<< "Unable to start transaction for OGR layer " << outLayer.ogr().GetName() << ".");
}
- for (unsigned int thread=0 ; thread < this->GetNumberOfThreads() ; thread++)
+ for (unsigned int thread=0 ; thread < actualNumberOfThreads ; thread++)
{
ogr::Layer inLayer = this->m_InMemoryOutputs[thread][count]->GetLayerChecked(0);
if (!inLayer)
@@ -247,7 +257,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
TInputImage* outputImage = this->GetOutput();
RegionType requestedRegion = outputImage->GetRequestedRegion();
- ogr::Layer layer = this->m_InMemoryInputs[threadid]->GetLayerChecked(0);
+ ogr::Layer layer = this->m_InMemoryInputs.at(threadid)->GetLayerChecked(0);
if (! layer)
{
return;
@@ -618,6 +628,13 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
unsigned int numberOfThreads = this->GetNumberOfThreads();
+ unsigned int actualNumberOfThreads = numberOfThreads;
+
+ if(numberOfThreads > this->GetOutput()->GetRequestedRegion().GetSize()[1])
+ {
+ actualNumberOfThreads = this->GetOutput()->GetRequestedRegion().GetSize()[1];
+ }
+
// prepare temporary input : split input features between available threads
this->m_InMemoryInputs.clear();
std::string tmpLayerName("thread");
@@ -628,7 +645,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
}
OGRFeatureDefn &layerDefn = inLayer.GetLayerDefn();
std::vector<ogr::Layer> tmpLayers;
- for (unsigned int i=0 ; i < numberOfThreads ; i++)
+ for (unsigned int i=0 ; i < actualNumberOfThreads ; i++)
{
ogr::DataSource::Pointer tmpOgrDS = ogr::DataSource::New();
ogr::Layer tmpLayer = tmpOgrDS->CreateLayer(
@@ -678,9 +695,17 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
{
// Prepare in-memory outputs
unsigned int numberOfThreads = this->GetNumberOfThreads();
+
+ unsigned int actualNumberOfThreads = numberOfThreads;
+
+ if(numberOfThreads > this->GetOutput()->GetRequestedRegion().GetSize()[1])
+ {
+ actualNumberOfThreads = this->GetOutput()->GetRequestedRegion().GetSize()[1];
+ }
+
this->m_InMemoryOutputs.clear();
std::string tmpLayerName("threadOut");
- for (unsigned int i=0 ; i < numberOfThreads ; i++)
+ for (unsigned int i=0 ; i < actualNumberOfThreads ; i++)
{
std::vector<OGRDataPointer> tmpContainer;
// iterate over outputs, only process ogr::DataSource
diff --git a/Modules/MPI/MPITiffWriter/include/otbSimpleParallelTiffWriter.txx b/Modules/MPI/MPITiffWriter/include/otbSimpleParallelTiffWriter.txx
index 16b6e21..b9bd8dd 100644
--- a/Modules/MPI/MPITiffWriter/include/otbSimpleParallelTiffWriter.txx
+++ b/Modules/MPI/MPITiffWriter/include/otbSimpleParallelTiffWriter.txx
@@ -770,7 +770,7 @@ SimpleParallelTiffWriter<TInputImage>
this->ReleaseInputs();
//Reset global shift on input region (box parameter)
- //It allows to call multiple update over the writer
+ //It allows calling multiple updates over the writer
m_ShiftOutputIndex.Fill(0);
// Wait for other processes
diff --git a/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.txx b/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.txx
index a704709..3ae5c73 100644
--- a/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.txx
+++ b/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.txx
@@ -241,7 +241,7 @@ OGRDataSourceToLabelImageFilter<TOutputImage>::GenerateData()
{
std::vector<std::string> options;
- std::vector<double> foreground(nbBands,m_ForegroundValue);
+ std::vector<double> foreground(nbBands*m_SrcDataSetLayers.size(),m_ForegroundValue);
if(m_BurnAttributeMode)
{
diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp
index d7593c3..7c56839 100644
--- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp
+++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1Model.cpp
@@ -951,7 +951,7 @@ namespace ossimplugins
addMandatory(theProductKwl, prefix, keyImPtX, **itNode, attPixel);
// In TOPSAR products, GCPs are weird (they fall in black lines
- // between burst. This code allows to move them to a valid area of
+ // between burst. This code allows moving them to a valid area of
// the image.
if(theBurstRecords.size()>2)
{
diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1SarSensorModel.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1SarSensorModel.cpp
index 141c813..c54d59f 100644
--- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1SarSensorModel.cpp
+++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimSentinel1SarSensorModel.cpp
@@ -249,7 +249,7 @@ void ossimSentinel1SarSensorModel::readAnnotationFile(const std::string & annota
gcpRecord.imPt.x = getDoubleFromFirstNode(**itNode, attPixel);
// In TOPSAR products, GCPs are weird (they fall in black lines
- // between burst. This code allows to move them to a valid area of
+ // between burst. This code allows moving them to a valid area of
// the image.
if(theBurstRecords.size()>2)
{
diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimStringUtilities.h b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimStringUtilities.h
index 1ce2e8c..457489b 100644
--- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimStringUtilities.h
+++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimStringUtilities.h
@@ -556,6 +556,8 @@ namespace details {
*
* \return The string as an integer.
* \throw std::runtime_error is the number cannot be converted.
+ * \todo Use a failure_policy in order to factorize code flavour (returns
+ * default value or throw an exception)
*/
template <typename Int> inline Int to_integer(string_view const& v, string_view const& context)
{
@@ -568,7 +570,6 @@ namespace details {
bool is_negative = false;
Int res = 0;
if (it != end) {
- // TODO: reject '-' with unsigned types
switch (*it) {
case '-': is_negative = true; /*[[fallthrough]]*/
case '+': ++it;
@@ -609,7 +610,6 @@ namespace details {
bool is_negative = false;
Int res = 0;
if (it != end) {
- // TODO: reject '-' with unsigned types
switch (*it) {
case '-': is_negative = true; /*[[fallthrough]]*/
case '+': ++it;
@@ -626,6 +626,74 @@ namespace details {
}
/**
+ * \brief Internal generic string to unsigned integer conversion (w/ exception).
+ * Tries to convert the input string into a integer type. If the
+ * string doesn't represent an integer value, an exception is thrown.
+ * \tparam Int Integral type (In a perfect world, we'd used `enable_if` &
+ * co to restrict the code to integral types)
+ * \param[in] v input string
+ * \param[in] context context message for the exception thrown
+ *
+ * \return The string as an integer.
+ * \throw std::runtime_error is the number cannot be converted.
+ */
+ template <typename Int> inline Int to_uinteger(string_view const& v, string_view const& context)
+ {
+ // string_view::data() isn't compatible with strtol => we emulate it
+
+ // TODO: handle HEX, OCT, BIN, locales?
+ string_view::const_iterator it = v.begin();
+ string_view::const_iterator end = v.end();
+
+ Int res = 0;
+ if (it != end) {
+ for ( ; it != end ; ++it) {
+ // only support arabic digits
+ if (!std::isdigit(*it)) {
+ throw std::runtime_error("Cannot decode "+v+" as integer while " + context);
+ }
+ res = 10 * res + *it - '0';
+ }
+ }
+ return res;
+ }
+
+ /**
+ * \brief Internal generic string to unsigned integer conversion (w/o exception).
+ * Tries to convert the input string into a integer type. If the
+ * string doesn't represent an integer value, the default value will be
+ * returned.
+ * \tparam Int Integral type (In a perfect world, we'd used `enable_if` &
+ * co to restrict the code to integral types)
+ * \param[in] v input string
+ * \param[in] def default value returned in the conversion isn't possible
+ *
+ * \return The string as an integer.
+ * \return `def` if the string cannot be converted to an integer value.
+ * \throw None
+ */
+ template <typename Int> inline Int to_uinteger(string_view const& v, Int const def)
+ {
+ // string_view::data() isn't compatible with strtol => we emulate it
+
+ // TODO: handle HEX, OCT, BIN, locales?
+ string_view::const_iterator it = v.begin();
+ string_view::const_iterator end = v.end();
+
+ Int res = 0;
+ if (it != end) {
+ for ( ; it != end ; ++it) {
+ // only support arabic digits
+ if (!std::isdigit(*it)) {
+ return def;
+ }
+ res = 10 * res + *it - '0';
+ }
+ }
+ return res;
+ }
+
+ /**
* \brief Internal generic string to float conversion (w/ exception).
* Tries to convert the input string into a floating point type. If the
* string doesn't represent a floating point value, an exception is thrown.
@@ -704,13 +772,22 @@ namespace details {
// Note: specialization doesn't support default arguments, but default argument
// T() will still work.
-OSSIM_GENERATE_CONV(to_integer, char);
-OSSIM_GENERATE_CONV(to_integer, short);
-OSSIM_GENERATE_CONV(to_integer, int);
-OSSIM_GENERATE_CONV(to_integer, unsigned int);
-OSSIM_GENERATE_CONV(to_integer, long);
-OSSIM_GENERATE_CONV(to_float, ossim_float32);
-OSSIM_GENERATE_CONV(to_float, ossim_float64);
+OSSIM_GENERATE_CONV(to_integer, char);
+OSSIM_GENERATE_CONV(to_uinteger, unsigned char);
+OSSIM_GENERATE_CONV(to_integer, signed char);
+OSSIM_GENERATE_CONV(to_uinteger, unsigned short);
+OSSIM_GENERATE_CONV(to_integer, short);
+OSSIM_GENERATE_CONV(to_integer, int);
+OSSIM_GENERATE_CONV(to_uinteger, unsigned int);
+OSSIM_GENERATE_CONV(to_integer, long);
+OSSIM_GENERATE_CONV(to_uinteger, unsigned long);
+#if defined(HAS_LONG_LONG) // TODO: add this configure option
+OSSIM_GENERATE_CONV(to_integer, long long);
+OSSIM_GENERATE_CONV(to_uinteger, unsigned long long);
+#endif
+OSSIM_GENERATE_CONV(to_float, float);
+OSSIM_GENERATE_CONV(to_float, double);
+OSSIM_GENERATE_CONV(to_float, long double);
#undef OSSIM_GENERATE_CONV
template <> inline std::string to<std::string>(string_view const& v, string_view const& /*context*/)
diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTimeUtilities.cpp b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTimeUtilities.cpp
index 9ce069c..3d28ae5 100644
--- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTimeUtilities.cpp
+++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTimeUtilities.cpp
@@ -111,28 +111,28 @@ std::string ossimplugins::time::to_simple_string(ModifiedJulianDate const& d)
assert(s < 1000); // should be more than enough
typedef unsigned long ulong;
const double frac_sec = date.getFractionalSecond();
- // const double fs2 = fmod(d.as_day_frac() * 24L*60*60, 1);
+ // const double fs2 = fmod(d.as_day_frac() * 24ULL*60*60, 1);
// assert(fs2==frac_sec);
// std::cout << "From: " << d.as_day_frac() << " -> frac_sec: " << fs2
- // << " --> *10^6: " << fs2*1000L*1000
- // << " --> %10^6: " << ulong(fs2*1000L*1000)%(1000L*1000)
+ // << " --> *10^6: " << fs2*1000ULL*1000
+ // << " --> %10^6: " << ulong(fs2*1000ULL*1000)%(1000ULL*1000)
// << "\n";
s += s_printf(&buffer[s], sizeof(buffer)-s, ".%06ld",
- ulong(frac_sec * 1000L * 1000) % (1000L*1000));
+ ulong(frac_sec * 1000ULL * 1000) % (1000ULL*1000));
return std::string(buffer, s);
}
std::string ossimplugins::time::to_simple_string(Duration const& d)
{
typedef unsigned long ulong;
- const double fs = d.as_day_frac() * 24L * 60 * 60; // in seconds
- const ulong ls(fs);
- const ulong us = ulong(fs * 1000*1000) % (1000*1000);
+ const double fs = d.as_day_frac() * 24 * 60 * 60; // in seconds
+ const ulong ls = std::abs(fs);
+ const ulong us = ulong(std::abs(fs * 1000ULL*1000)) % (1000ULL*1000);
const ulong s = ls % 60;
const ulong m = (ls/60) % 60;
const ulong h = (ls/60/60);
char buffer[1024];
- const std::size_t N = s_printf(buffer, "%02d:%02d:%02d.%06ld", h, m, s, us);
+ const std::size_t N = s_printf(buffer, "%s%02d:%02d:%02d.%06ld", fs < 0 ? "-" : "", h, m, s, us);
assert(N);
return std::string(buffer, N);
diff --git a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTimeUtilities.h b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTimeUtilities.h
index a0e7852..715ed3a 100644
--- a/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTimeUtilities.h
+++ b/Modules/ThirdParty/OssimPlugins/src/ossim/ossimTimeUtilities.h
@@ -175,10 +175,10 @@ namespace ossimplugins { namespace time {
OSSIM_PLUGINS_DLL ModifiedJulianDate toModifiedJulianDate(string_view const& utcTimeString);
inline Duration microseconds(double us) {
- return Duration(us / (24L * 60 * 60 * 1000 * 1000));
+ return Duration(us / (24ULL * 60 * 60 * 1000 * 1000));
}
inline Duration seconds(double us) {
- return Duration(us / (24L * 60 * 60));
+ return Duration(us / (24ULL * 60 * 60));
}
OSSIM_PLUGINS_DLL std::string to_simple_string(ModifiedJulianDate const& d);
OSSIM_PLUGINS_DLL std::string to_simple_string(Duration const& d);
diff --git a/Modules/ThirdParty/OssimPlugins/test/ossimStringUtilitiesTest.cpp b/Modules/ThirdParty/OssimPlugins/test/ossimStringUtilitiesTest.cpp
index 337d4a5..bfd02e4 100644
--- a/Modules/ThirdParty/OssimPlugins/test/ossimStringUtilitiesTest.cpp
+++ b/Modules/ThirdParty/OssimPlugins/test/ossimStringUtilitiesTest.cpp
@@ -202,7 +202,8 @@ BOOST_AUTO_TEST_CASE(to_int) {
BOOST_CHECK_THROW(to<int>("0x12", "UT"), std::runtime_error);
BOOST_CHECK_EQUAL(to<unsigned int>("12", "UT"), 12u);
- BOOST_CHECK_EQUAL(to<unsigned int>("-1", "UT"), UINT_MAX);
+ BOOST_CHECK_EQUAL(to<int>("-1", "UT"), -1);
+ BOOST_CHECK_THROW(to<unsigned int>("-1", "UT"), std::runtime_error);
}
BOOST_AUTO_TEST_CASE(to_double) {
BOOST_CHECK_CLOSE(to<double>("12", "UT"), 12, 0.00001);
diff --git a/Modules/ThirdParty/SPTW/src/sptw.cc b/Modules/ThirdParty/SPTW/src/sptw.cc
index 61d54d6..09c1723 100644
--- a/Modules/ThirdParty/SPTW/src/sptw.cc
+++ b/Modules/ThirdParty/SPTW/src/sptw.cc
@@ -26,6 +26,7 @@
#include <algorithm>
#include <sstream>
+#include <iostream>
#include <vector>
#include "sptw.h"
diff --git a/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx b/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx
index 78dcb4c..05d439d 100644
--- a/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx
+++ b/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx
@@ -245,9 +245,10 @@ std::string CleanWord(const std::string & word)
// Suppress whitespace characters at the beginning and ending of the string
std::string::size_type cleanStart = word.find_first_not_of(" \t");
std::string::size_type cleanEnd = word.find_last_not_of(" \t\f\v\n\r");
+ // cleanStart == npos implies cleanEnd == npos
if (cleanEnd != std::string::npos)
{
- res = word.substr(cleanStart,cleanEnd+1);
+ res = word.substr(cleanStart, cleanEnd - cleanStart + 1);
}
return res;
}
@@ -265,7 +266,7 @@ int main(int argc, char* argv[])
}
std::vector<std::string> vexp;
-
+
std::string exp;
if (strcmp(argv[1], "-inxml") == 0)
{
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index ec9c383..1924ef3 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,3 +1,12 @@
+OTB-v.5.6.1 - Changes since version 5.6.0 (August 26th, 2016)
+------------------------------------------------------------
+
+* Bugfixes :
+ * 0001262: OTB 5.7 vector sampler bug
+ * 0001259: Patch for various spelling errors in 5.6.0
+ * 0001258: Patch to only use OTB_GIT_STATUS_MESSAGE in message function if set.
+ * 0001266: Fix covariance computation with high float values
+
OTB-v.5.6.0 - Changes since version 5.4.0 (July 28th, 2016)
------------------------------------------------------------
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/otb.git
More information about the Pkg-grass-devel
mailing list