@@ -253,7 +253,7 @@ void QgsRasterProjector::calc()
253
253
double myDestRes = mDestXRes < mDestYRes ? mDestXRes : mDestYRes ;
254
254
mSqrTolerance = myDestRes * myDestRes;
255
255
256
- const QgsCoordinateTransform* ct = QgsCoordinateTransformCache::instance ()->transform ( mDestCRS .authid (), mSrcCRS .authid (), mDestDatumTransform , mSrcDatumTransform );
256
+ const QgsCoordinateTransform* inverseCt = QgsCoordinateTransformCache::instance ()->transform ( mDestCRS .authid (), mSrcCRS .authid (), mDestDatumTransform , mSrcDatumTransform );
257
257
258
258
// Initialize the matrix by corners and middle points
259
259
mCPCols = mCPRows = 3 ;
@@ -273,20 +273,20 @@ void QgsRasterProjector::calc()
273
273
}
274
274
for ( int i = 0 ; i < mCPRows ; i++ )
275
275
{
276
- calcRow ( i, ct );
276
+ calcRow ( i, inverseCt );
277
277
}
278
278
279
279
while ( true )
280
280
{
281
- bool myColsOK = checkCols ( ct );
281
+ bool myColsOK = checkCols ( inverseCt );
282
282
if ( !myColsOK )
283
283
{
284
- insertRows ( ct );
284
+ insertRows ( inverseCt );
285
285
}
286
- bool myRowsOK = checkRows ( ct );
286
+ bool myRowsOK = checkRows ( inverseCt );
287
287
if ( !myRowsOK )
288
288
{
289
- insertCols ( ct );
289
+ insertCols ( inverseCt );
290
290
}
291
291
if ( myColsOK && myRowsOK )
292
292
{
@@ -893,10 +893,10 @@ QgsRasterBlock * QgsRasterProjector::block( int bandNo, QgsRectangle const & ex
893
893
// we cannot fill output block with no data because we use memcpy for data, not setValue().
894
894
bool doNoData = !QgsRasterBlock::typeIsNumeric ( inputBlock->dataType () ) && inputBlock->hasNoData () && !inputBlock->hasNoDataValue ();
895
895
896
- const QgsCoordinateTransform* ct = 0 ;
896
+ const QgsCoordinateTransform* inverseCt = 0 ;
897
897
if ( !mApproximate )
898
898
{
899
- ct = QgsCoordinateTransformCache::instance ()->transform ( mDestCRS .authid (), mSrcCRS .authid (), mDestDatumTransform , mSrcDatumTransform );
899
+ inverseCt = QgsCoordinateTransformCache::instance ()->transform ( mDestCRS .authid (), mSrcCRS .authid (), mDestDatumTransform , mSrcDatumTransform );
900
900
}
901
901
902
902
outputBlock->setIsNoData ();
@@ -906,7 +906,7 @@ QgsRasterBlock * QgsRasterProjector::block( int bandNo, QgsRectangle const & ex
906
906
{
907
907
for ( int j = 0 ; j < width; ++j )
908
908
{
909
- bool inside = srcRowCol ( i, j, &srcRow, &srcCol, ct );
909
+ bool inside = srcRowCol ( i, j, &srcRow, &srcCol, inverseCt );
910
910
if ( !inside ) continue ; // we have everything set to no data
911
911
912
912
qgssize srcIndex = ( qgssize )srcRow * mSrcCols + srcCol;
0 commit comments