@@ -194,7 +194,7 @@ void QgsRasterProjector::calc()
194194 }
195195 // What is the maximum reasonable size of transformatio matrix?
196196 // TODO: consider better when to break - ratio
197- if ( mCPRows * mCPCols > 0.0625 * mDestRows * mDestCols )
197+ if ( mCPRows * mCPCols > 0.25 * mDestRows * mDestCols )
198198 {
199199 QgsDebugMsg ( " Too large CP matrix" );
200200 mApproximate = false ;
@@ -679,11 +679,11 @@ void * QgsRasterProjector::readBlock( int bandNo, QgsRectangle const & extent,
679679
680680 if ( !inputData ) return 0 ;
681681
682- int pixelSize = mInput ->typeSize ( mInput ->dataType ( bandNo ) ) / 8 ;
682+ size_t pixelSize = mInput ->typeSize ( mInput ->dataType ( bandNo ) ) / 8 ;
683683
684- int inputSize = pixelSize * srcCols () * srcRows ();
684+ size_t inputSize = pixelSize * srcCols () * srcRows ();
685685
686- int outputSize = width * height * pixelSize;
686+ size_t outputSize = width * height * pixelSize;
687687 void * outputData = malloc ( outputSize );
688688
689689 // Check for allcoation error
@@ -701,8 +701,8 @@ void * QgsRasterProjector::readBlock( int bandNo, QgsRectangle const & extent,
701701 for ( int j = 0 ; j < width; ++j )
702702 {
703703 srcRowCol ( i, j, &srcRow, &srcCol );
704- int srcIndex = pixelSize * ( srcRow * mSrcCols + srcCol );
705- int destIndex = pixelSize * ( i * width + j );
704+ size_t srcIndex = pixelSize * ( srcRow * mSrcCols + srcCol );
705+ size_t destIndex = pixelSize * ( i * width + j );
706706
707707 if ( srcIndex >= inputSize || destIndex >= outputSize ) continue ; // should not happen
708708
0 commit comments