File: qgsinterpolator.sip.in

package info (click to toggle)
qgis 3.22.16%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,186,020 kB
  • sloc: cpp: 1,275,562; python: 194,091; xml: 15,597; perl: 3,471; sh: 3,368; sql: 2,485; ansic: 2,219; yacc: 1,056; lex: 574; javascript: 504; lisp: 411; makefile: 227
file content (125 lines) | stat: -rw-r--r-- 3,189 bytes parent folder | download | duplicates (5)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/analysis/interpolation/qgsinterpolator.h                         *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/






%ModuleHeaderCode
#include "qgsinterpolator.h"
%End

struct QgsInterpolatorVertexData
{

  QgsInterpolatorVertexData( double x, double y, double z );
%Docstring
Constructor for :py:class:`QgsInterpolatorVertexData` with the specified
``x``, ``y``, and ``z`` coordinate.
%End

  QgsInterpolatorVertexData();
%Docstring
Constructor for :py:class:`QgsInterpolatorVertexData`
%End

  double x;
  double y;
  double z;
};

class QgsInterpolator
{
%Docstring(signature="appended")
Interface class for interpolations.

Interpolators take
the vertices of a vector layer as base data. The z-Value
can be an attribute or the z-coordinates in case of 3D types.
%End

%TypeHeaderCode
#include "qgsinterpolator.h"
%End
  public:

    enum SourceType
    {
      SourcePoints,
      SourceStructureLines,
      SourceBreakLines,
    };

    enum ValueSource
    {
      ValueAttribute,
      ValueZ,
      ValueM,
    };

    enum Result
    {
      Success,
      Canceled,
      InvalidSource,
      FeatureGeometryError,
    };

    struct LayerData
    {
      QgsFeatureSource *source;
      QgsInterpolator::ValueSource valueSource;
      int interpolationAttribute;
      QgsInterpolator::SourceType sourceType;

      QgsCoordinateTransformContext transformContext;
    };

    QgsInterpolator( const QList<QgsInterpolator::LayerData> &layerData );

    virtual ~QgsInterpolator();

    virtual int interpolatePoint( double x, double y, double &result /Out/, QgsFeedback *feedback = 0 ) = 0;
%Docstring
Calculates interpolation value for map coordinates x, y

:param x: x-coordinate (in map units)
:param y: y-coordinate (in map units)
:param feedback: optional feedback object for progress and cancellation support

:return: - 0 in case of success
         - result: interpolation result
%End


  protected:

    Result cacheBaseData( QgsFeedback *feedback = 0 );
%Docstring
Caches the vertex and value data from the provider. All the vertex data
will be held in virtual memory.

An optional ``feedback`` argument may be specified to allow cancellation and
progress reports from the cache operation.

:return: Success in case of success
%End




};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/analysis/interpolation/qgsinterpolator.h                         *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/