From d8b542005d5f354d81a1c4fcd8c99535ccc1f3cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr>
Date: Wed, 24 Apr 2019 16:57:11 +0200
Subject: [PATCH] ENH: allow real label types in TrainVectorBase for regression

---
 .../AppClassification/include/otbTrainVectorBase.hxx            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/Applications/AppClassification/include/otbTrainVectorBase.hxx b/Modules/Applications/AppClassification/include/otbTrainVectorBase.hxx
index 1ca5375528..8de3e03623 100644
--- a/Modules/Applications/AppClassification/include/otbTrainVectorBase.hxx
+++ b/Modules/Applications/AppClassification/include/otbTrainVectorBase.hxx
@@ -142,7 +142,7 @@ TrainVectorBase<TInputValue, TOutputValue>
         std::string tmpKey = "feat." + key.substr( 0, static_cast<unsigned long>( end - key.begin() ) );
         this->AddChoice( tmpKey, item );
         }
-      if( fieldType == OFTString || fieldType == OFTInteger || fieldType == OFTInteger64 )
+      if( fieldType == OFTString || fieldType == OFTInteger || fieldType == OFTInteger64 || fieldType == OFTReal )
         {
         std::string tmpKey = "cfield." + key.substr( 0, static_cast<unsigned long>( end - key.begin() ) );
         this->AddChoice( tmpKey, item );
-- 
GitLab