18#ifndef QGSRASTERVECTORFIELDRENDERER_H
19#define QGSRASTERVECTORFIELDRENDERER_H
51 Qgis::RasterRendererFlags
flags() const override;
56 void writeXml( QDomDocument &doc, QDomElement &parentElem ) const override;
92 bool setDirectionBand(
int band );
113 int xBand()
const {
return mXBand; }
122 bool setXBand(
int band );
129 int yBand()
const {
return mYBand; }
138 bool setYBand(
int band );
192 bool shouldAcceptBand(
int band )
const;
197 int mDirectionBand = 1;
200 double mMinimumMagnitude = std::numeric_limits<double>::quiet_NaN();
201 double mMaximumMagnitude = std::numeric_limits<double>::quiet_NaN();
Provides global constants and enumerations for use throughout the application.
RasterVectorFieldSourceMode
Defines how a raster vector field renderer reads the vectors from the raster bands.
@ CartesianComponents
Two bands holding the x and y components of the vectors.
RasterDirectionEncoding
Schemes used to encode a compass direction as an integer raster value.
@ Esri
Esri: 1=E, 2=SE, 4=S, 8=SW, 16=W, 32=NW, 64=N, 128=NE.
Feedback object tailored for raster block reading.
QgsRasterInterface(QgsRasterInterface *input=nullptr)
virtual QgsRectangle extent() const
Gets the extent of the interface.
virtual QgsRasterInterface * input() const
Current input.
QgsRasterRenderer(QgsRasterInterface *input=nullptr, const QString &type=QString())
Constructor for QgsRasterRenderer.
const QgsRasterRenderer & operator=(const QgsRasterRenderer &)=delete
QgsRasterRenderer cannot be copied. Use clone() instead.
QgsRasterRenderer * clone() const override=0
Clone itself, create deep copy.
Raster renderer which draws a vector field stored in raster bands.
void setMaximumMagnitude(double magnitude)
Sets the magnitude the symbology treats as the largest one of the raster.
void setSettings(const QgsVectorFieldSettings &settings)
Sets the settings used to render the vector field.
void setMinimumMagnitude(double magnitude)
Sets the magnitude the symbology treats as the smallest one of the raster.
QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr) override
Read block of data using given extent and size.
Qgis::RasterRendererFlags flags() const override
Returns flags which dictate renderer behavior.
QgsRasterVectorFieldRenderer(const QgsRasterVectorFieldRenderer &)=delete
QgsRasterVectorFieldRenderer cannot be copied. Use clone() instead.
QgsRasterVectorFieldRenderer(QgsRasterInterface *input)
Creates a vector field renderer.
void setDirectionEncoding(Qgis::RasterDirectionEncoding encoding)
Sets the scheme the directionBand() is coded with.
QList< int > usesBands() const override
Returns a list of band numbers used by the renderer.
QList< QPair< QString, QColor > > legendSymbologyItems() const override
Returns symbology items if provided by renderer.
double maximumMagnitude() const
Returns the magnitude the symbology treats as the largest one of the raster.
int directionBand() const
Returns the band which holds the coded compass directions, used when the sourceMode() is Qgis::Raster...
int xBand() const
Returns the band which holds the x component of the vectors.
~QgsRasterVectorFieldRenderer() override
void writeXml(QDomDocument &doc, QDomElement &parentElem) const override
Write base class members to xml.
static std::unique_ptr< QgsRasterRenderer > create(const QDomElement &elem, QgsRasterInterface *input)
Creates an instance of the renderer based on definition from XML (used by renderer registry).
const QgsRasterVectorFieldRenderer & operator=(const QgsRasterVectorFieldRenderer &)=delete
QgsRasterVectorFieldRenderer cannot be copied. Use clone() instead.
void setSourceMode(Qgis::RasterVectorFieldSourceMode mode)
Sets the way the vectors are stored in the raster bands.
double minimumMagnitude() const
Returns the magnitude the symbology treats as the smallest one of the raster.
QgsVectorFieldSettings settings() const
Returns the settings used to render the vector field.
Qgis::RasterDirectionEncoding directionEncoding() const
Returns the scheme the directionBand() is coded with.
int yBand() const
Returns the band which holds the y component of the vectors.
Qgis::RasterVectorFieldSourceMode sourceMode() const
Returns the way the vectors are stored in the raster bands.
A rectangle specified with double values.
Represents a renderer settings for vector datasets.