From 596a62bff9f161c150863581e5c6c76f7e90e6fc Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Sat, 16 Apr 2011 23:30:51 -0700 Subject: [PATCH] ENH: otb::MapProjection marked as deprecated, example of migration in the tutorial --- Code/Projections/otbMapProjection.h | 5 ++++- Examples/Tutorials/OrthoFusion.cxx | 16 ++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Code/Projections/otbMapProjection.h b/Code/Projections/otbMapProjection.h index a77155041a..2f7abc5a56 100644 --- a/Code/Projections/otbMapProjection.h +++ b/Code/Projections/otbMapProjection.h @@ -18,6 +18,9 @@ #ifndef __otbMapProjection_h #define __otbMapProjection_h +//Use GenericMapProjection instead +#include "vcl_deprecated_header.h" + #include <iostream> #include <sstream> #include <stdio.h> @@ -35,7 +38,7 @@ namespace otb { /** \class MapProjection - * \brief This is the base class for all geographic projections (UTM, Lambert, ...) + * \brief <b>DEPRECATED</b> (use GenericMapProjection instead): This is the base class for all geographic projections (UTM, Lambert, ...) * * The forward transformation will transform the coordinate for the geographic to the * cartographic. The inverse model will transform from the cartographic to the geographic. diff --git a/Examples/Tutorials/OrthoFusion.cxx b/Examples/Tutorials/OrthoFusion.cxx index e7e6e630df..47fd4cdb03 100644 --- a/Examples/Tutorials/OrthoFusion.cxx +++ b/Examples/Tutorials/OrthoFusion.cxx @@ -36,7 +36,7 @@ #include "otbStreamingImageFileWriter.h" #include "otbOrthoRectificationFilter.h" -#include "otbMapProjections.h" +#include "otbGenericMapProjection.h" #include "otbSimpleRcsPanSharpeningFusionImageFilter.h" #include "otbStandardFilterWatcher.h" @@ -115,11 +115,11 @@ int main(int argc, char* argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - typedef otb::UtmInverseProjection utmMapProjectionType; - utmMapProjectionType::Pointer utmMapProjection = - utmMapProjectionType::New(); - utmMapProjection->SetZone(atoi(argv[4])); - utmMapProjection->SetHemisphere(*(argv[5])); + typedef otb::GenericMapProjection<otb::TransformDirection::INVERSE> InverseProjectionType; + InverseProjectionType::Pointer utmMapProjection = InverseProjectionType::New(); + utmMapProjection->SetWkt("Utm"); + utmMapProjection->SetParameter("Zone", argv[4]); + utmMapProjection->SetParameter("Hemisphere", argv[5]); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex @@ -156,7 +156,7 @@ int main(int argc, char* argv[]) // Software Guide : BeginCodeSnippet typedef otb::OrthoRectificationFilter<ImageType, DoubleImageType, - utmMapProjectionType> + InverseProjectionType> OrthoRectifFilterType; OrthoRectifFilterType::Pointer orthoRectifPAN = @@ -179,7 +179,7 @@ int main(int argc, char* argv[]) // Software Guide : BeginCodeSnippet typedef otb::OrthoRectificationFilter<VectorImageType, - DoubleVectorImageType, utmMapProjectionType> + DoubleVectorImageType, InverseProjectionType> VectorOrthoRectifFilterType; -- GitLab