QGIS/python/analysis/raster/qgsrastercalcnode.sip
Juergen E. Fischer f3cb57b1eb SIP bindings update:
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
  same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
  missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
2012-09-24 02:42:57 +02:00

58 lines
1.3 KiB
Plaintext

class QgsRasterCalcNode
{
%TypeHeaderCode
#include <qgsrastercalcnode.h>
%End
public:
//! defines possible types of node
enum Type
{
tOperator = 1,
tNumber,
tRasterRef
};
//! possible operators
enum Operator
{
opPLUS,
opMINUS,
opMUL,
opDIV,
opPOW,
opSQRT,
opSIN,
opCOS,
opTAN,
opASIN,
opACOS,
opATAN,
opEQ, // =
opNE, //!=
opGT, // >
opLT, // <
opGE, // >=
opLE, // <=
opAND,
opOR,
opSIGN //change sign
};
QgsRasterCalcNode();
QgsRasterCalcNode( double number );
QgsRasterCalcNode( Operator op, QgsRasterCalcNode* left, QgsRasterCalcNode* right );
QgsRasterCalcNode( const QString& rasterName );
~QgsRasterCalcNode();
Type type() const;
//set left node
void setLeft( QgsRasterCalcNode* left );
void setRight( QgsRasterCalcNode* right );
/**Calculates result (might be real matrix or single number)*/
bool calculate( QMap<QString, QgsRasterMatrix*>& rasterData, QgsRasterMatrix& result ) const;
static QgsRasterCalcNode* parseRasterCalcString( const QString& str, QString& parserErrorMsg ) /Factory/;
};