From a8d187796ba5e9a193f49688323e063546954db1 Mon Sep 17 00:00:00 2001
From: Antoine Regimbeau <antoine.regimbeau@c-s.fr>
Date: Thu, 2 Nov 2017 12:18:12 +0100
Subject: [PATCH] BUG : do not set signed spacing then direction or be careful
 as the direction must be signed

---
 .../VectorDataRendering/include/otbVectorDataToMapFilter.txx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Modules/Filtering/VectorDataRendering/include/otbVectorDataToMapFilter.txx b/Modules/Filtering/VectorDataRendering/include/otbVectorDataToMapFilter.txx
index 116f309a90..24e660e535 100644
--- a/Modules/Filtering/VectorDataRendering/include/otbVectorDataToMapFilter.txx
+++ b/Modules/Filtering/VectorDataRendering/include/otbVectorDataToMapFilter.txx
@@ -184,7 +184,10 @@ VectorDataToMapFilter<TVectorData, TImage>
   // Set spacing and origin
   outputPtr->SetSignedSpacing(m_Spacing);
   outputPtr->SetOrigin(m_Origin);
-  outputPtr->SetDirection(m_Direction);
+  // outputPtr->SetDirection(m_Direction);
+  // As the direction cannot be changed in this filter there is no need to set
+  // the direction in the output image. Moreover, setting the direction to
+  // identity no that we enforce positive spacing leads to incoherences 
 
   itk::MetaDataDictionary& dict = outputPtr->GetMetaDataDictionary();
   itk::EncapsulateMetaData<std::string> (dict, MetaDataKey::ProjectionRefKey,
-- 
GitLab