Commit 0e2b28b8 authored by Guillaume Pasero's avatar Guillaume Pasero

REFAC: remove deprecated map projections

parent 732ee597
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otbMapProjectionDeprecated_h
#define otbMapProjectionDeprecated_h
#include "otbGenericMapProjection.h"
namespace otb
{
namespace MapProjectionType
{
enum MapProj
{
ALBERS,
AZIMEQUDIST,
BNG,
BONNE,
CADRG,
CASSINI,
CYLEQUAREA,
ECKERT6,
GNOMONIC,
LLXY,
EQUDISTCYL,
MERCATOR,
MILLER,
NEWZEALANDMAPGRID,
OBLIQUEMERCATOR,
ORTHOGRAPHIC,
POLARSTEREO,
POLYCONIC,
SPACEOBLIQUEMERCATOR,
STEREOGRAPHIC,
TRANSCYLEQUAREA,
UPS,
VANDERGRINTEN,
};
}
/** \class MapProjectionDeprecated
* \brief The only purpose of this class is to maintain backward compatibility.
*
* GenericMapProjection should be used instead.
*
*
*
* \ingroup OTBProjection
*/
template <MapProjectionType::MapProj TMapProj,
TransformDirection::TransformationDirection TTransform>
class ITK_EXPORT MapProjectionDeprecated : public GenericMapProjection<TTransform>
{
public:
/** Standard class typedefs. */
typedef MapProjectionDeprecated Self;
typedef GenericMapProjection<TTransform> 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(MapProjectionDeprecated, GenericMapProjection);
protected:
MapProjectionDeprecated();
~MapProjectionDeprecated() ITK_OVERRIDE {};
private:
MapProjectionDeprecated(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
};
} // namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbMapProjectionDeprecated.txx"
#endif
#endif
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otbMapProjectionDeprecated_txx
#define otbMapProjectionDeprecated_txx
#include "otbMapProjectionDeprecated.h"
namespace otb
{
template<MapProjectionType::MapProj TMapProj>
inline std::string GetMapProjectionDeprecatedString()
{
return "";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::ALBERS>()
{
return "Albers";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::AZIMEQUDIST>()
{
return "AzimEquDist";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::BNG>()
{
return "Bng";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::BONNE>()
{
return "Bonne";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::CADRG>()
{
return "Cadrg";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::CASSINI>()
{
return "Cassini";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::CYLEQUAREA>()
{
return "CylEquArea";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::ECKERT6>()
{
return "Eckert6";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::GNOMONIC>()
{
return "Gnomonic";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::LLXY>()
{
return "Llxy";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::EQUDISTCYL>()
{
return "EquDistCyl";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::MERCATOR>()
{
return "Mercator";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::MILLER>()
{
return "Miller";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::NEWZEALANDMAPGRID>()
{
return "NewZealandMapGrid";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::OBLIQUEMERCATOR>()
{
return "ObliqueMercator";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::ORTHOGRAPHIC>()
{
return "OrthoGraphic";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::POLARSTEREO>()
{
return "PolarStereo";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::POLYCONIC>()
{
return "Polyconic";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::SPACEOBLIQUEMERCATOR>()
{
return "SpaceObliqueMercator";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::STEREOGRAPHIC>()
{
return "Stereographic";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::TRANSCYLEQUAREA>()
{
return "TransCylEquArea";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::UPS>()
{
return "Ups";
}
template<>
inline std::string GetMapProjectionDeprecatedString<MapProjectionType::VANDERGRINTEN>()
{
return "VanDerGrinten";
}
template <MapProjectionType::MapProj TMapProj,
TransformDirection::TransformationDirection TTransform>
MapProjectionDeprecated<TMapProj, TTransform>
::MapProjectionDeprecated()
{
this->SetWkt(GetMapProjectionDeprecatedString<TMapProj>());
}
}
#endif
......@@ -21,8 +21,6 @@
#ifndef otbMapProjections_h
#define otbMapProjections_h
#include "otbMapProjectionDeprecated.h"
#include "otbUtmMapProjection.h"
#include "otbLambert2EtenduProjection.h"
#include "otbLambert3CartoSudProjection.h"
......@@ -56,54 +54,5 @@ typedef TransMercatorMapProjection<TransformDirection::FORWARD>
typedef UtmMapProjection<TransformDirection::INVERSE> UtmInverseProjection;
typedef UtmMapProjection<TransformDirection::FORWARD> UtmForwardProjection;
// Definitions to maintain backward compatibility, but the GenericMapProjection
// should be used instead.
typedef MapProjectionDeprecated<MapProjectionType::ALBERS, TransformDirection::INVERSE> AlbersInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::ALBERS, TransformDirection::FORWARD> AlbersForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::AZIMEQUDIST, TransformDirection::INVERSE> AzimEquDistInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::AZIMEQUDIST, TransformDirection::FORWARD> AzimEquDistForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::BNG, TransformDirection::INVERSE> BngInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::BNG, TransformDirection::FORWARD> BngForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::BONNE, TransformDirection::INVERSE> BonneInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::BONNE, TransformDirection::FORWARD> BonneForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::CADRG, TransformDirection::INVERSE> CadrgInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::CADRG, TransformDirection::FORWARD> CadrgForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::CASSINI, TransformDirection::INVERSE> CassiniInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::CASSINI, TransformDirection::FORWARD> CassiniForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::CYLEQUAREA, TransformDirection::INVERSE> CylEquAreaInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::CYLEQUAREA, TransformDirection::FORWARD> CylEquAreaForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::ECKERT6, TransformDirection::INVERSE> Eckert6InverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::ECKERT6, TransformDirection::FORWARD> Eckert6ForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::GNOMONIC, TransformDirection::INVERSE> GnomonicInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::GNOMONIC, TransformDirection::FORWARD> GnomonicForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::LLXY, TransformDirection::INVERSE> LlxyInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::LLXY, TransformDirection::FORWARD> LlxyForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::EQUDISTCYL, TransformDirection::INVERSE> EquDistCylInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::EQUDISTCYL, TransformDirection::FORWARD> EquDistCylForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::MERCATOR, TransformDirection::INVERSE> MercatorInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::MERCATOR, TransformDirection::FORWARD> MercatorForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::MILLER, TransformDirection::INVERSE> MillerInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::MILLER, TransformDirection::FORWARD> MillerForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::NEWZEALANDMAPGRID, TransformDirection::INVERSE> NewZealandMapGridInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::NEWZEALANDMAPGRID, TransformDirection::FORWARD> NewZealandMapGridForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::OBLIQUEMERCATOR, TransformDirection::INVERSE> ObliqueMercatorInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::OBLIQUEMERCATOR, TransformDirection::FORWARD> ObliqueMercatorForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::ORTHOGRAPHIC, TransformDirection::INVERSE> OrthoGraphicInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::ORTHOGRAPHIC, TransformDirection::FORWARD> OrthoGraphicForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::POLARSTEREO, TransformDirection::INVERSE> PolarStereoInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::POLARSTEREO, TransformDirection::FORWARD> PolarStereoForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::POLYCONIC, TransformDirection::INVERSE> PolyconicInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::POLYCONIC, TransformDirection::FORWARD> PolyconicForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::SPACEOBLIQUEMERCATOR, TransformDirection::INVERSE> SpaceObliqueMercatorInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::SPACEOBLIQUEMERCATOR, TransformDirection::FORWARD> SpaceObliqueMercatorForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::STEREOGRAPHIC, TransformDirection::INVERSE> StereographicInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::STEREOGRAPHIC, TransformDirection::FORWARD> StereographicForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::TRANSCYLEQUAREA, TransformDirection::INVERSE> TransCylEquAreaInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::TRANSCYLEQUAREA, TransformDirection::FORWARD> TransCylEquAreaForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::UPS, TransformDirection::INVERSE> UpsInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::UPS, TransformDirection::FORWARD> UpsForwardProjection;
typedef MapProjectionDeprecated<MapProjectionType::VANDERGRINTEN, TransformDirection::INVERSE> VanDerGrintenInverseProjection;
typedef MapProjectionDeprecated<MapProjectionType::VANDERGRINTEN, TransformDirection::FORWARD> VanDerGrintenForwardProjection;
} //namespace otb
#endif
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