50 , mRasterName( rasterName )
53 if ( mRasterName.startsWith(
'"' ) && mRasterName.endsWith(
'"' ) )
54 mRasterName = mRasterName.mid( 1, mRasterName.size() - 2 );
76 QMap<QString, QgsRasterMatrix*>::iterator it = rasterData.find( mRasterName );
77 if ( it == rasterData.end() )
82 int nEntries = ( *it )->nColumns() * ( *it )->nRows();
83 float* data =
new float[nEntries];
84 memcpy( data, ( *it )->data(), nEntries *
sizeof( float ) );
85 result.
setData(( *it )->nColumns(), ( *it )->nRows(), data, ( *it )->nodataValue() );
92 if ( !mLeft || !mLeft->
calculate( rasterData, leftMatrix ) )
96 if ( mRight && !mRight->
calculate( rasterData, rightMatrix ) )
104 leftMatrix.
add( rightMatrix );
113 leftMatrix.
divide( rightMatrix );
116 leftMatrix.
power( rightMatrix );
119 leftMatrix.
equal( rightMatrix );
169 int newNColumns = leftMatrix.
nColumns();
170 int newNRows = leftMatrix.
nRows();
176 float* data =
new float[1];
178 result.
setData( 1, 1, data, -FLT_MAX );
186 extern QgsRasterCalcNode* localParseRasterCalcString(
const QString & str, QString & parserErrorMsg );
187 return localParseRasterCalcString( str, parserErrorMsg );