[QGIS Commit] r11529 - in trunk/qgis/src: core
plugins/raster_terrain_analysis providers/osm
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Aug 30 12:33:34 EDT 2009
Author: jef
Date: 2009-08-30 12:33:34 -0400 (Sun, 30 Aug 2009)
New Revision: 11529
Modified:
trunk/qgis/src/core/qgsmessageoutput.cpp
trunk/qgis/src/plugins/raster_terrain_analysis/qgsaspectfilter.cpp
trunk/qgis/src/providers/osm/osmprovider.h
Log:
fix warnings
Modified: trunk/qgis/src/core/qgsmessageoutput.cpp
===================================================================
--- trunk/qgis/src/core/qgsmessageoutput.cpp 2009-08-30 16:30:01 UTC (rev 11528)
+++ trunk/qgis/src/core/qgsmessageoutput.cpp 2009-08-30 16:33:34 UTC (rev 11529)
@@ -62,7 +62,10 @@
{
// show title if provided
if ( !mTitle.isNull() )
+ {
QgsDebugMsg( QString( "%1:" ).arg( mTitle ) );
+ }
+
// show the message
QgsDebugMsg( mMessage );
emit destroyed();
Modified: trunk/qgis/src/plugins/raster_terrain_analysis/qgsaspectfilter.cpp
===================================================================
--- trunk/qgis/src/plugins/raster_terrain_analysis/qgsaspectfilter.cpp 2009-08-30 16:30:01 UTC (rev 11528)
+++ trunk/qgis/src/plugins/raster_terrain_analysis/qgsaspectfilter.cpp 2009-08-30 16:33:34 UTC (rev 11529)
@@ -17,7 +17,7 @@
#include "qgsaspectfilter.h"
-QgsAspectFilter::QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
+QgsAspectFilter::QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ) :
QgsDerivativeFilter( inputFile, outputFile, outputFormat )
{
@@ -28,40 +28,23 @@
}
-float QgsAspectFilter::processNineCellWindow( float* x11, float* x21, float* x31, float* x12, float* x22, \
- float* x32, float* x13, float* x23, float* x33 )
+float QgsAspectFilter::processNineCellWindow(
+ float* x11, float* x21, float* x31,
+ float* x12, float* x22, float* x32,
+ float* x13, float* x23, float* x33 )
{
float derX = calcFirstDerX( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
float derY = calcFirstDerY( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
- if ( derX == mOutputNodataValue || derY == mOutputNodataValue )
+ if ( derX == mOutputNodataValue ||
+ derY == mOutputNodataValue ||
+ (derX == 0.0 && derY == 0.0) )
{
return mOutputNodataValue;
}
-
- if ( derY < 0 && derX > 0 )
+ else
{
- return 360 + ( atan( derX / derY ) * 180 / M_PI );
+ return 180.0 + atan2(derX, derY) * 180.0 / M_PI;
}
- else if ( derY < 0 && derX < 0 )
- {
- return atan( derX / derY ) * 180 / M_PI;
- }
- else if ( derY > 0 )
- {
- return ( atan( derX / derY ) * 180 / M_PI ) + 180;
- }
- else if ( derX < 0 && derY == 0 )
- {
- return 90;
- }
- else if ( derX > 0 && derY == 0 )
- {
- return 270;
- }
- else if ( derX == 0 && derY == 0 )
- {
- return mOutputNodataValue;
- }
}
Modified: trunk/qgis/src/providers/osm/osmprovider.h
===================================================================
--- trunk/qgis/src/providers/osm/osmprovider.h 2009-08-30 16:30:01 UTC (rev 11528)
+++ trunk/qgis/src/providers/osm/osmprovider.h 2009-08-30 16:33:34 UTC (rev 11529)
@@ -23,7 +23,7 @@
*/
class QgsOSMDataProvider: public QgsVectorDataProvider
{
-
+ Q_OBJECT
private:
//! provider manages features with one of three geometry types; variable determines feature type of this provider
More information about the QGIS-commit
mailing list