rename new method to createMultiBandRaster to make it more obvious

reorganize arguments
This commit is contained in:
Alexander Bruy 2017-05-23 09:06:03 +03:00
parent 9272dc0f7c
commit fa6b5b0a16
3 changed files with 11 additions and 7 deletions

View File

@ -53,9 +53,11 @@ class QgsRasterFileWriter
:rtype: QgsRasterDataProvider :rtype: QgsRasterDataProvider
%End %End
QgsRasterDataProvider *createRaster( Qgis::DataType dataType, QgsRasterDataProvider *createMultiBandRaster( Qgis::DataType dataType,
int width, int height, const QgsRectangle &extent, int width, int height,
int nBands, const QgsCoordinateReferenceSystem &crs ) /Factory/; const QgsRectangle &extent,
const QgsCoordinateReferenceSystem &crs,
int nBands ) /Factory/;
%Docstring %Docstring
Create a raster file with given number of bands without initializing the pixel data. 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. Returned provider may be used to initialize the raster using writeBlock() calls.

View File

@ -41,7 +41,7 @@ QgsRasterDataProvider *QgsRasterFileWriter::createOneBandRaster( Qgis::DataType
return initOutput( width, height, crs, geoTransform, 1, dataType, QList<bool>(), QList<double>() ); return initOutput( width, height, crs, geoTransform, 1, dataType, QList<bool>(), QList<double>() );
} }
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 ) if ( mTiledMode )
return nullptr; // does not make sense with tiled mode return nullptr; // does not make sense with tiled mode

View File

@ -74,9 +74,11 @@ class CORE_EXPORT QgsRasterFileWriter
* \returns Instance of data provider in editing mode (on success) or nullptr on error. * \returns Instance of data provider in editing mode (on success) or nullptr on error.
* \since QGIS 3.0 * \since QGIS 3.0
*/ */
QgsRasterDataProvider *createRaster( Qgis::DataType dataType, QgsRasterDataProvider *createMultiBandRaster( Qgis::DataType dataType,
int width, int height, const QgsRectangle &extent, int width, int height,
int nBands, const QgsCoordinateReferenceSystem &crs ) SIP_FACTORY; const QgsRectangle &extent,
const QgsCoordinateReferenceSystem &crs,
int nBands ) SIP_FACTORY;
/** Write raster file /** Write raster file
\param pipe raster pipe \param pipe raster pipe