QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Raster values range container. More...
#include <qgsrasterrange.h>
Public Types | |
enum | BoundsType { IncludeMinAndMax = 0 , IncludeMax , IncludeMin , Exclusive } |
Handling for min and max bounds. More... | |
Public Member Functions | |
QgsRasterRange ()=default | |
Default constructor, both min and max value for the range will be set to NaN. | |
QgsRasterRange (double min, double max, BoundsType bounds=IncludeMinAndMax) | |
Constructor for a range with the given min and max values. | |
QString | asText () const |
Returns a text representation of the range. | |
BoundsType | bounds () const |
Returns the bounds type for the range, which specifies whether or not the min and max values themselves are included in the range. | |
bool | contains (double value) const |
Returns true if this range contains the specified value. | |
double | max () const |
Returns the maximum value for the range. | |
double | min () const |
Returns the minimum value for the range. | |
bool | operator== (const QgsRasterRange &o) const |
bool | overlaps (const QgsRasterRange &other) const |
Returns true if this range overlaps another range. | |
void | setBounds (BoundsType type) |
Sets the bounds type for the range, which specifies whether or not the min and max values themselves are included in the range. | |
double | setMax (double max) |
Sets the maximum value for the range. | |
double | setMin (double min) |
Sets the minimum value for the range. | |
Static Public Member Functions | |
static bool | contains (double value, const QgsRasterRangeList &rangeList) |
Tests if a value is within the list of ranges. | |
Raster values range container.
Represents range of values between min and max including min and max value.
Definition at line 35 of file qgsrasterrange.h.
Handling for min and max bounds.
Definition at line 40 of file qgsrasterrange.h.
|
default |
Default constructor, both min and max value for the range will be set to NaN.
QgsRasterRange::QgsRasterRange | ( | double | min, |
double | max, | ||
BoundsType | bounds = IncludeMinAndMax |
||
) |
Constructor for a range with the given min and max values.
The bounds argument dictates how the min and max value themselves will be handled by the range.
Definition at line 20 of file qgsrasterrange.cpp.
QString QgsRasterRange::asText | ( | ) | const |
Returns a text representation of the range.
Definition at line 68 of file qgsrasterrange.cpp.
|
inline |
Returns the bounds type for the range, which specifies whether or not the min and max values themselves are included in the range.
Definition at line 80 of file qgsrasterrange.h.
|
inline |
Returns true
if this range contains the specified value.
Definition at line 114 of file qgsrasterrange.h.
|
inlinestatic |
Tests if a value is within the list of ranges.
value | value |
rangeList | list of ranges |
true
if value is in at least one of ranges Definition at line 131 of file qgsrasterrange.h.
|
inline |
Returns the maximum value for the range.
Definition at line 71 of file qgsrasterrange.h.
|
inline |
Returns the minimum value for the range.
Definition at line 65 of file qgsrasterrange.h.
|
inline |
Definition at line 103 of file qgsrasterrange.h.
bool QgsRasterRange::overlaps | ( | const QgsRasterRange & | other | ) | const |
Returns true
if this range overlaps another range.
Definition at line 27 of file qgsrasterrange.cpp.
|
inline |
Sets the bounds type for the range, which specifies whether or not the min and max values themselves are included in the range.
Definition at line 101 of file qgsrasterrange.h.
|
inline |
|
inline |