QGIS API Documentation
3.6.0-Noosa (5873452)
|
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. More... | |
QgsRasterRange (double min, double max, BoundsType bounds=IncludeMinAndMax) | |
Constructor for a range with the given min and max values. More... | |
QString | asText () const |
Returns a text representation of the range. More... | |
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. More... | |
bool | contains (double value) const |
Returns true if this range contains the specified value. More... | |
double | max () const |
Returns the maximum value for the range. More... | |
double | min () const |
Returns the minimum value for the range. More... | |
bool | operator== (const QgsRasterRange &o) const |
bool | overlaps (const QgsRasterRange &other) const |
Returns true if this range overlaps another range. More... | |
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. More... | |
double | setMax (double max) |
Sets the maximum value for the range. More... | |
double | setMin (double min) |
Sets the minimum value for the range. More... | |
Static Public Member Functions | |
static bool | contains (double value, const QgsRasterRangeList &rangeList) |
Tests if a value is within the list of ranges. More... | |
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 |
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 |