Skip to content

Commit 812a51e

Browse files
committed
fix doxygen warnings and add copyright headers
1 parent 9980b45 commit 812a51e

8 files changed

+84
-14
lines changed

src/core/qgsrasterdataprovider.cpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
#include <QTime>
2323
#include <QMap>
2424
#include <QByteArray>
25-
26-
#include <cmath>
25+
#include <qmath>
2726

2827
void QgsRasterDataProvider::readBlock( int bandNo, QgsRectangle
2928
const & viewExtent, int width,
@@ -271,7 +270,8 @@ QByteArray QgsRasterDataProvider::noValueBytes( int theBandNo )
271270
}
272271
return ba;
273272
}
274-
/*
273+
274+
#if 0
275275
QgsRasterBandStats QgsRasterDataProvider::bandStatistics( int theBandNo )
276276
{
277277
// TODO: cache stats here in provider
@@ -398,7 +398,7 @@ QgsRasterBandStats QgsRasterDataProvider::bandStatistics( int theBandNo )
398398
}
399399

400400
myRasterBandStats.sumOfSquares += static_cast < double >
401-
( pow( myValue - myRasterBandStats.mean, 2 ) );
401+
( qPow( myValue - myRasterBandStats.mean, 2 ) );
402402
}
403403
}
404404
} //end of column wise loop
@@ -420,7 +420,8 @@ QgsRasterBandStats QgsRasterDataProvider::bandStatistics( int theBandNo )
420420
myRasterBandStats.statsGathered = true;
421421
return myRasterBandStats;
422422
}
423-
*/
423+
#endif
424+
424425
QgsRasterBandStats QgsRasterDataProvider::statisticsDefaults( int theBandNo,
425426
const QgsRectangle & theExtent,
426427
int theSampleSize )
@@ -565,7 +566,7 @@ QgsRasterBandStats QgsRasterDataProvider::bandStatistics( int theBandNo,
565566
}
566567

567568
//myRasterBandStats.sumOfSquares += static_cast < double >
568-
// ( pow( myValue - myRasterBandStats.mean, 2 ) );
569+
// ( qPow( myValue - myRasterBandStats.mean, 2 ) );
569570

570571
// Single pass stdev
571572
double myDelta = myValue - myMean;
@@ -813,7 +814,7 @@ QgsRasterHistogram QgsRasterDataProvider::histogram( int theBandNo,
813814
continue; // NULL
814815
}
815816

816-
int myBinIndex = static_cast <int>( floor(( myValue - myMinimum ) / myBinSize ) ) ;
817+
int myBinIndex = static_cast <int>( qFloor(( myValue - myMinimum ) / myBinSize ) ) ;
817818
//QgsDebugMsg( QString( "myValue = %1 myBinIndex = %2" ).arg( myValue ).arg( myBinIndex ) );
818819

819820
if (( myBinIndex < 0 || myBinIndex > ( myBinCount - 1 ) ) && !theIncludeOutOfRange )

src/core/qgsrasterdataprovider.h

+1
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
322322
* @param theMaximum Maximum value, if NaN, raster minimum value will be used.
323323
* @param theExtent Extent used to calc histogram, if empty, whole raster extent is used.
324324
* @param theSampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample.
325+
* @param theIncludeOutOfRange include out of range values
325326
* @return Vector of non NULL cell counts for each bin.
326327
*/
327328
virtual QgsRasterHistogram histogram( int theBandNo,

src/core/raster/qgsrasterdrawer.h

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class QgsRasterDrawer
3737

3838
protected:
3939
/**Draws raster part
40+
@param p the painter to draw to
41+
@param viewPort view port to draw to
42+
@param img image to draw
4043
@param topLeftCol Left position relative to left border of viewport
4144
@param topLeftRow Top position relative to top border of viewport*/
4245
void drawImage( QPainter* p, QgsRasterViewPort* viewPort, const QImage& img, int topLeftCol, int topLeftRow ) const;

src/core/raster/qgsrasterfilewriter.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/***************************************************************************
2+
qgsrasterfilewriter.cpp
3+
---------------------
4+
begin : July 2012
5+
copyright : (C) 2012 by Marco Hugentobler
6+
email : marco dot hugentobler at sourcepole dot ch
7+
***************************************************************************
8+
* *
9+
* This program is free software; you can redistribute it and/or modify *
10+
* it under the terms of the GNU General Public License as published by *
11+
* the Free Software Foundation; either version 2 of the License, or *
12+
* (at your option) any later version. *
13+
* *
14+
***************************************************************************/
115
#include "qgsrasterfilewriter.h"
216
#include "qgsproviderregistry.h"
317
#include "qgsrasterinterface.h"

src/core/raster/qgsrasterfilewriter.h

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/***************************************************************************
2+
qgsrasterfilewriter.h
3+
---------------------
4+
begin : July 2012
5+
copyright : (C) 2012 by Marco Hugentobler
6+
email : marco dot hugentobler at sourcepole dot ch
7+
***************************************************************************
8+
* *
9+
* This program is free software; you can redistribute it and/or modify *
10+
* it under the terms of the GNU General Public License as published by *
11+
* the Free Software Foundation; either version 2 of the License, or *
12+
* (at your option) any later version. *
13+
* *
14+
***************************************************************************/
115
#ifndef QGSRASTERFILEWRITER_H
216
#define QGSRASTERFILEWRITER_H
317

@@ -27,8 +41,12 @@ class CORE_EXPORT QgsRasterFileWriter
2741
~QgsRasterFileWriter();
2842

2943
/**Write raster file
44+
@param iter raster iterator
3045
@param nCols number of output columns
31-
@param nRows number of output rows (or -1 to automatically calculate row number to have square pixels)*/
46+
@param nRows number of output rows (or -1 to automatically calculate row number to have square pixels)
47+
@param outputExtent extent to output
48+
@param crs crs to reproject to
49+
@param p dialog to show progress in */
3250
WriterError writeRaster( QgsRasterIterator* iter, int nCols, int nRows, QgsRectangle outputExtent,
3351
const QgsCoordinateReferenceSystem& crs, QProgressDialog* p = 0 );
3452

src/core/raster/qgsrasteriterator.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/***************************************************************************
2+
qgsrasteriterator.cpp
3+
---------------------
4+
begin : July 2012
5+
copyright : (C) 2012 by Marco Hugentobler
6+
email : marco dot hugentobler at sourcepole dot ch
7+
***************************************************************************
8+
* *
9+
* This program is free software; you can redistribute it and/or modify *
10+
* it under the terms of the GNU General Public License as published by *
11+
* the Free Software Foundation; either version 2 of the License, or *
12+
* (at your option) any later version. *
13+
* *
14+
***************************************************************************/
115
#include "qgsrasteriterator.h"
216
#include "qgsrasterinterface.h"
317
#include "qgsrasterprojector.h"

src/core/raster/qgsrasteriterator.h

+23-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/***************************************************************************
2+
qgsrasteriterator.h
3+
---------------------
4+
begin : July 2012
5+
copyright : (C) 2012 by Marco Hugentobler
6+
email : marco dot hugentobler at sourcepole dot ch
7+
***************************************************************************
8+
* *
9+
* This program is free software; you can redistribute it and/or modify *
10+
* it under the terms of the GNU General Public License as published by *
11+
* the Free Software Foundation; either version 2 of the License, or *
12+
* (at your option) any later version. *
13+
* *
14+
***************************************************************************/
115
#ifndef QGSRASTERITERATOR_H
216
#define QGSRASTERITERATOR_H
317

@@ -27,16 +41,21 @@ class CORE_EXPORT QgsRasterIterator
2741
~QgsRasterIterator();
2842

2943
/**Start reading of raster band. Raster data can then be retrieved by calling readNextRasterPart until it returns false.
30-
@param bandNumer number of raster band to read
31-
@param viewPort describes raster position on screen
44+
@param bandNumber number of raster band to read
45+
@param nCols number of columns
46+
@param nRows number of rows
47+
@param extent area to read
3248
*/
3349
void startRasterRead( int bandNumber, int nCols, int nRows, const QgsRectangle& extent );
3450

3551
/**Fetches next part of raster data
52+
@param bandNumber band to read
3653
@param nCols number of columns on output device
3754
@param nRows number of rows on output device
38-
@param nColsRaster number of raster columns (different to nCols if oversamplingX != 1.0)
39-
@param nRowsRaster number of raster rows (different to nRows if oversamplingY != 0)*/
55+
@param rasterData to return the pointer to raster data in
56+
@param topLeftCol top left column
57+
@param topLeftRow top left row
58+
@return false if the last part was already returned*/
4059
bool readNextRasterPart( int bandNumber,
4160
int& nCols, int& nRows,
4261
void** rasterData,

src/gui/raster/qgsrasterhistogramwidget.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ void QgsRasterHistogramWidget::on_btnHistoCompute_clicked()
204204
bool QgsRasterHistogramWidget::computeHistogram( bool forceComputeFlag )
205205
{
206206
const int BINCOUNT = RASTER_HISTOGRAM_BINS; // 256 - defined in qgsrasterdataprovider.h
207-
bool myIgnoreOutOfRangeFlag = true;
208-
bool myThoroughBandScanFlag = false;
207+
//bool myIgnoreOutOfRangeFlag = true;
208+
//bool myThoroughBandScanFlag = false;
209209
int myBandCountInt = mRasterLayer->bandCount();
210210

211211
// if forceComputeFlag = false make sure raster has cached histogram, else return false

0 commit comments

Comments
 (0)