QGIS API Documentation 3.99.0-Master (a8f284845db)
Loading...
Searching...
No Matches
qgsrasterlayerutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsrasterlayerutils.h
3 -------------------------
4 begin : March 2024
5 copyright : (C) 2024 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSRASTERLAYERUTILS_H
19#define QGSRASTERLAYERUTILS_H
20
21#include "qgis_core.h"
22#include "qgis_sip.h"
23#include "qgspointxy.h"
24#include "qgsrange.h"
25
26class QgsRasterLayer;
29class QgsRectangle;
30
38class CORE_EXPORT QgsRasterLayerUtils
39{
40 public:
41
55 QgsRasterLayer *layer,
56 const QgsDateTimeRange &temporalRange,
57 const QgsDoubleRange &elevationRange,
58 bool &matched SIP_OUT );
59
66 static void computeMinMax( QgsRasterDataProvider *provider,
67 int band,
68 const QgsRasterMinMaxOrigin &mmo,
70 const QgsRectangle &extent,
71 int sampleSize,
72 double &min SIP_OUT,
73 double &max SIP_OUT );
74
85 static QgsRectangle alignRasterExtent( const QgsRectangle &extent, const QgsPointXY &origin, double pixelSizeX, double pixelSizeY );
86
87};
88
89#endif //QGSRASTERLAYERUTILS_H
RasterRangeLimit
Describes the limits used to compute raster ranges (min/max values).
Definition qgis.h:1617
QgsRange which stores a range of double values.
Definition qgsrange.h:236
Represents a 2D point.
Definition qgspointxy.h:62
Base class for raster data providers.
Contains utility functions for working with raster layers.
static void computeMinMax(QgsRasterDataProvider *provider, int band, const QgsRasterMinMaxOrigin &mmo, Qgis::RasterRangeLimit limits, const QgsRectangle &extent, int sampleSize, double &min, double &max)
Compute the min max values for provider along band according to MinMaxOrigin parameters mmo and exten...
static int renderedBandForElevationAndTemporalRange(QgsRasterLayer *layer, const QgsDateTimeRange &temporalRange, const QgsDoubleRange &elevationRange, bool &matched)
Given a raster layer, returns the band which should be used for rendering the layer for a specified t...
static QgsRectangle alignRasterExtent(const QgsRectangle &extent, const QgsPointXY &origin, double pixelSizeX, double pixelSizeY)
Returns a new extent that includes the given extent with corners coordinates aligned to the pixel gri...
Represents a raster layer.
Describes the origin of minimum and maximum values in a raster.
A rectangle specified with double values.
#define SIP_OUT
Definition qgis_sip.h:57
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.
Definition qgsrange.h:764