122 : loadDefaultStyle( loadDefaultStyle )
123 , transformContext( transformContext )
127 bool loadDefaultStyle =
true;
148 bool skipCrsValidation =
false;
165 const QString &baseName = QString(),
166 const QString &providerType =
"gdal",
172 SIP_PYOBJECT __repr__();
174 QString
str = QStringLiteral(
"<QgsRasterLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral(
"Invalid" ) );
175 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
195 static
bool isValidRasterFileName( const QString &fileNameQString, QString &retError );
198 static
bool isValidRasterFileName( const QString &fileNameQString );
201 static QDateTime lastModified( const QString &name );
207 Q_DECL_DEPRECATED
void setDataProvider( const QString &provider )
SIP_DEPRECATED;
221 Qgis::RasterLayerType rasterType()
const {
return mRasterType; }
298 int bandCount()
const;
303 QString bandName(
int bandNoInt )
const;
315 int attributeTableCount( )
const;
321 bool canCreateRasterAttributeTable( );
337 void reload() override;
341 void draw( QPainter *theQPainter,
352 bool isSpatial()
const override {
return true; }
355 Qgis::MapLayerProperties
properties()
const override;
361 QPixmap paletteAsPixmap(
int bandNumber = 1 );
374 double rasterUnitsPerPixelX()
const;
383 double rasterUnitsPerPixelY()
const;
400 bool generateLookupTableFlag = true );
419 virtual QString subsetString() const;
429 virtual
bool setSubsetString( const QString &subset );
435 bool defaultContrastEnhancementSettings(
440 void setDefaultContrastEnhancement();
442 QStringList subLayers() const override;
448 QImage previewAsImage( QSize size, const QColor &bgColor = Qt::white,
449 QImage::Format format = QImage::Format_ARGB32_Premultiplied );
451 void setLayerOrder( const QStringList &layers ) override;
452 void setSubLayerVisibility( const QString &name,
bool vis ) override;
453 QDateTime timestamp() const override;
465 bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QVariantMap &props = QVariantMap() ) const;
475 bool ignoreExtents() const;
481 void showStatusMessage( const QString &message );
496 void subsetStringChanged();
502 bool writeSymbology( QDomNode &, QDomDocument &doc, QString &errorMessage,
504 bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage,
506 bool writeXml( QDomNode &layer_node, QDomDocument &doc, const
QgsReadWriteContext &context ) const override;
507 QString encodedSource( const QString &source, const
QgsReadWriteContext &context ) const override;
508 QString decodedSource( const QString &source, const QString &provider, const
QgsReadWriteContext &context ) const override;
515 void closeDataProvider();
521 void setRendererForDrawingStyle(
Qgis::RasterDrawingStyle drawingStyle );
527 bool generateLookupTableFlag,
533 void computeMinMax(
int band,
538 double &min,
double &max );
551 void setDataSourcePrivate( const QString &dataSource, const QString &baseName, const QString &provider, const
QgsDataProvider::ProviderOptions &options,
QgsDataProvider::ReadFlags flags ) override;
560 void writeRasterAttributeTableExternalPaths( QDomNode &layerNode, QDomDocument &doc, const
QgsReadWriteContext &context ) const;
568 void readRasterAttributeTableExternalPaths( const QDomNode &layerNode,
QgsReadWriteContext &context ) const;
571 const QString QSTRING_NOT_SET;
572 const QString TRSTRING_NOT_SET;
583 QDateTime mLastModified;
587 Qgis::RasterLayerType mRasterType =
Qgis::RasterLayerType::GrayOrUndefined;
592 QgsRectangle mLastRectangleUsedByRefreshContrastEnhancementIfNeeded;
594 QDomDocument mOriginalStyleDocument;
595 QDomElement mOriginalStyleElement;
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.