QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsrasterdataprovider.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterdataprovider.h - DataProvider Interface for raster layers
3  --------------------------------------
4  Date : Mar 11, 2005
5  Copyright : (C) 2005 by Brendan Morley
6  email : morb at ozemail dot com dot au
7 
8  async legend fetcher : Sandro Santilli < strk at keybit dot net >
9 
10  ***************************************************************************/
11 
12 /***************************************************************************
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  ***************************************************************************/
20 
21 /* Thank you to Marco Hugentobler for the original vector DataProvider */
22 
23 #ifndef QGSRASTERDATAPROVIDER_H
24 #define QGSRASTERDATAPROVIDER_H
25 
26 #include "qgis_core.h"
27 #include "qgis_sip.h"
28 #include <cmath>
29 
30 #include <QDateTime>
31 #include <QVariant>
32 #include <QImage>
33 
34 #include "qgscolorrampshader.h"
35 #include "qgsdataprovider.h"
36 #include "qgsraster.h"
37 #include "qgsfields.h"
38 #include "qgsrasterinterface.h"
39 #include "qgsrasterpyramid.h"
40 #include "qgsrasterrange.h"
41 #include "qgsrectangle.h"
42 #include "qgsrasteriterator.h"
44 
45 class QImage;
46 class QByteArray;
47 
48 class QgsPointXY;
50 class QgsMapSettings;
51 
57 class CORE_EXPORT QgsImageFetcher : public QObject
58 {
59  Q_OBJECT
60  public:
62  QgsImageFetcher( QObject *parent = nullptr ) : QObject( parent ) {}
63 
68  virtual void start() = 0;
69 
70  signals:
71 
76  void finish( const QImage &legend );
78  void progress( qint64 received, qint64 total );
80  void error( const QString &msg );
81 };
82 
83 
88 class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRasterInterface
89 {
90  Q_OBJECT
91 
92  public:
93 
99  {
100  NoProviderCapabilities = 0,
101  ReadLayerMetadata = 1 << 1,
102  WriteLayerMetadata = 1 << 2,
103  ProviderHintBenefitsFromResampling = 1 << 3,
104  ProviderHintCanPerformProviderResampling = 1 << 4
105  };
106 
108  Q_DECLARE_FLAGS( ProviderCapabilities, ProviderCapability )
109 
111 
120  QgsRasterDataProvider( const QString &uri,
122  QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
123 
124  QgsRasterDataProvider *clone() const override = 0;
125 
130  virtual QgsRasterDataProvider::ProviderCapabilities providerCapabilities() const;
131 
132  /* It makes no sense to set input on provider */
133  bool setInput( QgsRasterInterface *input ) override { Q_UNUSED( input ) return false; }
134 
135  QgsRectangle extent() const override = 0;
136 
138  Qgis::DataType dataType( int bandNo ) const override = 0;
139 
145  virtual QgsFields fields() const { return QgsFields(); };
146 
151  Qgis::DataType sourceDataType( int bandNo ) const override = 0;
152 
154  virtual int colorInterpretation( int bandNo ) const
155  {
156  Q_UNUSED( bandNo )
158  }
159 
160  QString colorName( int colorInterpretation ) const
161  {
162  // Modified copy from GDAL
163  switch ( colorInterpretation )
164  {
166  return QStringLiteral( "Undefined" );
167 
169  return QStringLiteral( "Gray" );
170 
172  return QStringLiteral( "Palette" );
173 
174  case QgsRaster::RedBand:
175  return QStringLiteral( "Red" );
176 
178  return QStringLiteral( "Green" );
179 
180  case QgsRaster::BlueBand:
181  return QStringLiteral( "Blue" );
182 
184  return QStringLiteral( "Alpha" );
185 
186  case QgsRaster::HueBand:
187  return QStringLiteral( "Hue" );
188 
190  return QStringLiteral( "Saturation" );
191 
193  return QStringLiteral( "Lightness" );
194 
195  case QgsRaster::CyanBand:
196  return QStringLiteral( "Cyan" );
197 
199  return QStringLiteral( "Magenta" );
200 
202  return QStringLiteral( "Yellow" );
203 
205  return QStringLiteral( "Black" );
206 
208  return QStringLiteral( "YCbCr_Y" );
209 
211  return QStringLiteral( "YCbCr_Cb" );
212 
214  return QStringLiteral( "YCbCr_Cr" );
215 
216  default:
217  return QStringLiteral( "Unknown" );
218  }
219  }
221  virtual bool reload() { return true; }
222 
223  virtual QString colorInterpretationName( int bandNo ) const
224  {
225  return colorName( colorInterpretation( bandNo ) );
226  }
227 
232  virtual double bandScale( int bandNo ) const { Q_UNUSED( bandNo ) return 1.0; }
233 
238  virtual double bandOffset( int bandNo ) const { Q_UNUSED( bandNo ) return 0.0; }
239 
240  // TODO: remove or make protected all readBlock working with void*
241 
243  QgsRasterBlock *block( int bandNo, const QgsRectangle &boundingBox, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) override SIP_FACTORY;
244 
246  virtual bool sourceHasNoDataValue( int bandNo ) const { return mSrcHasNoDataValue.value( bandNo - 1 ); }
247 
249  virtual bool useSourceNoDataValue( int bandNo ) const { return mUseSrcNoDataValue.value( bandNo - 1 ); }
250 
252  virtual void setUseSourceNoDataValue( int bandNo, bool use );
253 
255  virtual double sourceNoDataValue( int bandNo ) const { return mSrcNoDataValue.value( bandNo - 1 ); }
256 
257  virtual void setUserNoDataValue( int bandNo, const QgsRasterRangeList &noData );
258 
260  virtual QgsRasterRangeList userNoDataValues( int bandNo ) const { return mUserNoDataValue.value( bandNo - 1 ); }
261 
262  virtual QList<QgsColorRampShader::ColorRampItem> colorTable( int bandNo ) const
263  { Q_UNUSED( bandNo ) return QList<QgsColorRampShader::ColorRampItem>(); }
264 
269  QStringList subLayers() const override
270  {
271  return QStringList();
272  }
273 
276 
278  virtual bool supportsLegendGraphic() const { return false; }
279 
291  virtual QImage getLegendGraphic( double scale = 0, bool forceRefresh = false, const QgsRectangle *visibleExtent = nullptr ) SIP_SKIP
292  {
293  Q_UNUSED( scale )
294  Q_UNUSED( forceRefresh )
295  Q_UNUSED( visibleExtent )
296  return QImage();
297  }
298 
313  {
314  Q_UNUSED( mapSettings )
315  return nullptr;
316  }
317 
319  virtual QString buildPyramids( const QList<QgsRasterPyramid> &pyramidList,
320  const QString &resamplingMethod = "NEAREST",
322  const QStringList &configOptions = QStringList(),
323  QgsRasterBlockFeedback *feedback = nullptr )
324  {
325  Q_UNUSED( pyramidList )
326  Q_UNUSED( resamplingMethod )
327  Q_UNUSED( format )
328  Q_UNUSED( configOptions )
329  Q_UNUSED( feedback )
330  return QStringLiteral( "FAILED_NOT_SUPPORTED" );
331  }
332 
341  virtual QList<QgsRasterPyramid> buildPyramidList( QList<int> overviewList = QList<int>() ) // clazy:exclude=function-args-by-ref
342  { Q_UNUSED( overviewList ) return QList<QgsRasterPyramid>(); }
343 
345  bool hasPyramids();
346 
351  virtual QString htmlMetadata() = 0;
352 
377  virtual QgsRasterIdentifyResult identify( const QgsPointXY &point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 );
378 
393  virtual double sample( const QgsPointXY &point, int band,
394  bool *ok SIP_OUT = nullptr,
395  const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 );
396 
405  virtual QString lastErrorTitle() = 0;
406 
416  virtual QString lastError() = 0;
417 
419  virtual QString lastErrorFormat();
420 
422  int dpi() const { return mDpi; }
423 
425  void setDpi( int dpi ) { mDpi = dpi; }
426 
428  QDateTime timestamp() const override { return mTimestamp; }
429 
431  QDateTime dataTimestamp() const override { return QDateTime(); }
432 
439  virtual bool isEditable() const { return false; }
440 
451  virtual bool setEditable( bool enabled ) { Q_UNUSED( enabled ) return false; }
452 
453  // TODO: add data type (may be different from band type)
454 
456  virtual bool write( void *data, int band, int width, int height, int xOffset, int yOffset )
457  {
458  Q_UNUSED( data )
459  Q_UNUSED( band )
460  Q_UNUSED( width )
461  Q_UNUSED( height )
462  Q_UNUSED( xOffset )
463  Q_UNUSED( yOffset )
464  return false;
465  }
466 
483  bool writeBlock( QgsRasterBlock *block, int band, int xOffset = 0, int yOffset = 0 );
484 
486  static QgsRasterDataProvider *create( const QString &providerKey,
487  const QString &uri,
488  const QString &format, int nBands,
489  Qgis::DataType type,
490  int width, int height, double *geoTransform,
492  const QStringList &createOptions = QStringList() );
493 
499  virtual bool setNoDataValue( int bandNo, double noDataValue ) { Q_UNUSED( bandNo ) Q_UNUSED( noDataValue ); return false; }
500 
502  virtual bool remove() { return false; }
503 
508  static QList<QPair<QString, QString> > pyramidResamplingMethods( const QString &providerKey );
509 
515  virtual QString validateCreationOptions( const QStringList &createOptions, const QString &format )
516  { Q_UNUSED( createOptions ) Q_UNUSED( format ); return QString(); }
517 
523  const QStringList &configOptions, const QString &fileFormat )
524  { Q_UNUSED( pyramidsFormat ) Q_UNUSED( configOptions ); Q_UNUSED( fileFormat ); return QString(); }
525 
526  static QString identifyFormatName( QgsRaster::IdentifyFormat format );
527  static QgsRaster::IdentifyFormat identifyFormatFromName( const QString &formatName );
528  static QString identifyFormatLabel( QgsRaster::IdentifyFormat format );
529  static Capability identifyFormatToCapability( QgsRaster::IdentifyFormat format );
530 
537 
544 
553  virtual QList< double > nativeResolutions() const;
554 
561  virtual bool ignoreExtents() const;
562 
568  {
571  };
572 
585  virtual QgsPoint transformCoordinates( const QgsPoint &point, TransformType type );
586 
587 
594  virtual bool enableProviderResampling( bool enable ) { Q_UNUSED( enable ); return false; }
595 
608  bool isProviderResamplingEnabled() const { return mProviderResamplingEnabled; }
609 
614  enum class ResamplingMethod
615  {
616  Nearest,
617  Bilinear,
618  Cubic,
619  };
620 
627  virtual bool setZoomedInResamplingMethod( ResamplingMethod method ) { Q_UNUSED( method ); return false; }
628 
633  ResamplingMethod zoomedInResamplingMethod() const { return mZoomedInResamplingMethod; }
634 
641  virtual bool setZoomedOutResamplingMethod( ResamplingMethod method ) { Q_UNUSED( method ); return false; }
642 
647  ResamplingMethod zoomedOutResamplingMethod() const { return mZoomedOutResamplingMethod; }
648 
655  virtual bool setMaxOversampling( double factor ) { Q_UNUSED( factor ); return false; }
656 
661  double maxOversampling() const { return mMaxOversampling; }
662 
663  void readXml( const QDomElement &filterElem ) override;
664 
665  void writeXml( QDomDocument &doc, QDomElement &parentElem ) const override;
666 
667  signals:
668 
673  void statusChanged( const QString & ) const;
674 
675  protected:
676 
682  virtual bool readBlock( int bandNo, int xBlock, int yBlock, void *data ) SIP_SKIP
683  { Q_UNUSED( bandNo ) Q_UNUSED( xBlock ); Q_UNUSED( yBlock ); Q_UNUSED( data ); return false; }
684 
690  virtual bool readBlock( int bandNo, QgsRectangle const &viewExtent, int width, int height, void *data, QgsRasterBlockFeedback *feedback = nullptr ) SIP_SKIP
691  { Q_UNUSED( bandNo ) Q_UNUSED( viewExtent ); Q_UNUSED( width ); Q_UNUSED( height ); Q_UNUSED( data ); Q_UNUSED( feedback ); return false; }
692 
694  bool userNoDataValuesContains( int bandNo, double value ) const;
695 
697  void copyBaseSettings( const QgsRasterDataProvider &other );
698 
703  int mDpi = -1;
704 
709  //bool hasNoDataValue ( int bandNo );
710 
712  QList<double> mSrcNoDataValue;
713 
715  QList<bool> mSrcHasNoDataValue;
716 
722  QList<bool> mUseSrcNoDataValue;
723 
728  QList< QgsRasterRangeList > mUserNoDataValue;
729 
731 
733  bool mProviderResamplingEnabled = false;
734 
736  ResamplingMethod mZoomedInResamplingMethod = ResamplingMethod::Nearest;
737 
739  ResamplingMethod mZoomedOutResamplingMethod = ResamplingMethod::Nearest;
740 
742  double mMaxOversampling = 2.0;
743 
744  private:
745 
749  std::unique_ptr< QgsRasterDataProviderTemporalCapabilities > mTemporalCapabilities;
750 
751 };
752 
753 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsRasterDataProvider::ProviderCapabilities )
754 
755 // clazy:excludeall=qstring-allocations
756 
757 #endif
QgsRasterDataProvider::lastError
virtual QString lastError()=0
Returns the verbose error text for the last error in this provider.
QgsRaster::YCbCr_YBand
@ YCbCr_YBand
Y Luminance.
Definition: qgsraster.h:51
qgsfields.h
QgsRasterDataProvider::zoomedInResamplingMethod
ResamplingMethod zoomedInResamplingMethod() const
Returns resampling method for zoomed-in operations.
Definition: qgsrasterdataprovider.h:633
QgsRaster::MagentaBand
@ MagentaBand
Magenta band of CMYK image.
Definition: qgsraster.h:48
Qgis::DataType
DataType
Raster data types.
Definition: qgis.h:102
QgsImageFetcher
Handles asynchronous download of images.
Definition: qgsrasterdataprovider.h:58
QgsRasterDataProvider::mSrcNoDataValue
QList< double > mSrcNoDataValue
Source no data value is available and is set to be used or internal no data is available.
Definition: qgsrasterdataprovider.h:712
QgsRasterDataProvider::dataType
Qgis::DataType dataType(int bandNo) const override=0
Returns data type for the band specified by number.
QgsDataProvider::ProviderOptions
Setting options for creating vector data providers.
Definition: qgsdataprovider.h:105
QgsRasterInterface::writeXml
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
Definition: qgsrasterinterface.h:461
QgsDataProvider
Abstract base class for spatial data provider implementations.
Definition: qgsdataprovider.h:42
QgsRasterDataProvider::validateCreationOptions
virtual QString validateCreationOptions(const QStringList &createOptions, const QString &format)
Validates creation options for a specific dataset and destination format.
Definition: qgsrasterdataprovider.h:515
qgsrectangle.h
QgsRasterDataProvider::getLegendGraphic
virtual QImage getLegendGraphic(double scale=0, bool forceRefresh=false, const QgsRectangle *visibleExtent=nullptr)
Returns the legend rendered as pixmap.
Definition: qgsrasterdataprovider.h:291
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:38
QgsRasterDataProvider::dpi
int dpi() const
Returns the dpi of the output device.
Definition: qgsrasterdataprovider.h:422
QgsRasterDataProvider::subLayers
QStringList subLayers() const override
Returns the sublayers of this layer - useful for providers that manage their own layers,...
Definition: qgsrasterdataprovider.h:269
QgsImageFetcher::start
virtual void start()=0
Starts the image download.
QgsRasterDataProvider::useSourceNoDataValue
virtual bool useSourceNoDataValue(int bandNo) const
Returns the source nodata value usage.
Definition: qgsrasterdataprovider.h:249
QgsRaster::AlphaBand
@ AlphaBand
Alpha (0=transparent, 255=opaque)
Definition: qgsraster.h:43
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:51
QgsRasterDataProvider::write
virtual bool write(void *data, int band, int width, int height, int xOffset, int yOffset)
Writes into the provider datasource.
Definition: qgsrasterdataprovider.h:456
QgsRaster::RasterPyramidsFormat
RasterPyramidsFormat
Definition: qgsraster.h:82
QgsRasterDataProvider::dataTimestamp
QDateTime dataTimestamp() const override
Current time stamp of data source.
Definition: qgsrasterdataprovider.h:431
QgsRaster::GreenBand
@ GreenBand
Green band of RGBA image.
Definition: qgsraster.h:41
QgsFields
Container of fields for a vector layer.
Definition: qgsfields.h:45
QgsRasterDataProvider::mSrcHasNoDataValue
QList< bool > mSrcHasNoDataValue
Source no data value exists.
Definition: qgsrasterdataprovider.h:715
QgsRasterDataProvider::extent
QgsRectangle extent() const override=0
Returns the extent of the layer.
QgsRaster::LightnessBand
@ LightnessBand
Lightness band of HLS image.
Definition: qgsraster.h:46
qgscolorrampshader.h
QgsRasterDataProvider::reload
virtual bool reload()
Reload data (data could change)
Definition: qgsrasterdataprovider.h:221
QgsRasterDataProvider::setEditable
virtual bool setEditable(bool enabled)
Turns on/off editing mode of the provider.
Definition: qgsrasterdataprovider.h:451
QgsImageFetcher::QgsImageFetcher
QgsImageFetcher(QObject *parent=nullptr)
Constructor.
Definition: qgsrasterdataprovider.h:62
QgsRasterDataProvider::bandOffset
virtual double bandOffset(int bandNo) const
Read band offset for raster value.
Definition: qgsrasterdataprovider.h:238
QgsRasterDataProvider::enableProviderResampling
virtual bool enableProviderResampling(bool enable)
Enable or disable provider-level resampling.
Definition: qgsrasterdataprovider.h:594
QgsRaster::BlueBand
@ BlueBand
Blue band of RGBA image.
Definition: qgsraster.h:42
QgsRectangle
A rectangle specified with double values.
Definition: qgsrectangle.h:42
qgsrasterdataprovidertemporalcapabilities.h
QgsRasterDataProvider::mUserNoDataValue
QList< QgsRasterRangeList > mUserNoDataValue
List of lists of user defined additional no data values for each band, indexed from 0.
Definition: qgsrasterdataprovider.h:728
QgsRasterDataProvider::lastErrorTitle
virtual QString lastErrorTitle()=0
Returns the caption error text for the last error in this provider.
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsRasterDataProvider::setZoomedInResamplingMethod
virtual bool setZoomedInResamplingMethod(ResamplingMethod method)
Set resampling method to apply for zoomed-in operations.
Definition: qgsrasterdataprovider.h:627
QgsRasterDataProvider::clone
QgsRasterDataProvider * clone() const override=0
Clone itself, create deep copy.
qgsrasteriterator.h
QgsRasterDataProvider::setInput
bool setInput(QgsRasterInterface *input) override
Set input.
Definition: qgsrasterdataprovider.h:133
QgsRaster::UndefinedColorInterpretation
@ UndefinedColorInterpretation
Definition: qgsraster.h:37
QgsRasterDataProvider::ResamplingMethod
ResamplingMethod
Resampling method for provider-level resampling.
Definition: qgsrasterdataprovider.h:615
qgsrasterinterface.h
QgsRasterDataProvider::stepHeight
virtual int stepHeight() const
Step height for raster iterations.
Definition: qgsrasterdataprovider.h:543
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsDataProvider::mTimestamp
QDateTime mTimestamp
Timestamp of data in the moment when the data were loaded by provider.
Definition: qgsdataprovider.h:637
qgsraster.h
QgsRasterDataProvider::TransformLayerToImage
@ TransformLayerToImage
Transforms layer (georeferenced) coordinates to image coordinates.
Definition: qgsrasterdataprovider.h:570
QgsImageFetcher::progress
void progress(qint64 received, qint64 total)
Emitted to report progress.
QgsRasterDataProvider::validatePyramidsConfigOptions
virtual QString validatePyramidsConfigOptions(QgsRaster::RasterPyramidsFormat pyramidsFormat, const QStringList &configOptions, const QString &fileFormat)
Validates pyramid creation options for a specific dataset and destination format.
Definition: qgsrasterdataprovider.h:522
QgsRasterDataProvider::remove
virtual bool remove()
Remove dataset.
Definition: qgsrasterdataprovider.h:502
QgsRaster::YCbCr_CrBand
@ YCbCr_CrBand
Cr Chroma.
Definition: qgsraster.h:53
QgsRasterIdentifyResult
Raster identify results container.
Definition: qgsrasteridentifyresult.h:31
QgsRaster::YellowBand
@ YellowBand
Yellow band of CMYK image.
Definition: qgsraster.h:49
QgsRaster::CyanBand
@ CyanBand
Cyan band of CMYK image.
Definition: qgsraster.h:47
QgsRasterDataProvider::ProviderCapability
ProviderCapability
Enumeration with capabilities that raster providers might implement.
Definition: qgsrasterdataprovider.h:99
QgsRasterDataProvider::setDpi
void setDpi(int dpi)
Sets the output device resolution.
Definition: qgsrasterdataprovider.h:425
QgsRaster::SaturationBand
@ SaturationBand
Saturation band of HLS image.
Definition: qgsraster.h:45
qgis_sip.h
QgsRasterDataProvider::getLegendGraphicFetcher
virtual QgsImageFetcher * getLegendGraphicFetcher(const QgsMapSettings *mapSettings)
Returns a new image downloader for the raster legend.
Definition: qgsrasterdataprovider.h:312
QgsRasterDataProvider::stepWidth
virtual int stepWidth() const
Step width for raster iterations.
Definition: qgsrasterdataprovider.h:536
QgsRasterIterator::DEFAULT_MAXIMUM_TILE_HEIGHT
static const int DEFAULT_MAXIMUM_TILE_HEIGHT
Default maximum tile height.
Definition: qgsrasteriterator.h:151
Q_DECLARE_OPERATORS_FOR_FLAGS
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
QgsRasterDataProvider::buildPyramids
virtual QString buildPyramids(const QList< QgsRasterPyramid > &pyramidList, const QString &resamplingMethod="NEAREST", QgsRaster::RasterPyramidsFormat format=QgsRaster::PyramidsGTiff, const QStringList &configOptions=QStringList(), QgsRasterBlockFeedback *feedback=nullptr)
Create pyramid overviews.
Definition: qgsrasterdataprovider.h:319
QgsRasterDataProvider::bandScale
virtual double bandScale(int bandNo) const
Read band scale for raster value.
Definition: qgsrasterdataprovider.h:232
QgsRasterRangeList
QList< QgsRasterRange > QgsRasterRangeList
Definition: qgsrasterrange.h:26
QgsRasterDataProvider::sourceNoDataValue
virtual double sourceNoDataValue(int bandNo) const
Value representing no data value.
Definition: qgsrasterdataprovider.h:255
qgsrasterpyramid.h
QgsRasterDataProvider::colorTable
virtual QList< QgsColorRampShader::ColorRampItem > colorTable(int bandNo) const
Definition: qgsrasterdataprovider.h:262
QgsRasterInterface::readXml
virtual void readXml(const QDomElement &filterElem)
Sets base class members from xml. Usually called from create() methods of subclasses.
Definition: qgsrasterinterface.h:463
QgsRasterDataProvider::fields
virtual QgsFields fields() const
Returns the fields of the raster layer for data providers that expose them, the default implementatio...
Definition: qgsrasterdataprovider.h:145
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:206
QgsRasterDataProvider::readBlock
virtual bool readBlock(int bandNo, QgsRectangle const &viewExtent, int width, int height, void *data, QgsRasterBlockFeedback *feedback=nullptr)
Reads a block of raster data into data, using the given extent and size.
Definition: qgsrasterdataprovider.h:690
QgsRasterDataProvider::TransformType
TransformType
Types of transformation in transformCoordinates() function.
Definition: qgsrasterdataprovider.h:568
QgsPointXY
A class to represent a 2D point.
Definition: qgspointxy.h:44
QgsRasterDataProvider::setMaxOversampling
virtual bool setMaxOversampling(double factor)
Sets maximum oversampling factor for zoomed-out operations.
Definition: qgsrasterdataprovider.h:655
QgsRasterDataProvider::timestamp
QDateTime timestamp() const override
Time stamp of data source in the moment when data/metadata were loaded by provider.
Definition: qgsrasterdataprovider.h:428
QgsRasterDataProvider::maxOversampling
double maxOversampling() const
Returns maximum oversampling factor for zoomed-out operations.
Definition: qgsrasterdataprovider.h:661
QgsRasterDataProvider::colorInterpretation
virtual int colorInterpretation(int bandNo) const
Returns data type for the band specified by number.
Definition: qgsrasterdataprovider.h:154
QgsRasterDataProvider::sourceDataType
Qgis::DataType sourceDataType(int bandNo) const override=0
Returns source data type for the band specified by number, source data type may be shorter than dataT...
QgsRasterDataProvider::setNoDataValue
virtual bool setNoDataValue(int bandNo, double noDataValue)
Set no data value on created dataset.
Definition: qgsrasterdataprovider.h:499
QgsRasterDataProvider::buildPyramidList
virtual QList< QgsRasterPyramid > buildPyramidList(QList< int > overviewList=QList< int >())
Returns the raster layers pyramid list.
Definition: qgsrasterdataprovider.h:341
QgsRaster::GrayIndex
@ GrayIndex
Greyscale.
Definition: qgsraster.h:38
QgsRasterInterface
Base class for processing filters like renderers, reprojector, resampler etc.
Definition: qgsrasterinterface.h:117
QgsRasterDataProvider::userNoDataValues
virtual QgsRasterRangeList userNoDataValues(int bandNo) const
Returns a list of user no data value ranges.
Definition: qgsrasterdataprovider.h:260
QgsRasterDataProvider::TransformImageToLayer
@ TransformImageToLayer
Transforms image coordinates to layer (georeferenced) coordinates.
Definition: qgsrasterdataprovider.h:569
QgsDataProvider::temporalCapabilities
virtual QgsDataProviderTemporalCapabilities * temporalCapabilities()
Returns the provider's temporal capabilities.
Definition: qgsdataprovider.cpp:30
QgsRasterDataProvider::mUseSrcNoDataValue
QList< bool > mUseSrcNoDataValue
Use source nodata value.
Definition: qgsrasterdataprovider.h:722
QgsRasterDataProvider::readBlock
virtual bool readBlock(int bandNo, int xBlock, int yBlock, void *data)
Reads a block of raster data into data.
Definition: qgsrasterdataprovider.h:682
QgsRasterBlockFeedback
Feedback object tailored for raster block reading.
Definition: qgsrasterinterface.h:41
QgsRasterIterator::DEFAULT_MAXIMUM_TILE_WIDTH
static const int DEFAULT_MAXIMUM_TILE_WIDTH
Default maximum tile width.
Definition: qgsrasteriterator.h:148
QgsRasterDataProvider::statusChanged
void statusChanged(const QString &) const
Emit a message to be displayed on status bar, usually used by network providers (WMS,...
QgsRaster::RedBand
@ RedBand
Red band of RGBA image.
Definition: qgsraster.h:40
QgsImageFetcher::finish
void finish(const QImage &legend)
Emitted when the download completes.
QgsRaster::YCbCr_CbBand
@ YCbCr_CbBand
Cb Chroma.
Definition: qgsraster.h:52
qgsdataprovider.h
QgsRasterDataProvider::isEditable
virtual bool isEditable() const
Checks whether the provider is in editing mode, i.e.
Definition: qgsrasterdataprovider.h:439
QgsRaster::PyramidsGTiff
@ PyramidsGTiff
Definition: qgsraster.h:83
qgsrasterrange.h
QgsRasterDataProvider::setZoomedOutResamplingMethod
virtual bool setZoomedOutResamplingMethod(ResamplingMethod method)
Set resampling method to apply for zoomed-out operations.
Definition: qgsrasterdataprovider.h:641
QgsRasterInterface::block
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr)=0
Read block of data using given extent and size.
QgsRaster::BlackBand
@ BlackBand
Black band of CMLY image.
Definition: qgsraster.h:50
QgsRasterDataProvider::mExtent
QgsRectangle mExtent
Definition: qgsrasterdataprovider.h:730
QgsMapSettings
The QgsMapSettings class contains configuration for rendering of the map.
Definition: qgsmapsettings.h:88
QgsRaster::HueBand
@ HueBand
Hue band of HLS image.
Definition: qgsraster.h:44
QgsRaster::PaletteIndex
@ PaletteIndex
Paletted (see associated color table)
Definition: qgsraster.h:39
QgsRaster::IdentifyFormat
IdentifyFormat
Definition: qgsraster.h:58
QgsRasterDataProvider::zoomedOutResamplingMethod
ResamplingMethod zoomedOutResamplingMethod() const
Returns resampling method for zoomed-out operations.
Definition: qgsrasterdataprovider.h:647
QgsRasterDataProvider
Base class for raster data providers.
Definition: qgsrasterdataprovider.h:89
QgsRasterBlock
Raster data container.
Definition: qgsrasterblock.h:37
QgsRasterDataProvider::isProviderResamplingEnabled
bool isProviderResamplingEnabled() const
Returns whether provider-level resampling is enabled.
Definition: qgsrasterdataprovider.h:608
QgsRasterDataProvider::colorInterpretationName
virtual QString colorInterpretationName(int bandNo) const
Definition: qgsrasterdataprovider.h:223
QgsRasterDataProviderTemporalCapabilities
Implementation of data provider temporal properties for QgsRasterDataProviders.
Definition: qgsrasterdataprovidertemporalcapabilities.h:38
QgsImageFetcher::error
void error(const QString &msg)
Emitted when an error occurs.
QgsRasterDataProvider::colorName
QString colorName(int colorInterpretation) const
Definition: qgsrasterdataprovider.h:160