diff --git a/Modules/Adapters/GdalAdapters/include/otbOGRDataSourceWrapper.h b/Modules/Adapters/GdalAdapters/include/otbOGRDataSourceWrapper.h index 98bb35c399810e8d81ec5561b55c51e2acf7df89..f3a149a974367e652a821ada687d731096bca4cb 100644 --- a/Modules/Adapters/GdalAdapters/include/otbOGRDataSourceWrapper.h +++ b/Modules/Adapters/GdalAdapters/include/otbOGRDataSourceWrapper.h @@ -45,7 +45,6 @@ #include "itkObjectFactory.h" // that should have been included by itkMacro.h #include "otbOGRLayerWrapper.h" -#include "otbOGRVersionProxy.h" #include "otbOGRExtendedFilenameToOptions.h" class OGRLayer; diff --git a/Modules/Adapters/GdalAdapters/include/otbOGRLayerWrapper.h b/Modules/Adapters/GdalAdapters/include/otbOGRLayerWrapper.h index 6b23090d10e371c5293a1b2c4688d944dba0b3af..7cce53313186f56794aef3ccec545542dbba5722 100644 --- a/Modules/Adapters/GdalAdapters/include/otbOGRLayerWrapper.h +++ b/Modules/Adapters/GdalAdapters/include/otbOGRLayerWrapper.h @@ -36,7 +36,6 @@ #endif // #include "itkIndent.h", included from field #include "otbOGRFeatureWrapper.h" -#include "otbOGRVersionProxy.h" #include <string> // #include "ogr_core.h" // OGRwkbGeometryType, included from feature -> field diff --git a/Modules/Adapters/GdalAdapters/include/otbOGRVersionProxy.h b/Modules/Adapters/GdalAdapters/include/otbOGRVersionProxy.h deleted file mode 100644 index 5021d43978abce232eea6580e5d2526516fe8f8f..0000000000000000000000000000000000000000 --- a/Modules/Adapters/GdalAdapters/include/otbOGRVersionProxy.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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 otbOGRVersionProxy_h -#define otbOGRVersionProxy_h - -#include <string> -#include <vector> -#include "otbConfigure.h" -#include "itkMacro.h" - -#if defined(_MSC_VER) -#pragma warning ( push ) -#pragma warning ( disable: 4251 ) -#include "ogr_core.h" // OGR enums -#pragma warning ( pop ) -#else -#include "ogr_core.h" // OGR enums -#endif - -class GDALDataset; -class GDALDriver; -class OGRFeature; - -#include "OTBGdalAdaptersExport.h" - -namespace otb -{ -namespace ogr -{ -namespace version_proxy -{ - -/** - * This namespace holds proxy functions hiding interface changes in gdal 2.0 - * - * This namespace holds proxy functions hiding interface changes in OGR - * dataset between gdal 1.x (x>10) and gdal 2.x. It defines a common - * interface that should be used in place of calling directly the - * wrapped gdal functions. - * - * Whenever GDALDataset and GDALDriver have to be used to open a - * vector dataset (or OGRDataSource an OGRSFDriver for gdal 1.x), one - * should use ogr::version_proxy types GDALDataset and - * GDALDriver. - * - * See function documentation for details. - */ - - /** - * Return the list of files composing the dataset. - * - * Calls OGRDataSource::GetName() and wrap in string vector for gdal - * 1.x implementation, and GDALDataset::GetFileList and wrap in - * string vector for gdal 2.x implementation. - * - * \param dataset Pointer to the dataset to get the file list from. Will not be - * checked for null pointer. - * - * \return A vector of string containing the list of files. - */ - -} -} -} // end namespace otb - -#endif diff --git a/Modules/Adapters/GdalAdapters/src/CMakeLists.txt b/Modules/Adapters/GdalAdapters/src/CMakeLists.txt index a93505302f0b4ff3d4a62d5e986bbe0d6dff60ba..b5d09907dbcbf31712526d4547566d76496c2595 100644 --- a/Modules/Adapters/GdalAdapters/src/CMakeLists.txt +++ b/Modules/Adapters/GdalAdapters/src/CMakeLists.txt @@ -28,7 +28,6 @@ set(OTBGdalAdapters_SRC otbOGRDriversInit.cxx otbGeometriesToGeometriesFilter.cxx otbOGRDataSourceWrapper.cxx - otbOGRVersionProxy.cxx otbOGRExtendedFilenameToOptions.cxx otbOGRHelpers.cxx ) diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRFieldWrapper.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRFieldWrapper.cxx index 7e12f398ba63b8c79bcb3848bffb68aacc138b39..7bf292e9015bb3de1c4d51f109840300014a0acc 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRFieldWrapper.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRFieldWrapper.cxx @@ -37,7 +37,6 @@ #endif #include "otbOGRFeatureWrapper.h" #include "otbJoinContainer.h" -#include "otbOGRVersionProxy.h" #include <boost/array.hpp> /*===========================================================================*/ /*===========================[ Static Assertions ]===========================*/ diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRVersionProxy.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRVersionProxy.cxx deleted file mode 100644 index 479ecaf705ea6e4c35dd07f1a03052a21a27dda2..0000000000000000000000000000000000000000 --- a/Modules/Adapters/GdalAdapters/src/otbOGRVersionProxy.cxx +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ - -#include "otbOGRVersionProxy.h" -#include "otbOGRHelpers.h" - -#include "itkMacro.h" - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wshadow" -#if GDAL_VERSION_NUM<2000000 -#include "ogrsf_frmts.h" -#else -#include "gdal_priv.h" -#endif -#include "ogr_feature.h" -#pragma GCC diagnostic pop -#else -#if GDAL_VERSION_NUM<2000000 -#include "ogrsf_frmts.h" -#else -#include "gdal_priv.h" -#endif -#include "ogr_feature.h" -#endif // __GNUC__ || __clang__ - -namespace otbscon -{ -namespace ogr -{ -namespace version_proxy -{ -} -} -} // end namespace - diff --git a/Modules/IO/IOGDAL/include/otbOGRIOHelper.h b/Modules/IO/IOGDAL/include/otbOGRIOHelper.h index 0f5ceae562f95683e1c828152120343d2ee51c2b..5427f030c6cbd786a3cd283635852e176dbed1fa 100644 --- a/Modules/IO/IOGDAL/include/otbOGRIOHelper.h +++ b/Modules/IO/IOGDAL/include/otbOGRIOHelper.h @@ -24,7 +24,6 @@ #include <vector> #include "otbVectorData.h" -#include "otbOGRVersionProxy.h" #include "OTBIOGDALExport.h" diff --git a/Modules/IO/IOGDAL/include/otbOGRVectorDataIO.h b/Modules/IO/IOGDAL/include/otbOGRVectorDataIO.h index ef1ca7bd509c014b5a83ab27725816fe5e56bd20..d743bfa2b5e3b0736edcfaac8ae9b70b1801f786 100644 --- a/Modules/IO/IOGDAL/include/otbOGRVectorDataIO.h +++ b/Modules/IO/IOGDAL/include/otbOGRVectorDataIO.h @@ -26,7 +26,6 @@ #include "otbVectorDataIOBase.h" #include "otbVectorData.h" -#include "otbOGRVersionProxy.h" #include "OTBIOGDALExport.h" diff --git a/Modules/IO/TestKernel/src/otbTestHelper.cxx b/Modules/IO/TestKernel/src/otbTestHelper.cxx index 8fa2f19aa5a51b3ccdc33608a5ea8c0bef7185bb..e849b0129510644ac3d9c856d570f7931b5cbb04 100644 --- a/Modules/IO/TestKernel/src/otbTestHelper.cxx +++ b/Modules/IO/TestKernel/src/otbTestHelper.cxx @@ -48,7 +48,6 @@ #include "otbDifferenceImageFilter.h" #include "otbPrintableImageFilter.h" #include "otbStreamingShrinkImageFilter.h" -#include "otbOGRVersionProxy.h" #include "otbOGRHelpers.h" #include "otbConfigure.h" diff --git a/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.h b/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.h index 05bb3db5161f0c37894cced15e2e816ff868a3f5..f7fbf00ff58fe49e17d28c672ad982426fb3badc 100644 --- a/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.h +++ b/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.h @@ -31,7 +31,6 @@ #include "gdal.h" #include "gdal_alg.h" #include "ogr_srs_api.h" -#include "otbOGRVersionProxy.h" namespace otb { diff --git a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h index bd85f0b618c80d6c48924b64c3b4f017b20cd2f5..d67617fc170887bdc864770ba7655131c1e9f14e 100644 --- a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h +++ b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h @@ -29,7 +29,6 @@ #include "gdal.h" #include "ogr_api.h" -#include "otbOGRVersionProxy.h" #include <string> namespace otb {