2017-06-02 23:35:10 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgsrasterrange.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-10 18:58:19 +02:00
|
|
|
typedef QList<QgsRasterRange> QgsRasterRangeList;
|
|
|
|
|
|
|
|
class QgsRasterRange
|
|
|
|
{
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Raster values range container. Represents range of values between min and max
|
|
|
|
including min and max value.
|
2013-04-10 18:58:19 +02:00
|
|
|
%End
|
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsrasterrange.h"
|
|
|
|
%End
|
2013-04-10 18:58:19 +02:00
|
|
|
public:
|
2017-06-02 23:35:10 +02:00
|
|
|
|
2018-06-07 11:38:45 +10:00
|
|
|
enum BoundsType
|
|
|
|
{
|
|
|
|
IncludeMinAndMax,
|
|
|
|
IncludeMax,
|
|
|
|
IncludeMin,
|
|
|
|
Exclusive,
|
|
|
|
};
|
|
|
|
|
2013-04-10 18:58:19 +02:00
|
|
|
QgsRasterRange();
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2018-06-07 10:03:54 +10:00
|
|
|
Default constructor, both min and max value for the range will be set to NaN.
|
2017-06-02 23:35:10 +02:00
|
|
|
%End
|
2013-09-17 12:33:57 +02:00
|
|
|
|
2018-06-07 11:38:45 +10:00
|
|
|
QgsRasterRange( double min, double max, BoundsType bounds = IncludeMinAndMax );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2018-06-07 10:03:54 +10:00
|
|
|
Constructor for a range with the given ``min`` and ``max`` values.
|
2018-06-07 11:38:45 +10:00
|
|
|
|
|
|
|
The ``bounds`` argument dictates how the min and max value themselves
|
|
|
|
will be handled by the range.
|
2017-06-02 23:35:10 +02:00
|
|
|
%End
|
2013-09-17 12:33:57 +02:00
|
|
|
|
2013-04-10 18:58:19 +02:00
|
|
|
double min() const;
|
2018-06-07 10:03:54 +10:00
|
|
|
%Docstring
|
|
|
|
Returns the minimum value for the range.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setMin`
|
|
|
|
%End
|
|
|
|
|
2013-04-10 18:58:19 +02:00
|
|
|
double max() const;
|
2018-06-07 10:03:54 +10:00
|
|
|
%Docstring
|
|
|
|
Returns the maximum value for the range.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setMax`
|
2018-06-07 11:38:45 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
BoundsType bounds() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the bounds type for the range, which specifies
|
|
|
|
whether or not the min and max values themselves are included
|
|
|
|
in the range.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setBounds`
|
|
|
|
|
|
|
|
.. versionadded:: 3.4
|
2018-06-07 10:03:54 +10:00
|
|
|
%End
|
2013-09-17 12:33:57 +02:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
double setMin( double min );
|
2018-06-07 10:03:54 +10:00
|
|
|
%Docstring
|
|
|
|
Sets the minimum value for the range.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`min`
|
|
|
|
%End
|
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
double setMax( double max );
|
2018-06-07 10:03:54 +10:00
|
|
|
%Docstring
|
|
|
|
Sets the maximum value for the range.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`max`
|
2018-06-07 11:38:45 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setBounds( BoundsType type );
|
|
|
|
%Docstring
|
|
|
|
Setss the bounds ``type`` for the range, which specifies
|
|
|
|
whether or not the min and max values themselves are included
|
|
|
|
in the range.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`bounds`
|
|
|
|
|
|
|
|
.. versionadded:: 3.4
|
2018-06-07 10:03:54 +10:00
|
|
|
%End
|
2013-09-17 12:33:57 +02:00
|
|
|
|
2016-02-02 19:46:18 +11:00
|
|
|
bool operator==( QgsRasterRange o ) const;
|
2013-04-10 18:58:19 +02:00
|
|
|
|
2018-06-07 10:23:18 +10:00
|
|
|
static bool contains( double value, const QgsRasterRangeList &rangeList );
|
|
|
|
%Docstring
|
|
|
|
Tests if a ``value`` is within the list of ranges
|
|
|
|
|
|
|
|
:param value: value
|
|
|
|
:param rangeList: list of ranges
|
|
|
|
|
|
|
|
:return: true if value is in at least one of ranges
|
|
|
|
%End
|
2017-06-02 23:35:10 +02:00
|
|
|
|
2013-04-10 18:58:19 +02:00
|
|
|
};
|
2017-06-02 23:35:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgsrasterrange.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|