/
qgskde.sip
140 lines (114 loc) · 3.41 KB
/
qgskde.sip
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgskde.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsKernelDensityEstimation
{
%Docstring
Performs Kernel Density Estimation ("heatmap") calculations on a vector layer.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgskde.h"
%End
public:
enum KernelShape
{
KernelQuartic,
KernelTriangular,
KernelUniform,
KernelTriweight,
KernelEpanechnikov,
};
enum OutputValues
{
OutputRaw,
OutputScaled,
};
enum Result
{
Success,
DriverError,
InvalidParameters,
FileCreationError,
RasterIoError,
};
struct Parameters
{
QgsFeatureSource *source;
%Docstring
Point feature source
%End
double radius;
%Docstring
Fixed radius, in map units
%End
QString radiusField;
%Docstring
Field for radius, or empty if using a fixed radius
%End
QString weightField;
%Docstring
Field name for weighting field, or empty if not using weights
%End
double pixelSize;
%Docstring
Size of pixel in output file
%End
QgsKernelDensityEstimation::KernelShape shape;
%Docstring
Kernel shape
%End
double decayRatio;
%Docstring
Decay ratio (Triangular kernels only)
%End
QgsKernelDensityEstimation::OutputValues outputValues;
%Docstring
Type of output value
%End
};
QgsKernelDensityEstimation( const Parameters ¶meters, const QString &outputFile, const QString &outputFormat );
%Docstring
Constructor for QgsKernelDensityEstimation. Requires a Parameters object specifying the options to use
to generate the surface. The output path and file format are also required.
%End
Result run();
%Docstring
Runs the KDE calculation across the whole layer at once. Either call this method, or manually
call run(), addFeature() and finalise() separately.
:rtype: Result
%End
Result prepare();
%Docstring
Prepares the output file for writing and setups up the surface calculation. This must be called
before adding features via addFeature().
.. seealso:: addFeature()
.. seealso:: finalise()
:rtype: Result
%End
Result addFeature( const QgsFeature &feature );
%Docstring
Adds a single feature to the KDE surface. prepare() must be called before adding features.
.. seealso:: prepare()
.. seealso:: finalise()
:rtype: Result
%End
Result finalise();
%Docstring
Finalises the output file. Must be called after adding all features via addFeature().
.. seealso:: prepare()
.. seealso:: addFeature()
:rtype: Result
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgskde.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/