Commit 18306535 authored by ctraizet's avatar ctraizet
Browse files

ENH: added a warning if there is a no data value

No related merge requests found
Showing with 12 additions and 0 deletions
+12 -0
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
//Utils //Utils
#include "itksys/SystemTools.hxx" #include "itksys/SystemTools.hxx"
#include "otbNoDataHelper.h"
namespace otb namespace otb
{ {
...@@ -467,6 +468,17 @@ private: ...@@ -467,6 +468,17 @@ private:
std::string projRef = GetParameterFloatVectorImage("in")->GetProjectionRef(); std::string projRef = GetParameterFloatVectorImage("in")->GetProjectionRef();
std::vector<bool> noDataFlags;
std::vector<double> noDataValues;
itk::MetaDataDictionary &dict = GetParameterFloatVectorImage("in")->GetMetaDataDictionary();
bool ret = otb::ReadNoDataFlags(dict,noDataFlags,noDataValues);
if (ret)
{
otbAppLogWARNING("The input image has no data values but this application does not handle no-data. No-data pixels"
" will be treated as regular pixels.");
}
OGRSpatialReference oSRS(projRef.c_str()); OGRSpatialReference oSRS(projRef.c_str());
if (segModeType == "vector") if (segModeType == "vector")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment