15 #ifndef QGSHEATMAPRENDERER_H
16 #define QGSHEATMAPRENDERER_H
24 #include <QScopedPointer>
89 double radius()
const {
return mRadius; }
96 void setRadius(
const double radius ) { mRadius = radius; }
174 double mCalculatedMaxValue;
178 double mRadiusSquared;
182 QString mWeightExpressionString;
192 int mFeaturesRendered;
194 double uniformKernel(
const double distance,
const int bandwidth )
const;
195 double quarticKernel(
const double distance,
const int bandwidth )
const;
196 double triweightKernel(
const double distance,
const int bandwidth )
const;
197 double epanechnikovKernel(
const double distance,
const int bandwidth )
const;
198 double triangularKernel(
const double distance,
const int bandwidth )
const;
206 #endif // QGSHEATMAPRENDERER_H
void setInvertRamp(const bool invert)
Sets whether the ramp is inverted.
A rectangle specified with double values.
virtual QString dump() const
for debugging
virtual QDomElement save(QDomDocument &doc)
store renderer info to XML element
virtual void modifyRequestExtent(QgsRectangle &extent, QgsRenderContext &context)
Allows for a renderer to modify the extent of a feature request prior to rendering.
QgsSymbolV2::OutputUnit radiusUnit() const
Returns the units used for the heatmap's radius.
double maximumValue() const
Returns the maximum value used for shading the heatmap.
Container of fields for a vector layer.
A geometry is the spatial representation of a feature.
void setWeightExpression(const QString &expression)
Sets the expression used for weighting points when generating the heatmap.
QgsVectorColorRampV2 * colorRamp() const
Returns the color ramp used for shading the heatmap.
virtual QList< QString > usedAttributes()=0
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
void setRadiusUnit(const QgsSymbolV2::OutputUnit unit)
Sets the units used for the heatmap's radius.
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)=0
virtual void stopRender(QgsRenderContext &context)=0
virtual QgsSymbolV2List symbols()=0
for symbol levels
virtual bool renderFeature(QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false)
virtual QgsFeatureRendererV2 * clone() const =0
A renderer which draws points as a live heatmap.
const QgsMapUnitScale & radiusMapUnitScale() const
Returns the map unit scale used for the heatmap's radius.
double radius() const
Returns the radius for the heatmap.
void setRadiusMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the heatmap's radius.
void setRenderQuality(const int quality)
Sets the render quality used for drawing the heatmap.
void setRadius(const double radius)
Sets the radius for the heatmap.
double renderQuality() const
Returns the render quality used for drawing the heatmap.
Contains information about the context of a rendering operation.
double invertRamp() const
Returns whether the ramp is inverted.
virtual QgsSymbolV2 * symbolForFeature(QgsFeature &feature)=0
to be overridden
QString weightExpression() const
Returns the expression used for weighting points when generating the heatmap.
void setMaximumValue(const double value)
Sets the maximum value used for shading the heatmap.