QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
15 #ifndef QGSHEATMAPRENDERER_H
16 #define QGSHEATMAPRENDERER_H
18 #include "qgis_core.h"
54 QString
dump()
const override;
89 double radius()
const {
return mRadius; }
98 void setRadius(
const double radius ) { mRadius = radius; }
184 QVector<double> mValues;
186 double mCalculatedMaxValue = 0;
189 int mRadiusPixels = 0;
190 double mRadiusSquared = 0;
194 QString mWeightExpressionString;
195 int mWeightAttrNum = -1;
196 std::unique_ptr<QgsExpression> mWeightExpression;
200 double mExplicitMax = 0.0;
201 int mRenderQuality = 3;
203 int mFeaturesRendered = 0;
205 double uniformKernel(
double distance,
int bandwidth )
const;
206 double quarticKernel(
double distance,
int bandwidth )
const;
207 double triweightKernel(
double distance,
int bandwidth )
const;
208 double epanechnikovKernel(
double distance,
int bandwidth )
const;
209 double triangularKernel(
double distance,
int bandwidth )
const;
217 #endif // QGSHEATMAPRENDERER_H
Abstract base class for color ramps.
RenderUnit
Rendering size units.
The class is used as a container of context for various read/write operations on other objects.
QString weightExpression() const
Returns the expression used for weighting points when generating the heatmap.
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
QgsUnitTypes::RenderUnit radiusUnit() const
Returns the units used for the heatmap's radius.
Container of fields for a vector layer.
Contains information about the context of a rendering operation.
A renderer which draws points as a live heatmap.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const =0
Returns a list of attributes required by this renderer.
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
@ RenderMillimeters
Millimeters.
Abstract base class for all rendered symbols.
void setRadius(const double radius)
Sets the radius for the heatmap.
void setRadiusUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units used for the heatmap's radius.
A rectangle specified with double values.
QVector< QgsPointXY > QgsMultiPointXY
A collection of QgsPoints that share a common collection of attributes.
void setMaximumValue(const double value)
Sets the maximum value used for shading the heatmap.
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context)
Stores renderer properties to an XML element.
Custom exception class for Coordinate Reference System related exceptions.
double renderQuality() const
Returns the render quality used for drawing the heatmap.
void setWeightExpression(const QString &expression)
Sets the expression used for weighting points when generating the heatmap.
QList< QgsSymbol * > QgsSymbolList
QgsColorRamp * colorRamp() const
Returns the color ramp used for shading the heatmap.
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
void setRenderQuality(const int quality)
Sets the render quality used for drawing the heatmap.
virtual QgsSymbolList symbols(QgsRenderContext &context) const
Returns list of symbols used by the renderer.
double maximumValue() const
Returns the maximum value used for shading the heatmap.
virtual QgsSymbol * symbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const =0
To be overridden.
Struct for storing maximum and minimum scales for measurements in map units.
virtual void modifyRequestExtent(QgsRectangle &extent, QgsRenderContext &context)
Allows for a renderer to modify the extent of a feature request prior to rendering.
A geometry is the spatial representation of a feature.
virtual bool renderFeature(const QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false) SIP_THROW(QgsCsException)
Render a feature using this renderer in the given context.
void setRadiusMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the heatmap's radius.
virtual QString dump() const
Returns debug information about this renderer.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
double radius() const
Returns the radius for the heatmap.
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)
Must be called when a new render cycle is started.
const QgsMapUnitScale & radiusMapUnitScale() const
Returns the map unit scale used for the heatmap's radius.