Skip to content
Permalink
Browse files

Rename variable to make intention clearer

  • Loading branch information
nyalldawson committed Feb 16, 2015
1 parent 318a716 commit 153dea25e4c510f3ab72e1c3f660e733ec587035
Showing with 9 additions and 9 deletions.
  1. +9 −9 src/core/raster/qgsrasterprojector.cpp
@@ -253,7 +253,7 @@ void QgsRasterProjector::calc()
double myDestRes = mDestXRes < mDestYRes ? mDestXRes : mDestYRes;
mSqrTolerance = myDestRes * myDestRes;

const QgsCoordinateTransform* ct = QgsCoordinateTransformCache::instance()->transform( mDestCRS.authid(), mSrcCRS.authid(), mDestDatumTransform, mSrcDatumTransform );
const QgsCoordinateTransform* inverseCt = QgsCoordinateTransformCache::instance()->transform( mDestCRS.authid(), mSrcCRS.authid(), mDestDatumTransform, mSrcDatumTransform );

// Initialize the matrix by corners and middle points
mCPCols = mCPRows = 3;
@@ -273,20 +273,20 @@ void QgsRasterProjector::calc()
}
for ( int i = 0; i < mCPRows; i++ )
{
calcRow( i, ct );
calcRow( i, inverseCt );
}

while ( true )
{
bool myColsOK = checkCols( ct );
bool myColsOK = checkCols( inverseCt );
if ( !myColsOK )
{
insertRows( ct );
insertRows( inverseCt );
}
bool myRowsOK = checkRows( ct );
bool myRowsOK = checkRows( inverseCt );
if ( !myRowsOK )
{
insertCols( ct );
insertCols( inverseCt );
}
if ( myColsOK && myRowsOK )
{
@@ -893,10 +893,10 @@ QgsRasterBlock * QgsRasterProjector::block( int bandNo, QgsRectangle const & ex
// we cannot fill output block with no data because we use memcpy for data, not setValue().
bool doNoData = !QgsRasterBlock::typeIsNumeric( inputBlock->dataType() ) && inputBlock->hasNoData() && !inputBlock->hasNoDataValue();

const QgsCoordinateTransform* ct = 0;
const QgsCoordinateTransform* inverseCt = 0;
if ( !mApproximate )
{
ct = QgsCoordinateTransformCache::instance()->transform( mDestCRS.authid(), mSrcCRS.authid(), mDestDatumTransform, mSrcDatumTransform );
inverseCt = QgsCoordinateTransformCache::instance()->transform( mDestCRS.authid(), mSrcCRS.authid(), mDestDatumTransform, mSrcDatumTransform );
}

outputBlock->setIsNoData();
@@ -906,7 +906,7 @@ QgsRasterBlock * QgsRasterProjector::block( int bandNo, QgsRectangle const & ex
{
for ( int j = 0; j < width; ++j )
{
bool inside = srcRowCol( i, j, &srcRow, &srcCol, ct );
bool inside = srcRowCol( i, j, &srcRow, &srcCol, inverseCt );
if ( !inside ) continue; // we have everything set to no data

qgssize srcIndex = ( qgssize )srcRow * mSrcCols + srcCol;

0 comments on commit 153dea2

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