Skip to content
Permalink
Browse files

osgeo4w: prepare for GDAL 2.3 update

  • Loading branch information
jef-n committed Oct 13, 2018
1 parent 85fdf4e commit 4f76722a223b4eca1cd4b86d20b4093bbb2878d4
@@ -481,6 +481,9 @@ IF(MSVC)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQGISDEBUG=1")
# disable macros that offend std::numeric_limits<T>::min()/max()
ADD_DEFINITIONS(-DNOMINMAX)
IF(MSVC_VERSION LESS 1900)
ADD_DEFINITIONS(-DCPL_SUPRESS_CPLUSPLUS)
ENDIF(MSVC_VERSION LESS 1900)
ENDIF(MSVC)

IF(ENABLE_COVERAGE)
@@ -15,9 +15,16 @@

#include "qgsalignraster.h"

#include <gdalwarper.h>
#include <ogr_srs_api.h>
#include <cpl_conv.h>

#if defined(_MSC_VER) && _MSC_VER >= 1600 && _MSC_VER < 1900
// we need GDALWarpKernel
#undef CPL_SUPRESS_CPLUSPLUS
#endif

#include <gdalwarper.h>

#include <limits>

#include <qmath.h>
@@ -503,9 +510,8 @@ bool QgsAlignRaster::createAndWarp( const Item& raster )
}

// Initialize and execute the warp operation.
GDALWarpOperation oOperation;
oOperation.Initialize( psWarpOptions );
oOperation.ChunkAndWarpImage( 0, 0, mXSize, mYSize );
GDALWarpOperationH oOperation = GDALCreateWarpOperation( psWarpOptions );
GDALChunkAndWarpImage( oOperation, 0, 0, mXSize, mYSize );

GDALDestroyGenImgProjTransformer( psWarpOptions->pTransformerArg );
GDALDestroyWarpOptions( psWarpOptions );
@@ -62,7 +62,9 @@
#include <sqlite3.h>
#include "qgslogger.h"

#ifndef CPL_SUPRESS_CPLUSPLUS
#define CPL_SUPRESS_CPLUSPLUS
#endif
#include <gdal.h>
#include <geos_c.h>
#include <cpl_conv.h> // for setting gdal options
@@ -40,7 +40,9 @@
#include "qgsconfig.h"

// use GDAL VSI mechanism
#ifndef CPL_SUPRESS_CPLUSPLUS
#define CPL_SUPRESS_CPLUSPLUS
#endif
#include "cpl_vsi.h"
#include "cpl_string.h"

@@ -18,11 +18,11 @@

#include <gdal.h>
#include <gdal_alg.h>
#include <cpl_string.h>

#include "qgsleastsquares.h"

#include <cmath>

#include <cassert>
#include <limits>

@@ -511,7 +511,7 @@ bool QgsGDALGeorefTransform::updateParametersFromGCPs( const QVector<QgsPoint> &
for ( int i = 0; i < n; i++ )
{
GCPList[i].pszId = new char[20];
snprintf( GCPList[i].pszId, 19, "gcp%i", i );
CPLsnprintf( GCPList[i].pszId, 19, "gcp%i", i );
GCPList[i].pszInfo = nullptr;
GCPList[i].dfGCPPixel = pixelCoords[i].x();
GCPList[i].dfGCPLine = -pixelCoords[i].y();
@@ -252,15 +252,14 @@ int QgsImageWarper::warpFile( const QString& input,
adfGeoTransform );

// Initialize and execute the warp operation.
GDALWarpOperation oOperation;
oOperation.Initialize( psWarpOptions );
GDALWarpOperationH oOperation = GDALCreateWarpOperation( psWarpOptions );

progressDialog->show();
progressDialog->raise();
progressDialog->activateWindow();

eErr = oOperation.ChunkAndWarpImage( 0, 0, destPixels, destLines );
// eErr = oOperation.ChunkAndWarpMulti(0, 0, destPixels, destLines);
eErr = GDALChunkAndWarpImage( oOperation, 0, 0, destPixels, destLines );
// eErr = GDALChunkAndWarpMulti( oOperation, 0, 0, destPixels, destLines );

destroyGeoToPixelTransform( psWarpOptions->pTransformerArg );
GDALDestroyWarpOptions( psWarpOptions );
@@ -15,7 +15,9 @@
* *
***************************************************************************/

#ifndef CPL_SUPRESS_CPLUSPLUS
#define CPL_SUPRESS_CPLUSPLUS
#endif
#include "cpl_conv.h"

#include "qgsapplication.h"
@@ -23,7 +23,9 @@

#include <QList>

#ifndef CPL_SUPRESS_CPLUSPLUS
#define CPL_SUPRESS_CPLUSPLUS
#endif
#include <gdal.h>

#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 1800
@@ -21,7 +21,9 @@ email : sherman at mrcc.com
#include "qgsmessagelog.h"
#include "qgslocalec.h"

#ifndef CPL_SUPRESS_CPLUSPLUS
#define CPL_SUPRESS_CPLUSPLUS
#endif
#include <gdal.h> // to collect version information
#include <ogr_api.h>
#include <ogr_srs_api.h>
@@ -44,7 +44,9 @@ class QNetworkAccessManager;
class QNetworkReply;
class QNetworkRequest;

#ifndef CPL_SUPRESS_CPLUSPLUS
#define CPL_SUPRESS_CPLUSPLUS
#endif
#include <gdal.h>
#include "cpl_conv.h"

@@ -15,7 +15,9 @@ Email : sherman at mrcc dot com
#include <QtTest/QtTest>
#include <QPixmap>

#ifndef CPL_SUPRESS_CPLUSPLUS
#define CPL_SUPRESS_CPLUSPLUS
#endif
#include <gdal.h>

//header for class being tested

0 comments on commit 4f76722

Please sign in to comment.
You can’t perform that action at this time.