diff --git a/app/cbDimensionalityReductionTrainer.cxx b/app/cbDimensionalityReductionTrainer.cxx
index e83231428d04542a54966e5ae4a3aee0bb78ebd1..aee6fb3ed966fb657980b5063ef4b35efdaa5e4e 100644
--- a/app/cbDimensionalityReductionTrainer.cxx
+++ b/app/cbDimensionalityReductionTrainer.cxx
@@ -60,7 +60,8 @@ private:
 
 		AddParameter(ParameterType_OutputFilename, "io.out", "Output model");
 		SetParameterDescription("io.out", "Output file containing the model estimated (.txt format).");
-
+		
+	
 		AddParameter(ParameterType_InputFilename, "io.stats", "Input XML image statistics file");
 		MandatoryOff("io.stats");
 		SetParameterDescription("io.stats", "XML file containing mean and variance of each feature.");
diff --git a/app/cbDimensionalityReductionVector.cxx b/app/cbDimensionalityReductionVector.cxx
index 485f248b64e04fffb177ee5bf92a8faf7b9b299f..dbfd87d39af701a0010bea61b7c322175bd2b5ec 100644
--- a/app/cbDimensionalityReductionVector.cxx
+++ b/app/cbDimensionalityReductionVector.cxx
@@ -116,6 +116,11 @@ class CbDimensionalityReductionVector : public Application
 		SetParameterDescription("pcadim","This optional parameter can be set to reduce the number of eignevectors used in the PCA model file."); //
 		MandatoryOff("pcadim");
 		
+		AddParameter(ParameterType_String, "mode", "Writting mode"); //
+		SetParameterString("mode","overwrite", false);
+		SetParameterDescription("mode","This parameter determines if the output file is overwritten or updated [overwrite/update]"); //
+
+		
 		// Doc example parameter settings
 		SetDocExampleParameterValue("in", "vectorData.shp");
 		SetDocExampleParameterValue("instat", "meanVar.xml");
@@ -262,7 +267,19 @@ class CbDimensionalityReductionVector : public Application
 			if (IsParameterEnabled("out") && HasValue("out"))
 			{
 				// Create new OGRDataSource
-				output = ogr::DataSource::New(GetParameterString("out"), ogr::DataSource::Modes::Overwrite);
+				if (GetParameterString("mode")=="overwrite")
+				{
+					output = ogr::DataSource::New(GetParameterString("out"), ogr::DataSource::Modes::Overwrite);
+				}
+				else if (GetParameterString("mode")=="update")
+				{
+					output = ogr::DataSource::New(GetParameterString("out"), ogr::DataSource::Modes::Update_LayerCreateOnly );
+				}
+				else
+				{
+					otbAppLogFATAL(<< "Error when creating the output file" << GetParameterString("mode") << " : unsupported writting mode type [update/overwrite]");
+				}
+				
 				otb::ogr::Layer newLayer = output->CreateLayer(GetParameterString("out"),
 				 const_cast<OGRSpatialReference*>(layer.GetSpatialRef()),
 				 layer.GetGeomType());
diff --git a/include/cbLearningApplicationBaseDR.h b/include/cbLearningApplicationBaseDR.h
index 9d0a6c69087397333ba31ce0eaa18fe774ce1294..94c62d1b433a06fa6189742868b75e2e5f62d073 100644
--- a/include/cbLearningApplicationBaseDR.h
+++ b/include/cbLearningApplicationBaseDR.h
@@ -87,16 +87,16 @@ public:
 	  
 	// Dimensionality reduction models
 
-	typedef SOMMap<itk::VariableLengthVector<TInputValue>,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 2> Map2DType;
+	typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 2> Map2DType;
 	typedef otb::SOMModel<InputValueType, 2> SOM2DModelType;
 	
-	typedef SOMMap<itk::VariableLengthVector<TInputValue>,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 3> Map3DType;
+	typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 3> Map3DType;
 	typedef otb::SOMModel<InputValueType, 3> SOM3DModelType;
 	
-	typedef SOMMap<itk::VariableLengthVector<TInputValue>,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 4> Map4DType;
+	typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 4> Map4DType;
 	typedef otb::SOMModel<InputValueType, 4> SOM4DModelType;
 	
-	typedef SOMMap<itk::VariableLengthVector<TInputValue>,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 5> Map5DType;
+	typedef SOMMap<TInputValue,itk::Statistics::EuclideanDistanceMetric<itk::VariableLengthVector<TInputValue>>, 5> Map5DType;
 	typedef otb::SOMModel<InputValueType, 5> SOM5DModelType;
 	
 
diff --git a/include/cbLearningApplicationBaseDR.txx b/include/cbLearningApplicationBaseDR.txx
index a42ad73857db4152dc57429d2fed3605fd050354..6e1635e24db59edaff241405174f1e54ce5f5143 100644
--- a/include/cbLearningApplicationBaseDR.txx
+++ b/include/cbLearningApplicationBaseDR.txx
@@ -45,7 +45,7 @@ cbLearningApplicationBaseDR<TInputValue,TOutputValue>
   AddDocTag(Tags::Learning);
 
   // main choice parameter that will contain all dimensionality reduction options
-  AddParameter(ParameterType_Choice, "model", "moddel to use for the training");
+  AddParameter(ParameterType_Choice, "model", "model to use for the training");
   SetParameterDescription("model", "Choice of the dimensionality reduction model to use for the training.");
   
 
@@ -83,28 +83,28 @@ cbLearningApplicationBaseDR<TInputValue,TOutputValue>
  
  if(modelName == "autoencoder")
     {
-    #ifdef OTB_USE_SHARK
-    BeforeTrainAutoencoder(trainingListSample,modelPath);
-    #else
-    otbAppLogFATAL("Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
-    #endif
+		#ifdef OTB_USE_SHARK
+		BeforeTrainAutoencoder(trainingListSample,modelPath);
+		#else
+		otbAppLogFATAL("Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
+		#endif
     }
   if(modelName == "tiedautoencoder")
     {
-    #ifdef OTB_USE_SHARK
-    TrainAutoencoder<TiedAutoencoderModelType>(trainingListSample,modelPath);
-    #else
-    otbAppLogFATAL("Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
-    #endif
+		#ifdef OTB_USE_SHARK
+		TrainAutoencoder<TiedAutoencoderModelType>(trainingListSample,modelPath);
+		#else
+		otbAppLogFATAL("Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
+		#endif
     }
     
   if(modelName == "pca")
     {
-    #ifdef OTB_USE_SHARK
-    TrainPCA(trainingListSample,modelPath);
-    #else
-    otbAppLogFATAL("Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
-    #endif
+		#ifdef OTB_USE_SHARK
+		TrainPCA(trainingListSample,modelPath);
+		#else
+		otbAppLogFATAL("Module SharkLearning is not installed. You should consider turning OTB_USE_SHARK on during cmake configuration.");
+		#endif
     }
 }