121 lines
3.3 KiB
Plaintext
Raw Normal View History

2017-06-21 09:55:29 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgskde.h *
* *
2024-08-11 07:55:04 +10:00
* Do not edit manually ! Edit header and run scripts/sipify.py again *
2017-06-21 09:55:29 +02:00
************************************************************************/
class QgsKernelDensityEstimation
{
2021-03-22 21:13:52 +01:00
%Docstring(signature="appended")
2017-12-15 10:36:55 -04:00
Performs Kernel Density Estimation ("heatmap") calculations on a vector layer.
%End
2017-06-21 09:55:29 +02:00
%TypeHeaderCode
#include "qgskde.h"
%End
public:
enum KernelShape
{
2017-06-21 09:55:29 +02:00
KernelQuartic,
KernelTriangular,
KernelUniform,
KernelTriweight,
KernelEpanechnikov,
};
enum OutputValues
{
2017-06-21 09:55:29 +02:00
OutputRaw,
OutputScaled,
};
enum Result
{
2017-06-21 09:55:29 +02:00
Success,
DriverError,
InvalidParameters,
FileCreationError,
RasterIoError,
};
struct Parameters
{
QgsFeatureSource *source;
double radius;
QString radiusField;
QString weightField;
double pixelSize;
QgsKernelDensityEstimation::KernelShape shape;
double decayRatio;
QgsKernelDensityEstimation::OutputValues outputValues;
};
QgsKernelDensityEstimation( const Parameters &parameters, const QString &outputFile, const QString &outputFormat );
2017-06-21 09:55:29 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-06-21 09:55:29 +02:00
%End
2017-10-24 10:03:59 +10:00
Result run();
2017-06-21 09:55:29 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Runs the KDE calculation across the whole layer at once. Either call this method, or manually
call :py:func:`~QgsKernelDensityEstimation.run`, :py:func:`~QgsKernelDensityEstimation.addFeature` and :py:func:`~QgsKernelDensityEstimation.finalise` separately.
2017-06-21 09:55:29 +02:00
%End
Result prepare();
2017-06-21 09:55:29 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Prepares the output file for writing and setups up the surface calculation. This must be called
before adding features via :py:func:`~QgsKernelDensityEstimation.addFeature`.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`addFeature`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`finalise`
2017-06-21 09:55:29 +02:00
%End
Result addFeature( const QgsFeature &feature );
2017-06-21 09:55:29 +02:00
%Docstring
Adds a single feature to the KDE surface. :py:func:`~QgsKernelDensityEstimation.prepare` must be called before adding features.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`prepare`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`finalise`
2017-06-21 09:55:29 +02:00
%End
Result finalise();
2017-06-21 09:55:29 +02:00
%Docstring
Finalises the output file. Must be called after adding all features via :py:func:`~QgsKernelDensityEstimation.addFeature`.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`prepare`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`addFeature`
2017-06-21 09:55:29 +02:00
%End
2017-10-24 10:03:59 +10:00
private:
QgsKernelDensityEstimation( const QgsKernelDensityEstimation &other );
};
2017-06-21 09:55:29 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/analysis/raster/qgskde.h *
* *
2024-08-11 07:55:04 +10:00
* Do not edit manually ! Edit header and run scripts/sipify.py again *
2017-06-21 09:55:29 +02:00
************************************************************************/