diff --git a/Code/Projections/otbLambert3CartoSudProjection.h b/Code/Projections/otbLambert3CartoSudProjection.h new file mode 100644 index 0000000000000000000000000000000000000000..849d5db3363330fcfa5daac99f7569fad1b49316 --- /dev/null +++ b/Code/Projections/otbLambert3CartoSudProjection.h @@ -0,0 +1,69 @@ +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. +See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE, See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbLambert3CartoSudProjection_h +#define __otbLambert3CartoSudProjection_h + + +#include "projection/ossimMapProjection.h" +#include "projection/ossimLambertConformalConicProjection.h" +#include "otbMapProjection.h" + +namespace otb +{ +/** \class Lambert3CartoSudProjection +* \brief This class implements the Lambert3CartoSud map projection (RGF93 french geodesic system). +* It converts coordinates in longitude,latitude (WGS84) to Lambert 3 map coordinates. +* + */ +template <InverseOrForwardTransformationEnum transform> +class ITK_EXPORT Lambert3CartoSudProjection : public LambertConformalConicMapProjection<transform> +{ +public : + /** Standard class typedefs. */ + typedef Lambert3CartoSudProjection Self; + typedef LambertConformalConicMapProjection<transform> Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + typedef typename Superclass::ScalarType ScalarType; + typedef itk::Point<ScalarType,2 > InputPointType; + typedef itk::Point<ScalarType,2 > OutputPointType; + + /** Method for creation through the object factory. */ + itkNewMacro( Self ); + + /** Run-time type information (and related methods). */ + itkTypeMacro( Lambert3CartoSudProjection, LambertConformalConicMapProjection); + + +protected: + Lambert3CartoSudProjection(); + virtual ~Lambert3CartoSudProjection(); + +private : + Lambert3CartoSudProjection(const Self&); //purposely not implemented + void operator=(const Self&); //purposely not implemented +}; + +} // namespace otb + +#ifndef OTB_MANUAL_INSTANTIATION +#include "otbLambert3CartoSudProjection.txx" +#endif + +#endif diff --git a/Code/Projections/otbLambert3CartoSudProjection.txx b/Code/Projections/otbLambert3CartoSudProjection.txx new file mode 100644 index 0000000000000000000000000000000000000000..a1b237646e01732ceb593eaad7c1872ff27c93c9 --- /dev/null +++ b/Code/Projections/otbLambert3CartoSudProjection.txx @@ -0,0 +1,59 @@ +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. +See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE, See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef __otbLambert3CartoSudProjection_txx +#define __otbLambert3CartoSudProjection_txx + +#include "otbLambert3CartoSudProjection.h" + +namespace otb +{ + +template <InverseOrForwardTransformationEnum transform> +Lambert3CartoSudProjection<transform> +::Lambert3CartoSudProjection() +{ + itk::Point<double,2> origin; + origin[0]=3; + origin[1]=46.5; + std::string datum = "WE"; //WGS84 datum + + + double parall1=43.1992913888888888888888888889; + double parall2=44.9960938888888888888888888888; + double falseEasting=600000; + double falseNorthing=3200000; + std::string ellipsoid = "CE"; + + //TODO: 29-02-2008 Emmanuel: when ossim version > 1.7.2 only + // SetOrigin required (remove SetEllipsoid) + this->SetOrigin(origin, datum); + this->SetEllipsoid(ellipsoid); + this->SetParameters(parall1, parall2, falseEasting, falseNorthing); +} + +template <InverseOrForwardTransformationEnum transform> +Lambert3CartoSudProjection<transform> +::~Lambert3CartoSudProjection() +{ +} + + +} // namespace otb + +#endif diff --git a/Code/Projections/otbMapProjections.h b/Code/Projections/otbMapProjections.h index 8875a37bdaa821709381de7bf9601753e6700ad9..2b7ab59bccd134a643085ddeba8a8f408d927860 100644 --- a/Code/Projections/otbMapProjections.h +++ b/Code/Projections/otbMapProjections.h @@ -50,6 +50,7 @@ See OTBCopyright.txt for details. #include "otbUtmMapProjection.h" #include "otbLambertConformalConicMapProjection.h" #include "otbLambert2EtenduProjection.h" +#include "otbLambert3CartoSudProjection.h" #include "otbLambert93Projection.h" #include "otbEckert4MapProjection.h" #include "otbTransMercatorMapProjection.h" @@ -84,6 +85,8 @@ typedef LambertConformalConicMapProjection<INVERSE> LambertConfor typedef LambertConformalConicMapProjection<FORWARD> LambertConformalConicForwardProjection; typedef Lambert2EtenduProjection<INVERSE> Lambert2EtenduInverseProjection; typedef Lambert2EtenduProjection<FORWARD> Lambert2EtenduForwardProjection; +typedef Lambert3CartoSudProjection<INVERSE> Lambert3CartoSudInverseProjection; +typedef Lambert3CartoSudProjection<FORWARD> Lambert3CartoSudForwardProjection; typedef Lambert93Projection<INVERSE> Lambert93InverseProjection; typedef Lambert93Projection<FORWARD> Lambert93ForwardProjection; typedef SVY21MapProjection<INVERSE> SVY21InverseProjection; diff --git a/Code/Radiometry/CMakeLists.txt b/Code/Radiometry/CMakeLists.txt index db3ff67df4dac6b553f8c27fe8055af42cd921a2..b14a18b2ed6882f86f615cf5bf46cf7e5745e8a7 100644 --- a/Code/Radiometry/CMakeLists.txt +++ b/Code/Radiometry/CMakeLists.txt @@ -3,7 +3,7 @@ FILE(GLOB OTBRadiometry_SRCS "*.cxx" ) ADD_LIBRARY(OTBRadiometry ${OTBRadiometry_SRCS}) -TARGET_LINK_LIBRARIES (OTBRadiometry OTBCommon otb6S) +TARGET_LINK_LIBRARIES (OTBRadiometry OTBCommon otb6S otbossim) IF(OTB_LIBRARY_PROPERTIES) SET_TARGET_PROPERTIES(OTBRadiometry PROPERTIES ${OTB_LIBRARY_PROPERTIES}) ENDIF(OTB_LIBRARY_PROPERTIES)