QGIS API Documentation
3.0.2-Girona (307d082)
|
Performs Kernel Density Estimation ("heatmap") calculations on a vector layer. More...
#include <qgskde.h>
Classes | |
struct | Parameters |
KDE parameters. More... | |
Public Types | |
enum | KernelShape { KernelQuartic = 0, KernelTriangular, KernelUniform, KernelTriweight, KernelEpanechnikov } |
Kernel shape type. More... | |
enum | OutputValues { OutputRaw = 0, OutputScaled } |
Output values type. More... | |
enum | Result { Success, DriverError, InvalidParameters, FileCreationError, RasterIoError } |
Result of operation. More... | |
Public Member Functions | |
QgsKernelDensityEstimation (const Parameters ¶meters, const QString &outputFile, const QString &outputFormat) | |
Constructor for QgsKernelDensityEstimation. More... | |
QgsKernelDensityEstimation (const QgsKernelDensityEstimation &other)=delete | |
QgsKernelDensityEstimation cannot be copied. More... | |
Result | addFeature (const QgsFeature &feature) |
Adds a single feature to the KDE surface. More... | |
Result | finalise () |
Finalises the output file. More... | |
QgsKernelDensityEstimation & | operator= (const QgsKernelDensityEstimation &other)=delete |
QgsKernelDensityEstimation cannot be copied. More... | |
Result | prepare () |
Prepares the output file for writing and setups up the surface calculation. More... | |
Result | run () |
Runs the KDE calculation across the whole layer at once. More... | |
Performs Kernel Density Estimation ("heatmap") calculations on a vector layer.
QgsKernelDensityEstimation::QgsKernelDensityEstimation | ( | const Parameters & | parameters, |
const QString & | outputFile, | ||
const QString & | outputFormat | ||
) |
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.
Definition at line 23 of file qgskde.cpp.
|
delete |
QgsKernelDensityEstimation cannot be copied.
QgsKernelDensityEstimation::Result QgsKernelDensityEstimation::addFeature | ( | const QgsFeature & | feature | ) |
Adds a single feature to the KDE surface.
prepare() must be called before adding features.
Definition at line 107 of file qgskde.cpp.
QgsKernelDensityEstimation::Result QgsKernelDensityEstimation::finalise | ( | ) |
Finalises the output file.
Must be called after adding all features via addFeature().
Definition at line 208 of file qgskde.cpp.
|
delete |
QgsKernelDensityEstimation cannot be copied.
QgsKernelDensityEstimation::Result QgsKernelDensityEstimation::prepare | ( | ) |
Prepares the output file for writing and setups up the surface calculation.
This must be called before adding features via addFeature().
Definition at line 69 of file qgskde.cpp.
QgsKernelDensityEstimation::Result QgsKernelDensityEstimation::run | ( | ) |
Runs the KDE calculation across the whole layer at once.
Either call this method, or manually call run(), addFeature() and finalise() separately.
Definition at line 44 of file qgskde.cpp.