|
QGIS API Documentation 4.3.0-Master (dfb0041329c)
|
Abstract source of vector (u/v) values sampled at arbitrary map positions. More...
#include <qgsvectorfieldvaluesource.h>
Public Member Functions | |
| QgsVectorFieldValueSource ()=default | |
| virtual | ~QgsVectorFieldValueSource () |
| virtual QgsVectorFieldValueSource * | clone () const =0 |
| Returns a copy of this source. | |
| virtual QgsRectangle | extent () const =0 |
| Returns the extent of the data, in map coordinates. | |
| virtual std::unique_ptr< QgsRasterInterface > | magnitudeSource (const QgsRenderContext &context, QSize size) const |
Returns a raster interface exposing the magnitude of the vector field as a single band, used to build the color ramp background image of streamlines, or nullptr if the source cannot provide one. | |
| virtual double | maximumMagnitude () const =0 |
| Returns the maximum magnitude over the whole data. | |
| virtual QVector< QgsPointXY > | seedPoints (const QgsRectangle &extent) const |
| Returns the natural seeding positions of the data within extent, in map coordinates. | |
| virtual QgsVector | vectorValue (const QgsPointXY &point) const =0 |
| Returns the vector value at point, expressed in map coordinates. | |
Abstract source of vector (u/v) values sampled at arbitrary map positions.
This is the data abstraction used by the streamline and particle trace symbologies of QgsVectorFieldEngine, which walk the vector field rather than being handed one value at a time. Implementations exist for mesh layers (interpolating from vertices or faces) and for raster layers (sampling two bands).
Definition at line 47 of file qgsvectorfieldvaluesource.h.
|
default |
|
virtualdefault |
|
pure virtual |
Returns a copy of this source.
|
pure virtual |
Returns the extent of the data, in map coordinates.
|
virtual |
Returns a raster interface exposing the magnitude of the vector field as a single band, used to build the color ramp background image of streamlines, or nullptr if the source cannot provide one.
context is a render context whose map to pixel is set to the field, and size is the size in pixels of the image which will be requested from the returned interface.
Definition at line 28 of file qgsvectorfieldvaluesource.cpp.
|
pure virtual |
Returns the maximum magnitude over the whole data.
This is used to nondimensionalize the time a trace spends in a field pixel, so it must be stable for the whole rendering, not recomputed per tile or per extent.
|
virtual |
Returns the natural seeding positions of the data within extent, in map coordinates.
These are the mesh vertices for a mesh source, or the pixel centers for a raster one. The default implementation returns an empty list, for sources which have no natural seeding positions.
Definition at line 22 of file qgsvectorfieldvaluesource.cpp.
|
pure virtual |
Returns the vector value at point, expressed in map coordinates.
Returns a vector with NaN components when no data is available at that position, which is how the callers detect that a trace has left the data.