QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
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:
53 static int renderedBandForElevationAndTemporalRange( QgsRasterLayer *layer, const QgsDateTimeRange &temporalRange, const QgsDoubleRange &elevationRange, bool &matched SIP_OUT );
54
61 static void computeMinMax(
62 QgsRasterDataProvider *provider, int band, const QgsRasterMinMaxOrigin &mmo, Qgis::RasterRangeLimit limits, const QgsRectangle &extent, int sampleSize, double &min SIP_OUT, double &max SIP_OUT
63 );
64
75 static QgsRectangle alignRasterExtent( const QgsRectangle &extent, const QgsPointXY &origin, double pixelSizeX, double pixelSizeY );
76};
77
78#endif //QGSRASTERLAYERUTILS_H
RasterRangeLimit
Describes the limits used to compute raster ranges (min/max values).
Definition qgis.h:1623
QgsRange which stores a range of double values.
Definition qgsrange.h:217
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:705