Skip to content

Commit a2a6e78

Browse files
committed
more cosmetics
1 parent d8540c0 commit a2a6e78

File tree

65 files changed

+155
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+155
-142
lines changed

src/analysis/interpolation/qgsgridfilewriter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
#include <QFile>
2121
#include <QProgressDialog>
2222

23-
QgsGridFileWriter::QgsGridFileWriter( QgsInterpolator* i, QString outputPath, QgsRectangle extent, int nCols, int nRows , double cellSizeX, double cellSizeY ): \
24-
mInterpolator( i ), mOutputFilePath( outputPath ), mInterpolationExtent( extent ), mNumColumns( nCols ), mNumRows( nRows ), mCellSizeX( cellSizeX ), mCellSizeY( cellSizeY )
23+
QgsGridFileWriter::QgsGridFileWriter( QgsInterpolator* i, QString outputPath, QgsRectangle extent, int nCols, int nRows , double cellSizeX, double cellSizeY )
24+
: mInterpolator( i ), mOutputFilePath( outputPath ), mInterpolationExtent( extent ), mNumColumns( nCols ), mNumRows( nRows )
25+
, mCellSizeX( cellSizeX ), mCellSizeY( cellSizeY )
2526
{
2627

2728
}

src/analysis/raster/qgsaspectfilter.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ class ANALYSIS_EXPORT QgsAspectFilter: public QgsDerivativeFilter
2929

3030
protected:
3131
protected:
32-
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
32+
/**Calculates output value from nine input values. The input values and the output value can be equal to the
3333
nodata value if not present or outside of the border. Must be implemented by subclasses*/
34-
float processNineCellWindow( float* x11, float* x21, float* x31, \
35-
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );
34+
float processNineCellWindow( float* x11, float* x21, float* x31,
35+
float* x12, float* x22, float* x32,
36+
float* x13, float* x23, float* x33 );
3637
};
3738

3839
#endif // QGSASPECTFILTER_H

src/analysis/raster/qgsderivativefilter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
#include "qgsderivativefilter.h"
1919

20-
QgsDerivativeFilter::QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
21-
QgsNineCellFilter( inputFile, outputFile, outputFormat )
20+
QgsDerivativeFilter::QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat )
21+
: QgsNineCellFilter( inputFile, outputFile, outputFormat )
2222
{
2323

2424
}

src/analysis/raster/qgsderivativefilter.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ class QgsDerivativeFilter: public QgsNineCellFilter
2727
QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat );
2828
virtual ~QgsDerivativeFilter();
2929
//to be implemented by subclasses
30-
virtual float processNineCellWindow( float* x11, float* x21, float* x31, float* x12, float* x22, \
31-
float* x32, float* x13, float* x23, float* x33 ) = 0;
30+
virtual float processNineCellWindow( float* x11, float* x21, float* x31,
31+
float* x12, float* x22, float* x32,
32+
float* x13, float* x23, float* x33 ) = 0;
3233

3334
protected:
3435
/**Calculates the first order derivative in x-direction according to Horn (1981)*/

src/analysis/raster/qgsninecellfilter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#define TO8(x) (x).toLocal8Bit().constData()
2626
#endif
2727

28-
QgsNineCellFilter::QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
29-
mInputFile( inputFile ), mOutputFile( outputFile ), mOutputFormat( outputFormat ), mCellSizeX( -1 ), mCellSizeY( -1 ), mInputNodataValue( -1 ), mOutputNodataValue( -1 )
28+
QgsNineCellFilter::QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat )
29+
: mInputFile( inputFile ), mOutputFile( outputFile ), mOutputFormat( outputFormat ), mCellSizeX( -1 ), mCellSizeY( -1 ), mInputNodataValue( -1 ), mOutputNodataValue( -1 )
3030
{
3131

3232
}
@@ -153,17 +153,17 @@ int QgsNineCellFilter::processRaster( QProgressDialog* p )
153153
{
154154
if ( j == 0 )
155155
{
156-
resultLine[j] = processNineCellWindow( &mInputNodataValue, &scanLine1[j], &scanLine1[j+1], &mInputNodataValue, &scanLine2[j], \
156+
resultLine[j] = processNineCellWindow( &mInputNodataValue, &scanLine1[j], &scanLine1[j+1], &mInputNodataValue, &scanLine2[j],
157157
&scanLine2[j+1], &mInputNodataValue, &scanLine3[j], &scanLine3[j+1] );
158158
}
159159
else if ( j == xSize - 1 )
160160
{
161-
resultLine[j] = processNineCellWindow( &scanLine1[j-1], &scanLine1[j], &mInputNodataValue, &scanLine2[j-1], &scanLine2[j], \
161+
resultLine[j] = processNineCellWindow( &scanLine1[j-1], &scanLine1[j], &mInputNodataValue, &scanLine2[j-1], &scanLine2[j],
162162
&mInputNodataValue, &scanLine3[j-1], &scanLine3[j], &mInputNodataValue );
163163
}
164164
else
165165
{
166-
resultLine[j] = processNineCellWindow( &scanLine1[j-1], &scanLine1[j], &scanLine1[j+1], &scanLine2[j-1], &scanLine2[j], \
166+
resultLine[j] = processNineCellWindow( &scanLine1[j-1], &scanLine1[j], &scanLine1[j+1], &scanLine2[j-1], &scanLine2[j],
167167
&scanLine2[j+1], &scanLine3[j-1], &scanLine3[j], &scanLine3[j+1] );
168168
}
169169
}

src/analysis/raster/qgsninecellfilter.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
class QProgressDialog;
2525

26-
/**Base class for raster analysis methods that work with a 3x3 cell filter and calculate the value of each cell based on \
27-
the cell value and the eight neighbour cells. Common examples are slope and aspect calculation in DEMs. Subclasses only implement \
26+
/**Base class for raster analysis methods that work with a 3x3 cell filter and calculate the value of each cell based on
27+
the cell value and the eight neighbour cells. Common examples are slope and aspect calculation in DEMs. Subclasses only implement
2828
the method that calculates the new value from the nine values. Everything else (reading file, writing file) is done by this subclass*/
2929

3030
class ANALYSIS_EXPORT QgsNineCellFilter
@@ -52,10 +52,11 @@ class ANALYSIS_EXPORT QgsNineCellFilter
5252
GDALDatasetH openOutputFile( GDALDatasetH inputDataset, GDALDriverH outputDriver );
5353

5454
protected:
55-
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
55+
/**Calculates output value from nine input values. The input values and the output value can be equal to the
5656
nodata value if not present or outside of the border. Must be implemented by subclasses*/
57-
virtual float processNineCellWindow( float* x11, float* x21, float* x31, \
58-
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 ) = 0;
57+
virtual float processNineCellWindow( float* x11, float* x21, float* x31,
58+
float* x12, float* x22, float* x32,
59+
float* x13, float* x23, float* x33 ) = 0;
5960

6061
QString mInputFile;
6162
QString mOutputFile;

src/analysis/raster/qgsruggednessfilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ QgsRuggednessFilter::~QgsRuggednessFilter()
3333

3434
}
3535

36-
float QgsRuggednessFilter::processNineCellWindow( float* x11, float* x21, float* x31, \
36+
float QgsRuggednessFilter::processNineCellWindow( float* x11, float* x21, float* x31,
3737
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
3838
{
3939
//the formula would be that easy without nodata values...

src/analysis/raster/qgsruggednessfilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ANALYSIS_EXPORT QgsRuggednessFilter: public QgsNineCellFilter
2929
~QgsRuggednessFilter();
3030

3131
protected:
32-
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
32+
/**Calculates output value from nine input values. The input values and the output value can be equal to the
3333
nodata value if not present or outside of the border. Must be implemented by subclasses*/
3434
float processNineCellWindow( float* x11, float* x21, float* x31, \
3535
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );

src/analysis/raster/qgsslopefilter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
#include "qgsslopefilter.h"
1919

20-
QgsSlopeFilter::QgsSlopeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
21-
QgsDerivativeFilter( inputFile, outputFile, outputFormat )
20+
QgsSlopeFilter::QgsSlopeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat )
21+
: QgsDerivativeFilter( inputFile, outputFile, outputFormat )
2222
{
2323

2424
}
@@ -28,7 +28,7 @@ QgsSlopeFilter::~QgsSlopeFilter()
2828

2929
}
3030

31-
float QgsSlopeFilter::processNineCellWindow( float* x11, float* x21, float* x31, \
31+
float QgsSlopeFilter::processNineCellWindow( float* x11, float* x21, float* x31,
3232
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
3333
{
3434
float derX = calcFirstDerX( x11, x21, x31, x12, x22, x32, x13, x23, x33 );

src/analysis/raster/qgsslopefilter.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ class ANALYSIS_EXPORT QgsSlopeFilter: public QgsDerivativeFilter
2828
~QgsSlopeFilter();
2929

3030
protected:
31-
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
31+
/**Calculates output value from nine input values. The input values and the output value can be equal to the
3232
nodata value if not present or outside of the border. Must be implemented by subclasses*/
33-
float processNineCellWindow( float* x11, float* x21, float* x31, \
34-
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );
33+
float processNineCellWindow( float* x11, float* x21, float* x31,
34+
float* x12, float* x22, float* x32,
35+
float* x13, float* x23, float* x33 );
3536
};
3637

3738
#endif // QGSSLOPEFILTER_H

0 commit comments

Comments
 (0)