diff --git a/python/core/raster/qgsrasterfilewriter.sip b/python/core/raster/qgsrasterfilewriter.sip index ad254196df0..17deb69a690 100644 --- a/python/core/raster/qgsrasterfilewriter.sip +++ b/python/core/raster/qgsrasterfilewriter.sip @@ -53,9 +53,11 @@ class QgsRasterFileWriter :rtype: QgsRasterDataProvider %End - QgsRasterDataProvider *createRaster( Qgis::DataType dataType, - int width, int height, const QgsRectangle &extent, - int nBands, const QgsCoordinateReferenceSystem &crs ) /Factory/; + QgsRasterDataProvider *createMultiBandRaster( Qgis::DataType dataType, + int width, int height, + const QgsRectangle &extent, + const QgsCoordinateReferenceSystem &crs, + int nBands ) /Factory/; %Docstring Create a raster file with given number of bands without initializing the pixel data. Returned provider may be used to initialize the raster using writeBlock() calls. diff --git a/src/core/raster/qgsrasterfilewriter.cpp b/src/core/raster/qgsrasterfilewriter.cpp index 840eb9ee883..fbf2b7d9f2f 100644 --- a/src/core/raster/qgsrasterfilewriter.cpp +++ b/src/core/raster/qgsrasterfilewriter.cpp @@ -41,7 +41,7 @@ QgsRasterDataProvider *QgsRasterFileWriter::createOneBandRaster( Qgis::DataType return initOutput( width, height, crs, geoTransform, 1, dataType, QList(), QList() ); } -QgsRasterDataProvider *QgsRasterFileWriter::createRaster( Qgis::DataType dataType, int width, int height, const QgsRectangle &extent, int nBands, const QgsCoordinateReferenceSystem &crs ) +QgsRasterDataProvider *QgsRasterFileWriter::createMultiBandRaster( Qgis::DataType dataType, int width, int height, const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs, int nBands ) { if ( mTiledMode ) return nullptr; // does not make sense with tiled mode diff --git a/src/core/raster/qgsrasterfilewriter.h b/src/core/raster/qgsrasterfilewriter.h index 4ad3ec157ed..653167e8932 100644 --- a/src/core/raster/qgsrasterfilewriter.h +++ b/src/core/raster/qgsrasterfilewriter.h @@ -74,9 +74,11 @@ class CORE_EXPORT QgsRasterFileWriter * \returns Instance of data provider in editing mode (on success) or nullptr on error. * \since QGIS 3.0 */ - QgsRasterDataProvider *createRaster( Qgis::DataType dataType, - int width, int height, const QgsRectangle &extent, - int nBands, const QgsCoordinateReferenceSystem &crs ) SIP_FACTORY; + QgsRasterDataProvider *createMultiBandRaster( Qgis::DataType dataType, + int width, int height, + const QgsRectangle &extent, + const QgsCoordinateReferenceSystem &crs, + int nBands ) SIP_FACTORY; /** Write raster file \param pipe raster pipe