From 6a4df3f79e457f25c0fde566cf83633784392c0c Mon Sep 17 00:00:00 2001
From: Cyrille Valladeau <cyrille.valladeau@c-s.fr>
Date: Mon, 27 Apr 2009 09:42:19 +0200
Subject: [PATCH] ENH : orthodem test

---
 Code/IO/otbDEMToOrthoImageGenerator.txx             |  3 ++-
 Testing/Code/IO/CMakeLists.txt                      | 10 +++++-----
 Testing/Code/IO/otbDEMToOrthoImageGeneratorTest.cxx |  3 ++-
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Code/IO/otbDEMToOrthoImageGenerator.txx b/Code/IO/otbDEMToOrthoImageGenerator.txx
index 292ff95b0c..24302d040d 100644
--- a/Code/IO/otbDEMToOrthoImageGenerator.txx
+++ b/Code/IO/otbDEMToOrthoImageGenerator.txx
@@ -79,7 +79,8 @@ DEMToOrthoImageGenerator<TDEMImage, TMapProjection>
 
   if (!m_MapProjection)
   {
-    itkExceptionMacro( << "Please set map projection!" );
+    itkExceptionMacro( <<
+                       "Please set map projection!" );
   }
 
   DEMImagePointerType  DEMImage = this->GetOutput();
diff --git a/Testing/Code/IO/CMakeLists.txt b/Testing/Code/IO/CMakeLists.txt
index 971c3115b4..dfab0038d9 100755
--- a/Testing/Code/IO/CMakeLists.txt
+++ b/Testing/Code/IO/CMakeLists.txt
@@ -1739,13 +1739,13 @@ ADD_TEST(ioTvDEMToOrthoImageGeneratorTest ${IO_TESTS17}
         otbDEMToOrthoImageGeneratorTest
          ${INPUTDATA}/DEM/srtm_directory
          ${TEMP}/ioTvDEMToOrthoImageGenerator.tif
-         6.5
-         44.5
+         773441 #6.5
+         5044457 #44.5
          500
          500
-         0.002
-         0.002
-	 31 # utm zone
+         200 #0.002
+         -200 #0.002
+	 48 #31 # utm zone
          N # hemisphere
 )
 
diff --git a/Testing/Code/IO/otbDEMToOrthoImageGeneratorTest.cxx b/Testing/Code/IO/otbDEMToOrthoImageGeneratorTest.cxx
index 3cba24c17f..0822d22317 100644
--- a/Testing/Code/IO/otbDEMToOrthoImageGeneratorTest.cxx
+++ b/Testing/Code/IO/otbDEMToOrthoImageGeneratorTest.cxx
@@ -26,7 +26,7 @@ int otbDEMToOrthoImageGeneratorTest(int argc, char * argv[])
 {
   if (argc<9)
   {
-    std::cout << argv[0] <<" folder path , output filename , Longitude Output Orign point , Latitude Output Origin point , X Output Size, Y Output size , X Spacing , Y Spacing"  << std::endl;
+    std::cout << argv[0] <<" DEM folder path , output filename , Easting Output Orign point , Northing Output Origin point , X Output Size, Y Output size , X Spacing , Y Spacing"  << std::endl;
     return EXIT_FAILURE;
   }
 
@@ -59,6 +59,7 @@ int otbDEMToOrthoImageGeneratorTest(int argc, char * argv[])
   SpacingType spacing;
   spacing[0] = ::atof(argv[7]);
   spacing[1] = ::atof(argv[8]);
+  std::cout<<atoi(argv[9])<<std::endl;
 
   mapProj->SetZone(::atoi(argv[9]));
   mapProj->SetHemisphere(argv[10][0]);
-- 
GitLab