File: qgsrastermatrix.sip

package info (click to toggle)
qgis 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 374,696 kB
  • ctags: 66,263
  • sloc: cpp: 396,139; ansic: 241,070; python: 130,609; xml: 14,884; perl: 1,290; sh: 1,287; sql: 500; yacc: 268; lex: 242; makefile: 168
file content (89 lines) | stat: -rw-r--r-- 2,355 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
class QgsRasterMatrix
{
%TypeHeaderCode
#include <qgsrastermatrix.h>
%End

  public:

    enum TwoArgOperator
    {
      opPLUS,
      opMINUS,
      opMUL,
      opDIV,
      opPOW,
      opEQ,         // =
      opNE,         // != resp. <>
      opGT,         // >
      opLT,         // <
      opGE,         // >=
      opLE,         // <=
      opAND,
      opOR
    };

    enum OneArgOperator
    {
      opSQRT,
      opSIN,
      opCOS,
      opTAN,
      opASIN,
      opACOS,
      opATAN,
      opSIGN
    };

    /**Takes ownership of data array*/
    QgsRasterMatrix();
    //! @note note available in python bindings
    // QgsRasterMatrix( int nCols, int nRows, float* data, double nodataValue );
    QgsRasterMatrix( const QgsRasterMatrix& m );
    ~QgsRasterMatrix();

    /**Returns true if matrix is 1x1 (=scalar number)*/
    bool isNumber() const;
    double number() const;

    /**Returns data array (but not ownership)*/
    //! @note not available in python bindings
    // float* data();
    /**Returns data and ownership. Sets data and nrows, ncols of this matrix to 0*/
    //! @note not available in python bindings
    // float* takeData();

    void setData( int cols, int rows, float* data, double nodataValue );

    int nColumns() const;
    int nRows() const;

    double nodataValue() const;
    void setNodataValue( double d );

    // QgsRasterMatrix& operator=( const QgsRasterMatrix& m );
    /**Adds another matrix to this one*/
    bool add( const QgsRasterMatrix& other );
    /**Subtracts another matrix from this one*/
    bool subtract( const QgsRasterMatrix& other );
    bool multiply( const QgsRasterMatrix& other );
    bool divide( const QgsRasterMatrix& other );
    bool power( const QgsRasterMatrix& other );
    bool equal( const QgsRasterMatrix& other );
    bool notEqual( const QgsRasterMatrix& other );
    bool greaterThan( const QgsRasterMatrix& other );
    bool lesserThan( const QgsRasterMatrix& other );
    bool greaterEqual( const QgsRasterMatrix& other );
    bool lesserEqual( const QgsRasterMatrix& other );
    bool logicalAnd( const QgsRasterMatrix& other );
    bool logicalOr( const QgsRasterMatrix& other );

    bool squareRoot();
    bool sinus();
    bool asinus();
    bool cosinus();
    bool acosinus();
    bool tangens();
    bool atangens();
    bool changeSign();
};