Commit bf9ef128 authored by Emmanuel Christophe's avatar Emmanuel Christophe

ENH: rename the *Wrapper for ossim in *Adapter

parent 40534f43
......@@ -16,7 +16,7 @@
=========================================================================*/
#include "otbMapProjectionWrapper.h"
#include "otbMapProjectionAdapter.h"
#include <cassert>
......@@ -44,12 +44,12 @@
namespace otb
{
MapProjectionWrapper::MapProjectionWrapper():
MapProjectionAdapter::MapProjectionAdapter():
m_MapProjection(NULL), m_ProjectionRefWkt(""), m_ReinstanciateProjection(true)
{
}
MapProjectionWrapper::~MapProjectionWrapper()
MapProjectionAdapter::~MapProjectionAdapter()
{
if (m_MapProjection != NULL)
{
......@@ -57,7 +57,7 @@ MapProjectionWrapper::~MapProjectionWrapper()
}
}
MapProjectionWrapper::InternalMapProjectionPointer MapProjectionWrapper::GetMapProjection()
MapProjectionAdapter::InternalMapProjectionPointer MapProjectionAdapter::GetMapProjection()
{
itkDebugMacro("returning MapProjection address " << this->m_MapProjection);
if ((m_ReinstanciateProjection) || (m_MapProjection == NULL))
......@@ -68,7 +68,7 @@ MapProjectionWrapper::InternalMapProjectionPointer MapProjectionWrapper::GetMapP
return this->m_MapProjection;
}
MapProjectionWrapper::InternalMapProjectionConstPointer MapProjectionWrapper::GetMapProjection() const
MapProjectionAdapter::InternalMapProjectionConstPointer MapProjectionAdapter::GetMapProjection() const
{
itkDebugMacro("returning MapProjection address " << this->m_MapProjection);
if ((m_ReinstanciateProjection) || (m_MapProjection == NULL))
......@@ -79,7 +79,7 @@ MapProjectionWrapper::InternalMapProjectionConstPointer MapProjectionWrapper::Ge
return this->m_MapProjection;
}
std::string MapProjectionWrapper::GetWkt() const
std::string MapProjectionAdapter::GetWkt() const
{
ossimKeywordlist kwl;
this->GetMapProjection();
......@@ -94,7 +94,7 @@ std::string MapProjectionWrapper::GetWkt() const
return wkt;
}
void MapProjectionWrapper::SetWkt(std::string projectionRefWkt)
void MapProjectionAdapter::SetWkt(std::string projectionRefWkt)
{
this->m_ProjectionRefWkt = projectionRefWkt;
m_ReinstanciateProjection = true;
......@@ -102,7 +102,7 @@ void MapProjectionWrapper::SetWkt(std::string projectionRefWkt)
this->Modified();
}
void MapProjectionWrapper::SetParameter(std::string key, std::string value)
void MapProjectionAdapter::SetParameter(std::string key, std::string value)
{
m_ParameterStore[key] = value;
m_ReinstanciateProjection = true;
......@@ -110,7 +110,7 @@ void MapProjectionWrapper::SetParameter(std::string key, std::string value)
this->Modified();
}
std::string MapProjectionWrapper::GetParameter(std::string key) const
std::string MapProjectionAdapter::GetParameter(std::string key) const
{
// Please refer to the note in the header filer
// we do NOT want to read from m_ParameterStore here!
......@@ -187,7 +187,7 @@ std::string MapProjectionWrapper::GetParameter(std::string key) const
return "";
}
bool MapProjectionWrapper::InstanciateProjection()
bool MapProjectionAdapter::InstanciateProjection()
{
if ((this->m_ReinstanciateProjection) || (m_MapProjection == NULL))
{
......@@ -242,7 +242,7 @@ bool MapProjectionWrapper::InstanciateProjection()
return false;
}
void MapProjectionWrapper::InverseTransform(double x, double y, double z,
void MapProjectionAdapter::InverseTransform(double x, double y, double z,
double& lon, double& lat, double& h)
{
if (m_MapProjection == NULL)
......@@ -266,7 +266,7 @@ void MapProjectionWrapper::InverseTransform(double x, double y, double z,
h = z;
}
void MapProjectionWrapper::ForwardTransform(double lon, double lat, double h,
void MapProjectionAdapter::ForwardTransform(double lon, double lat, double h,
double& x, double& y, double& z)
{
if (m_MapProjection == NULL)
......@@ -289,7 +289,7 @@ void MapProjectionWrapper::ForwardTransform(double lon, double lat, double h,
z = h;
}
void MapProjectionWrapper::ApplyParametersToProjection()
void MapProjectionAdapter::ApplyParametersToProjection()
{
// Start by identifying the projection, that will be necessary for
// the casting.
......@@ -444,7 +444,7 @@ void MapProjectionWrapper::ApplyParametersToProjection()
}
}
void MapProjectionWrapper::PrintMap() const
void MapProjectionAdapter::PrintMap() const
{
std::cout << m_MapProjection->print(std::cout);
std::cout << "Parameter store:\n";
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbMapProjectionWrapper_h
#define __otbMapProjectionWrapper_h
#ifndef __otbMapProjectionAdapter_h
#define __otbMapProjectionAdapter_h
#include <string>
#include <map>
......@@ -30,7 +30,7 @@ namespace otb
{
/**
* \class MapProjectionWrapper
* \class MapProjectionAdapter
* \brief Wrapper class to group all dependencies to ossim for map projection
*
* This class is NOT intented to be used outside of OTB. Use the
......@@ -42,11 +42,11 @@ namespace otb
*
**/
class MapProjectionWrapper: public itk::Object
class MapProjectionAdapter: public itk::Object
{
public:
/** Standard class typedefs. */
typedef MapProjectionWrapper Self;
typedef MapProjectionAdapter Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -58,7 +58,7 @@ public:
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(MapProjectionWrapper, itk::Object);
itkTypeMacro(MapProjectionAdapter, itk::Object);
InternalMapProjectionPointer GetMapProjection();
InternalMapProjectionConstPointer GetMapProjection() const;
......@@ -79,11 +79,11 @@ public:
void PrintMap() const;
protected:
MapProjectionWrapper();
virtual ~MapProjectionWrapper();
MapProjectionAdapter();
virtual ~MapProjectionAdapter();
private:
MapProjectionWrapper(const Self &); //purposely not implemented
MapProjectionAdapter(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
void ApplyParametersToProjection();
......
......@@ -16,7 +16,7 @@
=========================================================================*/
#include "otbRPCProjectionWrapper.h"
#include "otbRPCProjectionAdapter.h"
#include "otbImageKeywordlist.h"
#include "projection/ossimRpcProjection.h"
......@@ -27,13 +27,13 @@
namespace otb
{
RPCProjectionWrapper::RPCProjectionWrapper()
RPCProjectionAdapter::RPCProjectionAdapter()
{
// Create projection
m_RpcProjection = new ossimRpcProjection();
}
RPCProjectionWrapper::~RPCProjectionWrapper()
RPCProjectionAdapter::~RPCProjectionAdapter()
{
if (m_RpcProjection != NULL)
{
......@@ -42,7 +42,7 @@ RPCProjectionWrapper::~RPCProjectionWrapper()
}
void
RPCProjectionWrapper::TransformPoint(double x, double y, double z,
RPCProjectionAdapter::TransformPoint(double x, double y, double z,
double& lon, double& lat, double& h) const
{
if (m_RpcProjection == NULL)
......@@ -63,7 +63,7 @@ RPCProjectionWrapper::TransformPoint(double x, double y, double z,
}
void
RPCProjectionWrapper::Solve(const GCPsContainerType& gcpContainer,
RPCProjectionAdapter::Solve(const GCPsContainerType& gcpContainer,
double& rmsError, ImageKeywordlist& otb_kwl)
{
// TODO: for now, this is a simple transfer of what was done in the
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbRPCProjectionWrapper_h
#define __otbRPCProjectionWrapper_h
#ifndef __otbRPCProjectionAdapter_h
#define __otbRPCProjectionAdapter_h
#include <vector>
......@@ -31,7 +31,7 @@ namespace otb {
class ImageKeywordlist;
/** \class RPCProjectionWrapper
/** \class RPCProjectionAdapter
* \brief Wrapper class for the ossim Rpc projection
*
* This class is used inside the GCPsToRPCSensorModelImageFilter and should not
......@@ -40,11 +40,11 @@ class ImageKeywordlist;
* \sa GCPsToRPCSensorModelImageFilter
**/
class RPCProjectionWrapper: public itk::Object
class RPCProjectionAdapter: public itk::Object
{
public:
/** Standard class typedefs. */
typedef RPCProjectionWrapper Self;
typedef RPCProjectionAdapter Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -58,18 +58,18 @@ public:
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(RPCProjectionWrapper, itk::Object);
itkTypeMacro(RPCProjectionAdapter, itk::Object);
void Solve(const GCPsContainerType& gcpContainer,
double& rmsError, ImageKeywordlist& otb_kwl);
void TransformPoint(double x, double y, double z,
double& lon, double& lat, double& h) const;
protected:
RPCProjectionWrapper();
virtual ~RPCProjectionWrapper();
RPCProjectionAdapter();
virtual ~RPCProjectionAdapter();
private:
RPCProjectionWrapper(const Self &); //purposely not implemented
RPCProjectionAdapter(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
/** RPC Projection */
......
......@@ -16,7 +16,7 @@
=========================================================================*/
#include "otbSensorModelWrapper.h"
#include "otbSensorModelAdapter.h"
#include "projection/ossimProjection.h"
#include "projection/ossimSensorModelFactory.h"
......@@ -27,13 +27,13 @@
namespace otb
{
SensorModelWrapper::SensorModelWrapper():
SensorModelAdapter::SensorModelAdapter():
m_SensorModel(NULL), m_UseDEM(false), m_Epsilon(0.0001), m_NbIter(1) // FIXME keeping the original value but...
{
m_DEMHandler = DEMHandler::New();
}
SensorModelWrapper::~SensorModelWrapper()
SensorModelAdapter::~SensorModelAdapter()
{
if (m_SensorModel != NULL)
{
......@@ -42,7 +42,7 @@ SensorModelWrapper::~SensorModelWrapper()
}
}
void SensorModelWrapper::CreateProjection(const ImageKeywordlist& image_kwl)
void SensorModelAdapter::CreateProjection(const ImageKeywordlist& image_kwl)
{
ossimKeywordlist geom;
......@@ -57,7 +57,7 @@ void SensorModelWrapper::CreateProjection(const ImageKeywordlist& image_kwl)
}
}
bool SensorModelWrapper::IsValidSensorModel()
bool SensorModelAdapter::IsValidSensorModel()
{
if (m_SensorModel == NULL)
{
......@@ -70,13 +70,13 @@ bool SensorModelWrapper::IsValidSensorModel()
}
void SensorModelWrapper::SetDEMDirectory(const std::string& directory)
void SensorModelAdapter::SetDEMDirectory(const std::string& directory)
{
m_DEMHandler->OpenDEMDirectory(directory);
m_UseDEM = true;
}
void SensorModelWrapper::ForwardTransformPoint(double x, double y, double z,
void SensorModelAdapter::ForwardTransformPoint(double x, double y, double z,
double& lon, double& lat, double& h) const
{
ossimDpt ossimPoint(x, y);
......@@ -137,7 +137,7 @@ void SensorModelWrapper::ForwardTransformPoint(double x, double y, double z,
h = ossimGPoint.hgt;
}
void SensorModelWrapper::InverseTransformPoint(double lon, double lat, double h,
void SensorModelAdapter::InverseTransformPoint(double lon, double lat, double h,
double& x, double& y, double& z) const
{
ossimGpt ossimGPoint(lat, lon);
......@@ -175,7 +175,7 @@ void SensorModelWrapper::InverseTransformPoint(double lon, double lat, double h,
z = ossimGPoint.height();
}
ossimProjection* SensorModelWrapper::GetOssimModel() //FIXME temporary only
ossimProjection* SensorModelAdapter::GetOssimModel() //FIXME temporary only
{
return m_SensorModel;
}
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbSensorModelWrapper_h
#define __otbSensorModelWrapper_h
#ifndef __otbSensorModelAdapter_h
#define __otbSensorModelAdapter_h
#include "itkObject.h"
......@@ -29,7 +29,7 @@ namespace otb
{
/**
* \class SensorModelWrapper
* \class SensorModelAdapter
* \brief Wrapper class to group all dependencies to ossim for sensor models
*
* This class is NOT intented to be used outside of OTB. Use the
......@@ -42,11 +42,11 @@ namespace otb
*
**/
class SensorModelWrapper: public itk::Object
class SensorModelAdapter: public itk::Object
{
public:
/** Standard class typedefs. */
typedef SensorModelWrapper Self;
typedef SensorModelAdapter Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -58,7 +58,7 @@ public:
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(SensorModelWrapper, itk::Object);
itkTypeMacro(SensorModelAdapter, itk::Object);
void SetDEMDirectory(const std::string& directory);
......@@ -78,11 +78,11 @@ public:
bool IsValidSensorModel();
protected:
SensorModelWrapper();
virtual ~SensorModelWrapper();
SensorModelAdapter();
virtual ~SensorModelAdapter();
private:
SensorModelWrapper(const Self &); //purposely not implemented
SensorModelAdapter(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
InternalMapProjectionPointer m_SensorModel;
......
......@@ -16,18 +16,18 @@
=========================================================================*/
#include "otbEllipsoidWrapper.h"
#include "otbEllipsoidAdapter.h"
#include "base/ossimEllipsoid.h"
namespace otb
{
EllipsoidWrapper::EllipsoidWrapper()
EllipsoidAdapter::EllipsoidAdapter()
{
m_Ellipsoid = new ossimEllipsoid();
}
EllipsoidWrapper::~EllipsoidWrapper()
EllipsoidAdapter::~EllipsoidAdapter()
{
if (m_Ellipsoid != NULL)
{
......@@ -36,7 +36,7 @@ EllipsoidWrapper::~EllipsoidWrapper()
}
void
EllipsoidWrapper::XYZToLonLatHeight(double x, double y, double z,
EllipsoidAdapter::XYZToLonLatHeight(double x, double y, double z,
double& lon, double& lat, double& h) const
{
// Note the lat/lon convension for ossim vs lon/lat for OTB
......@@ -44,7 +44,7 @@ EllipsoidWrapper::XYZToLonLatHeight(double x, double y, double z,
}
void
EllipsoidWrapper::LonLatHeightToXYZ(double lon, double lat, double h,
EllipsoidAdapter::LonLatHeightToXYZ(double lon, double lat, double h,
double& x, double& y, double& z) const
{
// Note the lat/lon convension for ossim vs lon/lat for OTB
......
......@@ -15,8 +15,8 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbEllipsoidWrapper_h
#define __otbEllipsoidWrapper_h
#ifndef __otbEllipsoidAdapter_h
#define __otbEllipsoidAdapter_h
#include "itkObject.h"
#include "itkObjectFactory.h"
......@@ -25,7 +25,7 @@ class ossimEllipsoid;
namespace otb
{
/** \class EllipsoidWrapper
/** \class EllipsoidAdapter
* \brief class providing the interface to the ossimEllipsoid
*
* This is a class to be used internally instead of introducing a dependence on
......@@ -35,11 +35,11 @@ namespace otb
*
**/
class EllipsoidWrapper: public itk::Object
class EllipsoidAdapter: public itk::Object
{
public:
/** Standard class typedefs. */
typedef EllipsoidWrapper Self;
typedef EllipsoidAdapter Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -48,7 +48,7 @@ public:
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(EllipsoidWrapper, itk::Object);
itkTypeMacro(EllipsoidAdapter, itk::Object);
/** Convert a XYZ coordinate into a lon, lat, heigh on the ellipsoid */
void XYZToLonLatHeight(double x, double y, double z,
......@@ -59,11 +59,11 @@ public:
double& x, double& y, double& z) const;
protected:
EllipsoidWrapper();
virtual ~EllipsoidWrapper();
EllipsoidAdapter();
virtual ~EllipsoidAdapter();
private:
EllipsoidWrapper(const Self &); //purposely not implemented
EllipsoidAdapter(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
ossimEllipsoid* m_Ellipsoid;
......
......@@ -21,7 +21,7 @@
#include "itkCastImageFilter.h"
#include "otbDEMHandler.h"
#include "otbRPCProjectionWrapper.h"
#include "otbRPCProjectionAdapter.h"
namespace otb {
......@@ -209,7 +209,7 @@ private:
GCPsContainerType m_GCPsContainer;
/** RPC Projection */
RPCProjectionWrapper::Pointer m_RpcProjection;
RPCProjectionAdapter::Pointer m_RpcProjection;
/** Keywordlist */
ImageKeywordlist m_Keywordlist;
......
......@@ -45,7 +45,7 @@ GCPsToRPCSensorModelImageFilter<TImage>
this->ClearGCPs();
// Create projection
m_RpcProjection = RPCProjectionWrapper::New();
m_RpcProjection = RPCProjectionAdapter::New();
/** Create the DEM handler */
m_DEMHandler = DEMHandler::New();
......
......@@ -25,7 +25,7 @@
#include "itkTransform.h"
#include "itkExceptionObject.h"
#include "itkMacro.h"
#include "otbMapProjectionWrapper.h"
#include "otbMapProjectionAdapter.h"
namespace otb
{
......@@ -70,7 +70,7 @@ public:
typedef itk::SmartPointer<const Self> ConstPointer;
typedef typename Superclass::ScalarType ScalarType;
typedef MapProjectionWrapper MapProjectionType;
typedef MapProjectionAdapter MapProjectionType;
typedef itk::Point<ScalarType, NInputDimensions> InputPointType;
typedef itk::Point<ScalarType, NOutputDimensions> OutputPointType;
......@@ -99,7 +99,7 @@ public:
virtual bool InstanciateProjection();
const MapProjectionWrapper* GetMapProjection() const;
const MapProjectionAdapter* GetMapProjection() const;
virtual bool IsProjectionDefined() const;
......@@ -112,7 +112,7 @@ protected:
void PrintSelf(std::ostream& os, itk::Indent indent) const;
MapProjectionWrapper::Pointer m_MapProjection;
MapProjectionAdapter::Pointer m_MapProjection;
private:
GenericMapProjection(const Self &); //purposely not implemented
......
......@@ -29,7 +29,7 @@ template<TransformDirection::TransformationDirection TDirectionOfMapping, class
GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>
::GenericMapProjection() : Superclass(SpaceDimension, ParametersDimension)
{
m_MapProjection = MapProjectionWrapper::New();
m_MapProjection = MapProjectionAdapter::New();
}
template<TransformDirection::TransformationDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions,
......@@ -41,7 +41,7 @@ GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutput
template<TransformDirection::TransformationDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions,
unsigned int NOutputDimensions>
const MapProjectionWrapper*
const MapProjectionAdapter*
GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>
::GetMapProjection() const
{
......
......@@ -20,7 +20,7 @@
#include "itkTransform.h"
#include "otbGenericMapProjection.h"
#include "otbEllipsoidWrapper.h"
#include "otbEllipsoidAdapter.h"
namespace otb
{
......@@ -67,7 +67,7 @@ public:
protected:
GeocentricTransform();
virtual ~GeocentricTransform();
EllipsoidWrapper::Pointer m_Ellipsoid;
EllipsoidAdapter::Pointer m_Ellipsoid;
private:
GeocentricTransform(const Self &); //purposely not implemented
......
......@@ -28,7 +28,7 @@ template<TransformDirection::TransformationDirection TDirectionOfMapping, class
GeocentricTransform<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>
::GeocentricTransform() : Superclass(SpaceDimension, ParametersDimension)
{
m_Ellipsoid = EllipsoidWrapper::New();
m_Ellipsoid = EllipsoidAdapter::New();
}
template<TransformDirection::TransformationDirection TDirectionOfMapping, class TScalarType,
......
......@@ -22,7 +22,7 @@
#include "otbMacro.h"
#include "otbImageKeywordlist.h"
#include "otbSensorModelWrapper.h"
#include "otbSensorModelAdapter.h"
#include "itkTransform.h"
#include "itkSmartPointer.h"
......@@ -102,7 +102,7 @@ protected:
/** ImageKeywordlist */
ImageKeywordlist m_ImageKeywordlist;
/** Pointer on an ossim projection (created with the keywordlist) */
SensorModelWrapper::Pointer m_Model;
SensorModelAdapter::Pointer m_Model;
/** Specify an average elevation to use */
TScalarType m_AverageElevation;
......
......@@ -32,7 +32,7 @@ template <class TScalarType,
SensorModelBase<TScalarType, NInputDimensions, NOutputDimensions>
::SensorModelBase() : Superclass(OutputSpaceDimension, 0) //FIXME
{
m_Model = SensorModelWrapper::New();
m_Model = SensorModelAdapter::New();
m_AverageElevation = -32768; // used as a invalid value
}
......
......@@ -1618,13 +1618,13 @@ ADD_TEST(ioTvossimElevManagerTest2 ${IO_TESTS12}
500
)
# otb::MapProjectionWrapper (TODO: remove from IO)
ADD_TEST(ioTvMapProjectionWrapperTest ${IO_TESTS12}
# otb::MapProjectionAdapter (TODO: remove from IO)
ADD_TEST(ioTvMapProjectionAdapterTest ${IO_TESTS12}
--compare-ascii ${EPSILON_9}
${BASELINE_FILES}/ioTvMapProjectionWrapperTest.txt
${TEMP}/ioTvMapProjectionWrapperTest.txt
otbMapProjectionWrapperTest
${TEMP}/ioTvMapProjectionWrapperTest.txt
${BASELINE_FILES}/ioTvMapProjectionAdapterTest.txt
${TEMP}/ioTvMapProjectionAdapterTest.txt
otbMapProjectionAdapterTest
${TEMP}/ioTvMapProjectionAdapterTest.txt
)
......@@ -3305,7 +3305,7 @@ otbDEMToImageGeneratorTest.cxx
otbOssimElevManagerTest.cxx
otbOssimElevManagerTest2.cxx
otbOssimElevManagerTest4.cxx
otbMapProjectionWrapperTest.cxx
otbMapProjectionAdapterTest.cxx
)
......
......@@ -33,5 +33,5 @@ void RegisterTests()
REGISTER_TEST(otbOssimElevManagerTest);
REGISTER_TEST(otbOssimElevManagerTest2);
REGISTER_TEST(otbOssimElevManagerTest4);
REGISTER_TEST(otbMapProjectionWrapperTest);
REGISTER_TEST(otbMapProjectionAdapterTest);
}
......@@ -19,9 +19,9 @@
#include <fstream>
#include <iomanip>
#include "otbMapProjectionWrapper.h"
#include "otbMapProjectionAdapter.h"
int otbMapProjectionWrapperTest(int argc, char* argv[])
int otbMapProjectionAdapterTest(int argc, char* argv[])
{
const char * outFileName = argv[1];
std::ofstream file;
......@@ -34,7 +34,7 @@ int otbMapProjectionWrapperTest(int argc, char* argv[])
std::string projectionRefWkt =
"PROJCS[\"UTM Zone 31, Northern Hemisphere\", GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]], AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]";
otb::MapProjectionWrapper::Pointer genericMapProjection = otb::MapProjectionWrapper::New();
otb::MapProjectionAdapter::Pointer genericMapProjection = otb::MapProjectionAdapter::New();
genericMapProjection->SetWkt(projectionRefWkt);
file << "Instanciating from : " << projectionRefWkt << std::endl;
file << genericMapProjection->GetWkt() << std::endl << std::endl;
......@@ -62,7 +62,7 @@ int otbMapProjectionWrapperTest(int argc, char* argv[])
/** Test the ability to instanciate a projection from an ossim string*/
std::string projectionRefWkt ="ossimUtmProjection";
otb::MapProjectionWrapper::Pointer genericMapProjection = otb::MapProjectionWrapper::New();
otb::MapProjectionAdapter::Pointer genericMapProjection = otb::MapProjectionAdapter::New();
genericMapProjection->SetWkt(projectionRefWkt);
file << "Instanciating from : " << projectionRefWkt << std::endl;
file << genericMapProjection->GetWkt() << std::endl << std::endl;
......@@ -90,7 +90,7 @@ int otbMapProjectionWrapperTest(int argc, char* argv[])
/** Test the ability to instanciate a projection from an short string*/
std::string projectionRefWkt ="Utm";
otb::MapProjectionWrapper::Pointer genericMapProjection = otb::MapProjectionWrapper::New();
otb::MapProjectionAdapter::Pointer genericMapProjection = otb::MapProjectionAdapter::New();
genericMapProjection->SetWkt(projectionRefWkt);
file << "Instanciating from : " << projectionRefWkt << std::endl;
file << genericMapProjection->GetWkt() << std::endl << std::endl;
......@@ -118,7 +118,7 @@ int otbMapProjectionWrapperTest(int argc, char* argv[])
/** Test the ability to instanciate a projection from an short string*/
std::string projectionRefWkt ="Mercator";
otb::MapProjectionWrapper::Pointer genericMapProjection = otb::MapProjectionWrapper::New();
otb::MapProjectionAdapter::Pointer genericMapProjection = otb::MapProjectionAdapter::New();
genericMapProjection->SetWkt(projectionRefWkt);
file << "Instanciating from : " << projectionRefWkt << std::endl;
file << genericMapProjection->GetWkt() << std::endl << std::endl;
......@@ -146,7 +146,7 @@ int otbMapProjectionWrapperTest(int argc, char* argv[])
/** Test the ability to instanciate a projection from an short string*/
std::string projectionRefWkt ="LambertConformalConic";
otb::MapProjectionWrapper::Pointer genericMapProjection = otb