From 1293dfdd8f97f9e0d80d7d62c9cb59367c96b850 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ga=C3=ABlle=20USSEGLIO?= <gaelle.usseglio@cnes.fr>
Date: Wed, 22 May 2019 11:50:21 +0000
Subject: [PATCH] BUG: New marge for SARDEMPolygonsAnalysis Filter

---
 include/otbSARDEMPolygonsAnalysisImageFilter.txx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/otbSARDEMPolygonsAnalysisImageFilter.txx b/include/otbSARDEMPolygonsAnalysisImageFilter.txx
index 3889972..a219030 100644
--- a/include/otbSARDEMPolygonsAnalysisImageFilter.txx
+++ b/include/otbSARDEMPolygonsAnalysisImageFilter.txx
@@ -181,7 +181,7 @@ namespace otb
     int nbLinesDEM = m_DemImagePtr->GetLargestPossibleRegion().GetSize()[1];
     if (nbLinesSAR > nbLinesDEM)
       { 
-	m_Margin = (nbLinesSAR/nbLinesDEM)*5;
+	m_Margin = (nbLinesSAR/nbLinesDEM)*10;
       }
     else
       {
@@ -1102,6 +1102,7 @@ namespace otb
 		while (!InIt_UR.IsAtEndOfLine() && !InIt_LR.IsAtEndOfLine())
 		  {
 		    UL_line = InIt_UL.Get()[1];
+
 		    // Protect Memory access and input access
 		    if (UL_line > ind_Line_Into_SARGeo - m_Margin && UL_line < ind_Line_Into_SARGeo + m_Margin)
 		      { 	 
@@ -1109,7 +1110,7 @@ namespace otb
 			UR_col = InIt_UR.Get()[0];
 			LR_col = InIt_LR.Get()[0];
 			LL_col = InIt_LL.Get()[0];
-
+		
 			// Check if No Data		    
 			if (!(UL_col == m_NoData || UR_col == m_NoData || LR_col == m_NoData 
 			      || LL_col == m_NoData))
-- 
GitLab