15 #ifndef QGSHEATMAPRENDERER_H 16 #define QGSHEATMAPRENDERER_H 24 #include <QScopedPointer> 92 double radius()
const {
return mRadius; }
99 void setRadius(
const double radius ) { mRadius = radius; }
177 double mCalculatedMaxValue;
181 double mRadiusSquared;
185 QString mWeightExpressionString;
195 int mFeaturesRendered;
197 double uniformKernel(
const double distance,
const int bandwidth )
const;
198 double quarticKernel(
const double distance,
const int bandwidth )
const;
199 double triweightKernel(
const double distance,
const int bandwidth )
const;
200 double epanechnikovKernel(
const double distance,
const int bandwidth )
const;
201 double triangularKernel(
const double distance,
const int bandwidth )
const;
209 #endif // QGSHEATMAPRENDERER_H void setInvertRamp(const bool invert)
Sets whether the ramp is inverted.
A rectangle specified with double values.
OutputUnit
The unit of the output.
double renderQuality() const
Returns the render quality used for drawing the heatmap.
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.
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.
virtual QList< QString > usedAttributes()=0
Returns a set of attributes required for this renderer.
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
Needs to be called when a new render cycle is started.
QgsVectorColorRampV2 * colorRamp() const
Returns the color ramp used for shading the heatmap.
virtual void stopRender(QgsRenderContext &context)=0
Needs to be called when a render cycle has finished to clean up.
virtual bool renderFeature(QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false)
Render a feature using this renderer in the given context.
virtual QgsFeatureRendererV2 * clone() const =0
bool invertRamp() const
Returns whether the ramp is inverted.
virtual Q_DECL_DEPRECATED QgsSymbolV2 * symbolForFeature(QgsFeature &feature)
To be overridden.
virtual QString dump() const
for debugging
A renderer which draws points as a live heatmap.
void setRadiusMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the heatmap's radius.
double radius() const
Returns the radius for the heatmap.
const QgsMapUnitScale & radiusMapUnitScale() const
Returns the map unit scale used for the heatmap's radius.
QgsSymbolV2::OutputUnit radiusUnit() const
Returns the units used for the heatmap's radius.
virtual Q_DECL_DEPRECATED QgsSymbolV2List symbols()
For symbol levels.
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.
Contains information about the context of a rendering operation.
Struct for storing maximum and minimum scales for measurements in map units.
QString weightExpression() const
Returns the expression used for weighting points when generating the heatmap.
Abstract base class for color ramps.
void setMaximumValue(const double value)
Sets the maximum value used for shading the heatmap.