15#ifndef QGSRASTERFILEWRITER_H
16#define QGSRASTERFILEWRITER_H
22#include <QDomDocument>
50 SortRecommended = 1 << 1,
67 int width,
int height,
79 int width,
int height,
308 static QString filterForDriver(
const QString &driverName );
375 int nCols,
int nRows,
379 const QList<bool> &destHasNoDataValueList,
380 const QList<double> &destNoDataValueList,
398 void createVRT(
int xSize,
int ySize,
const QgsCoordinateReferenceSystem &crs,
double *geoTransform,
Qgis::DataType type,
const QList<bool> &destHasNoDataValueList,
const QList<double> &destNoDataValueList );
400 bool writeVRT(
const QString &file );
402 void addToVRT(
const QString &filename,
int band,
int xSize,
int ySize,
int xOffset,
int yOffset );
407 int iterLeft,
int iterTop,
425 const QList<bool> &destHasNoDataValueList = QList<bool>(),
const QList<double> &destNoDataValueList = QList<double>() );
428 void globalOutputParameters(
const QgsRectangle &extent,
int nCols,
int &nRows,
double *geoTransform,
double &pixelSize );
430 QString partFileName(
int fileIndex );
431 QString vrtFileName();
435 QString mOutputProviderKey = QStringLiteral(
"gdal" );
436 QString mOutputFormat = QStringLiteral(
"GTiff" );
437 QStringList mCreationOptions;
441 bool mTiledMode =
false;
442 int mMaxTileWidth = 500;
443 int mMaxTileHeight = 500;
445 QList< int > mPyramidsList;
446 QString mPyramidsResampling = QStringLiteral(
"AVERAGE" );
449 QStringList mPyramidsConfigOptions;
451 QDomDocument mVRTDocument;
452 QList<QDomElement> mVRTBands;
Provides global constants and enumerations for use throughout the application.
RasterPyramidFormat
Raster pyramid formats.
@ GeoTiff
Geotiff .ovr (external).
RasterFileWriterResult
Raster file export results.
DataType
Raster data types.
RasterBuildPyramidOption
Raster pyramid building options.
RasterExportType
Raster file export types.
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Feedback object tailored for raster block reading.
Base class for raster data providers.
void setPyramidsList(const QList< int > &list)
Sets the list of pyramids which will be created for the output file.
enum RasterFormatOption SIP_ENUM_BASETYPE(IntFlag)
Options for sorting and filtering raster formats.
Q_DECL_DEPRECATED Qgis::RasterFileWriterResult writeRaster(const QgsRasterPipe *pipe, int nCols, int nRows, const QgsRectangle &outputExtent, const QgsCoordinateReferenceSystem &crs, QgsRasterBlockFeedback *feedback=nullptr) SIP_DEPRECATED
Write raster file.
void setPyramidsResampling(const QString &str)
int maxTileHeight() const
Returns the maximum tile height (in pixels) for tiled outputs.
static QStringList extensionsForFormat(const QString &format)
Returns a list of known file extensions for the given GDAL driver format.
void setMaxTileWidth(int w)
Sets the maximum tile width (in pixels) for tiled outputs.
void setTiledMode(bool t)
Sets whether the output should be tiled.
QStringList pyramidsConfigOptions() const
Returns the list of configuration options used when creating the pyramids for the output raster file.
static QString driverForExtension(const QString &extension)
Returns the GDAL driver name for a specified file extension.
Q_DECL_DEPRECATED QStringList createOptions() const SIP_DEPRECATED
Returns the list of data source creation options which will be used when creating the output raster f...
Qgis::RasterBuildPyramidOption buildPyramidsFlag() const
Returns the pyramid building option.
QgsRasterFileWriter(const QString &outputUrl)
Constructor for QgsRasterFileWriter, writing to the specified output URL/filename.
void setOutputProviderKey(const QString &key)
Sets the name of the data provider for the raster output.
void setMaxTileHeight(int h)
Sets the maximum tile height (in pixels) for tiled outputs.
static QStringList supportedFormatExtensions(RasterFormatOptions options=SortRecommended)
Returns a list of file extensions for supported formats.
QString outputUrl() const
Returns the output URL (filename) for the raster.
QFlags< RasterFormatOption > RasterFormatOptions
Qgis::RasterPyramidFormat pyramidsFormat() const
Returns the raster pyramid format.
QString outputFormat() const
Returns the output format.
QString outputProviderKey() const
Returns the name of the data provider for the raster output.
QString pyramidsResampling() const
void setCreationOptions(const QStringList &options)
Sets a list of data source creation options to use when creating the output raster file.
QgsRasterDataProvider * createMultiBandRaster(Qgis::DataType dataType, int width, int height, const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs, int nBands) SIP_FACTORY
Create a raster file with given number of bands without initializing the pixel data.
QList< int > pyramidsList() const
Returns the list of pyramids which will be created for the output file.
void setPyramidsFormat(Qgis::RasterPyramidFormat f)
Sets the raster pyramid format.
QStringList creationOptions() const
Returns the list of data source creation options which will be used when creating the output raster f...
void setOutputFormat(const QString &format)
Sets the output format.
int maxTileWidth() const
Returns the maximum tile width (in pixels) for tiled outputs.
Q_DECL_DEPRECATED void setCreateOptions(const QStringList &list) SIP_DEPRECATED
Sets a list of data source creation options to use when creating the output raster file.
static QList< QgsRasterFileWriter::FilterFormatDetails > supportedFiltersAndFormats(RasterFormatOptions options=SortRecommended)
Returns a list or pairs, with format filter string as first element and GDAL format key as second ele...
bool tiledMode() const
Returns whether the output will be tiled.
void setPyramidsConfigOptions(const QStringList &list)
Sets a list of configuration options to use when creating the pyramids for the output raster file.
void setBuildPyramidsFlag(Qgis::RasterBuildPyramidOption f)
Sets the pyramid building option.
QgsRasterDataProvider * createOneBandRaster(Qgis::DataType dataType, int width, int height, const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs) SIP_FACTORY
Create a raster file with one band without initializing the pixel data.
Base class for processing filters like renderers, reprojector, resampler etc.
Iterator for sequentially processing raster cells.
Contains a pipeline of raster interfaces for sequential raster processing.
A rectangle specified with double values.