15#ifndef QGSRASTERFILEWRITER_H
16#define QGSRASTERFILEWRITER_H
21#include <QDomDocument>
50 SourceProviderError = 1,
51 DestProviderError = 2,
52 CreateDatasourceError = 3,
64 SortRecommended = 1 << 1,
66 Q_DECLARE_FLAGS( RasterFormatOptions, RasterFormatOption )
79 int width,
int height,
92 int width,
int height,
108 Q_DECL_DEPRECATED WriterError writeRaster(
const QgsRasterPipe *pipe,
int nCols,
int nRows,
const QgsRectangle &outputExtent,
132 QString outputUrl()
const {
return mOutputUrl; }
190 static QString filterForDriver(
const QString &driverName );
214 static QList< QgsRasterFileWriter::FilterFormatDetails > supportedFiltersAndFormats( RasterFormatOptions options = SortRecommended );
225 static QStringList supportedFormatExtensions( RasterFormatOptions options = SortRecommended );
237 static QString driverForExtension(
const QString &extension );
250 static QStringList extensionsForFormat(
const QString &format );
261 int nCols,
int nRows,
265 const QList<bool> &destHasNoDataValueList,
266 const QList<double> &destNoDataValueList,
286 bool writeVRT(
const QString &file );
288 void addToVRT(
const QString &filename,
int band,
int xSize,
int ySize,
int xOffset,
int yOffset );
293 int iterLeft,
int iterTop,
294 const QString &outputUrl,
int fileIndex,
int nBands,
Qgis::DataType type,
311 const QList<bool> &destHasNoDataValueList = QList<bool>(),
const QList<double> &destNoDataValueList = QList<double>() );
314 void globalOutputParameters(
const QgsRectangle &extent,
int nCols,
int &nRows,
double *geoTransform,
double &pixelSize );
316 QString partFileName(
int fileIndex );
317 QString vrtFileName();
321 QString mOutputProviderKey = QStringLiteral(
"gdal" );
322 QString mOutputFormat = QStringLiteral(
"GTiff" );
323 QStringList mCreateOptions;
327 bool mTiledMode =
false;
328 int mMaxTileWidth = 500;
329 int mMaxTileHeight = 500;
331 QList< int > mPyramidsList;
332 QString mPyramidsResampling = QStringLiteral(
"AVERAGE" );
335 QStringList mPyramidsConfigOptions;
337 QDomDocument mVRTDocument;
338 QList<QDomElement> mVRTBands;
RasterPyramidFormat
Raster pyramid formats.
DataType
Raster data types.
RasterBuildPyramidOption
Raster pyramid building options.
This class 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.
The raster file writer which allows you to save a raster to a new file.
void setPyramidsList(const QList< int > &list)
void setPyramidsResampling(const QString &str)
int maxTileHeight() const
void setMaxTileWidth(int w)
void setTiledMode(bool t)
QStringList pyramidsConfigOptions() const
Qgis::RasterBuildPyramidOption buildPyramidsFlag() const
Returns the pyramid building option.
void setOutputProviderKey(const QString &key)
void setMaxTileHeight(int h)
Qgis::RasterPyramidFormat pyramidsFormat() const
Returns the raster pyramid format.
QString outputFormat() const
QStringList createOptions() const
QString outputProviderKey() const
QString pyramidsResampling() const
QList< int > pyramidsList() const
void setPyramidsFormat(Qgis::RasterPyramidFormat f)
Sets the raster pyramid format.
RasterFormatOption
Options for sorting and filtering raster formats.
void setOutputFormat(const QString &format)
void setCreateOptions(const QStringList &list)
void setPyramidsConfigOptions(const QStringList &list)
void setBuildPyramidsFlag(Qgis::RasterBuildPyramidOption f)
Sets the pyramid building option.
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.
const QgsCoordinateReferenceSystem & crs