Skip to content

Commit f7bddb9

Browse files
root676nyalldawson
authored andcommittedAug 5, 2020
format code
1 parent 5eb2754 commit f7bddb9

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed
 

‎src/analysis/processing/qgsalgorithmrasterstackposition.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ int QgsRasterStackLowestPositionAlgorithm::findPosition( std::vector< std::uniqu
243243
double firstValue = mNoDataValue;
244244
bool firstValueIsNoData = true;
245245

246-
while( firstValueIsNoData && ( currentPosition < inputBlocksCount ) )
246+
while ( firstValueIsNoData && ( currentPosition < inputBlocksCount ) )
247247
{
248248
//check if all blocks are nodata/invalid
249-
std::unique_ptr<QgsRasterBlock> &firstBlock = inputBlocks.at(currentPosition);
250-
firstValue = firstBlock->valueAndNoData(row, col, firstValueIsNoData);
249+
std::unique_ptr<QgsRasterBlock> &firstBlock = inputBlocks.at( currentPosition );
250+
firstValue = firstBlock->valueAndNoData( row, col, firstValueIsNoData );
251251

252-
if( !firstBlock->isValid() || firstValueIsNoData )
252+
if ( !firstBlock->isValid() || firstValueIsNoData )
253253
{
254254
noDataInRasterBlockStack = true;
255255
noDataCount++;
@@ -261,29 +261,29 @@ int QgsRasterStackLowestPositionAlgorithm::findPosition( std::vector< std::uniqu
261261
currentPosition++;
262262
}
263263

264-
if( noDataCount == inputBlocksCount )
264+
if ( noDataCount == inputBlocksCount )
265265
{
266266
noDataInRasterBlockStack = true;
267267
return -1; //all blocks are NoData
268268
}
269269
else
270270
{
271271
//scan for the lowest value
272-
while( currentPosition < inputBlocksCount)
272+
while ( currentPosition < inputBlocksCount )
273273
{
274-
std::unique_ptr< QgsRasterBlock > &currentBlock = inputBlocks.at(currentPosition);
274+
std::unique_ptr< QgsRasterBlock > &currentBlock = inputBlocks.at( currentPosition );
275275

276276
bool currentValueIsNoData = false;
277-
double currentValue = currentBlock->valueAndNoData(row, col, currentValueIsNoData);
277+
double currentValue = currentBlock->valueAndNoData( row, col, currentValueIsNoData );
278278

279-
if(!currentBlock->isValid() || currentValueIsNoData)
279+
if ( !currentBlock->isValid() || currentValueIsNoData )
280280
{
281281
noDataInRasterBlockStack = true;
282282
noDataCount++;
283283
}
284284
else
285285
{
286-
if(currentValue < firstValue)
286+
if ( currentValue < firstValue )
287287
{
288288
firstValue = currentValue;
289289
lowestPosition = currentPosition;
@@ -346,13 +346,13 @@ int QgsRasterStackHighestPositionAlgorithm::findPosition( std::vector< std::uniq
346346
double firstValue = mNoDataValue;
347347
bool firstValueIsNoData = true;
348348

349-
while( firstValueIsNoData && ( currentPosition < inputBlocksCount ) )
349+
while ( firstValueIsNoData && ( currentPosition < inputBlocksCount ) )
350350
{
351351
//check if all blocks are nodata/invalid
352-
std::unique_ptr<QgsRasterBlock> &firstBlock = inputBlocks.at(currentPosition);
353-
firstValue = firstBlock->valueAndNoData(row, col, firstValueIsNoData);
352+
std::unique_ptr<QgsRasterBlock> &firstBlock = inputBlocks.at( currentPosition );
353+
firstValue = firstBlock->valueAndNoData( row, col, firstValueIsNoData );
354354

355-
if( !firstBlock->isValid() || firstValueIsNoData )
355+
if ( !firstBlock->isValid() || firstValueIsNoData )
356356
{
357357
noDataInRasterBlockStack = true;
358358
noDataCount++;
@@ -365,29 +365,29 @@ int QgsRasterStackHighestPositionAlgorithm::findPosition( std::vector< std::uniq
365365
currentPosition++;
366366
}
367367

368-
if( noDataCount == inputBlocksCount )
368+
if ( noDataCount == inputBlocksCount )
369369
{
370370
noDataInRasterBlockStack = true;
371371
return -1; //all blocks are NoData
372372
}
373373
else
374374
{
375375
//scan for the lowest value
376-
while( currentPosition < inputBlocksCount)
376+
while ( currentPosition < inputBlocksCount )
377377
{
378-
std::unique_ptr< QgsRasterBlock > &currentBlock = inputBlocks.at(currentPosition);
378+
std::unique_ptr< QgsRasterBlock > &currentBlock = inputBlocks.at( currentPosition );
379379

380380
bool currentValueIsNoData = false;
381-
double currentValue = currentBlock->valueAndNoData(row, col, currentValueIsNoData);
381+
double currentValue = currentBlock->valueAndNoData( row, col, currentValueIsNoData );
382382

383-
if(!currentBlock->isValid() || currentValueIsNoData)
383+
if ( !currentBlock->isValid() || currentValueIsNoData )
384384
{
385385
noDataInRasterBlockStack = true;
386386
noDataCount++;
387387
}
388388
else
389389
{
390-
if(currentValue > firstValue)
390+
if ( currentValue > firstValue )
391391
{
392392
firstValue = currentValue;
393393
highestPosition = currentPosition;

0 commit comments

Comments
 (0)
Please sign in to comment.