Commit 3a848554 authored by Emmanuel Christophe's avatar Emmanuel Christophe

Ajout lambert 2 Etendu. Correction dans map projection pour WGS84 par défaut

parent 75c9f6d3
/*=========================================================================
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 __otbLambert2EtenduProjection_h
#define __otbLambert2EtenduProjection_h
#include "projection/ossimMapProjection.h"
#include "projection/ossimLambertConformalConicProjection.h"
#include "otbMapProjection.h"
namespace otb
{
/** \class Lambert2EtenduProjection
* \brief This class implements the Lambert 2 Etendu map projection.
* It converts coordinates in longitude,latitude to Lambert 2 Etendu map coordinates.
*
*/
template <InverseOrForwardTransformationEnum transform>
class ITK_EXPORT Lambert2EtenduProjection : public LambertConformalConicMapProjection<transform>
{
public :
/** Standard class typedefs. */
typedef Lambert2EtenduProjection 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( Lambert2EtenduProjection, MapProjection );
protected:
Lambert2EtenduProjection();
virtual ~Lambert2EtenduProjection();
private :
Lambert2EtenduProjection(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
};
} // namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbLambert2EtenduProjection.txx"
#endif
#endif
/*=========================================================================
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 __otbLambert2EtenduProjection_txx
#define __otbLambert2EtenduProjection_txx
#include "otbLambert2EtenduProjection.h"
namespace otb
{
template <InverseOrForwardTransformationEnum transform>
Lambert2EtenduProjection<transform>
::Lambert2EtenduProjection()
{
itk::Point<double,2> origin;
origin[0]=2.33722778;
origin[1]=46.8;
std::string datum = "NTF";
double parall1=45.89891944;
double parall2=47.69601389;
double falseEasting=600000;
double falseNorthing=2200000;
std::string ellipsoid = "CE";
// typedef otb::LambertConformalConicForwardProjection LambertProjectionType;
// LambertProjectionType::Pointer lambertProjection = LambertProjectionType::New();
// lambertProjection->SetParameters(parall1, parall2, falseEasting, falseNorthing);
// lambertProjection->SetOrigin(oriPoint, datum);
// lambertProjection->SetEllipsoid(ellipsoid);
//
// this->m_MapProjection->setEllipsoid(ellipsoid);
// this->m_MapProjection->setOrigin(origin);
// this->m_MapProjection->setOrigin(datum);
// this->m_MapProjection->setParametersparall1, parall2, falseEasting, falseNorthing);
this->SetOrigin(origin, datum);
this->SetEllipsoid(ellipsoid);
this->SetParameters(parall1, parall2, falseEasting, falseNorthing);
}
template <InverseOrForwardTransformationEnum transform>
Lambert2EtenduProjection<transform>
::~Lambert2EtenduProjection()
{
}
} // namespace otb
#endif
......@@ -25,7 +25,7 @@ PURPOSE. See the above copyright notices for more information.
namespace otb
{
/** \class LambertConformalConicMapProjection
* \brief This class implements the Lambert Conformatl Conic map projection.
* \brief This class implements the Lambert Conformal Conic map projection.
* It converts coordinates in longitude,latitude to Lambert Conformal Conic map coordinates.
*
*/
......
......@@ -94,6 +94,7 @@ namespace otb
//map projection
ossimGpt ossimGPoint;
ossimGPoint=m_MapProjection->inverse(ossimDPoint);
ossimGPoint.changeDatum(ossimDatumFactory::instance()->wgs84() );
// otbGenericMsgDebugMacro(<< "Inverse : " << std::endl << m_MapProjection->print(std::cout));
outputPoint[0]=ossimGPoint.lon;
......
......@@ -49,11 +49,13 @@ PURPOSE. See the above copyright notices for more information.
#include "projection/ossimVanDerGrintenProjection.h"
#include "otbUtmMapProjection.h"
#include "otbLambertConformalConicMapProjection.h"
#include "otbLambert2EtenduProjection.h"
#include "otbEckert4MapProjection.h"
#include "otbTransMercatorMapProjection.h"
#include "otbSinusoidalMapProjection.h"
#include "otbMollweidMapProjection.h"
namespace otb
{
......@@ -79,6 +81,8 @@ namespace otb
typedef MapProjection<ossimGnomonicProjection,FORWARD> GnomonicForwardProjection;
typedef LambertConformalConicMapProjection<INVERSE> LambertConformalConicInverseProjection;
typedef LambertConformalConicMapProjection<FORWARD> LambertConformalConicForwardProjection;
typedef Lambert2EtenduProjection<INVERSE> Lambert2EtenduInverseProjection;
typedef Lambert2EtenduProjection<FORWARD> Lambert2EtenduForwardProjection;
typedef MapProjection<ossimLlxyProjection,INVERSE> LlxyInverseProjection;
typedef MapProjection<ossimLlxyProjection,FORWARD> LlxyForwardProjection;
typedef MapProjection<ossimEquDistCylProjection,INVERSE> EquDistCylInverseProjection;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment