Skip to content
Permalink
Browse files

use constant for raster iterator default (followup baa5d90, f924578)

  • Loading branch information
jef-n committed Feb 21, 2017
1 parent f107a03 commit 72342557c3ebfaee17921659726a2a8e18d347fb
@@ -39,4 +39,7 @@ class QgsRasterIterator

void setMaximumTileHeight( int h );
int maximumTileHeight() const;

static const int DEFAULT_MAXIMUM_TILE_WIDTH;
static const int DEFAULT_MAXIMUM_TILE_HEIGHT;
};
@@ -38,6 +38,7 @@
#include "qgsrasterpyramid.h"
#include "qgsrasterrange.h"
#include "qgsrectangle.h"
#include "qgsrasteriterator.h"

class QImage;
class QByteArray;
@@ -446,14 +447,14 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
* @see stepHeight()
* @note added in QGIS 3.0
*/
virtual int stepWidth() const { return 2000; }
virtual int stepWidth() const { return QgsRasterIterator::DEFAULT_MAXIMUM_TILE_WIDTH; }

/**
* Step height for raster iterations.
* @see stepWidth()
* @note added in QGIS 3.0
*/
virtual int stepHeight() const { return 2000; }
virtual int stepHeight() const { return QgsRasterIterator::DEFAULT_MAXIMUM_TILE_HEIGHT; }

signals:

@@ -21,8 +21,8 @@
QgsRasterIterator::QgsRasterIterator( QgsRasterInterface* input )
: mInput( input )
, mFeedback( nullptr )
, mMaximumTileWidth( 2000 )
, mMaximumTileHeight( 2000 )
, mMaximumTileWidth( DEFAULT_MAXIMUM_TILE_WIDTH )
, mMaximumTileHeight( DEFAULT_MAXIMUM_TILE_HEIGHT )
{
for ( QgsRasterInterface *ri = input; ri; ri = ri->input() )
{
@@ -68,6 +68,9 @@ class CORE_EXPORT QgsRasterIterator
void setMaximumTileHeight( int h ) { mMaximumTileHeight = h; }
int maximumTileHeight() const { return mMaximumTileHeight; }

static const int DEFAULT_MAXIMUM_TILE_WIDTH = 2000;
static const int DEFAULT_MAXIMUM_TILE_HEIGHT = 2000;

private:
//Stores information about reading of a raster band. Columns and rows are in unsampled coordinates
struct RasterPartInfo
@@ -24,6 +24,7 @@
#include "qgsauthmanager.h"
#include "qgsraster.h"
#include "qgsrectangle.h"
#include "qgsrasteriterator.h"

class QNetworkReply;

@@ -569,8 +570,8 @@ class QgsWmsSettings
/**
* Step size when iterating the layer
*/
int mStepWidth = 2000;
int mStepHeight = 2000;
int mStepWidth = QgsRasterIterator::DEFAULT_MAXIMUM_TILE_WIDTH;
int mStepHeight = QgsRasterIterator::DEFAULT_MAXIMUM_TILE_HEIGHT;

//! Data source URI of the WMS for this layer
QString mHttpUri;

0 comments on commit 7234255

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