15 #ifndef QGSRASTERFILEWRITER_H
16 #define QGSRASTERFILEWRITER_H
18 #include "qgis_core.h"
21 #include <QDomDocument>
22 #include <QDomElement>
24 #include <QStringList>
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; }
168 static QString filterForDriver(
const QString &driverName );
192 static QList< QgsRasterFileWriter::FilterFormatDetails > supportedFiltersAndFormats( RasterFormatOptions options = SortRecommended );
203 static QStringList supportedFormatExtensions( RasterFormatOptions options = SortRecommended );
215 static QString driverForExtension(
const QString &extension );
228 static QStringList extensionsForFormat(
const QString &format );
239 int nCols,
int nRows,
243 const QList<bool> &destHasNoDataValueList,
244 const QList<double> &destNoDataValueList,
264 bool writeVRT(
const QString &file );
266 void addToVRT(
const QString &filename,
int band,
int xSize,
int ySize,
int xOffset,
int yOffset );
271 int iterLeft,
int iterTop,
272 const QString &outputUrl,
int fileIndex,
int nBands,
Qgis::DataType type,
289 const QList<bool> &destHasNoDataValueList = QList<bool>(),
const QList<double> &destNoDataValueList = QList<double>() );
292 void globalOutputParameters(
const QgsRectangle &extent,
int nCols,
int &nRows,
double *geoTransform,
double &pixelSize );
294 QString partFileName(
int fileIndex );
295 QString vrtFileName();
299 QString mOutputProviderKey = QStringLiteral(
"gdal" );
300 QString mOutputFormat = QStringLiteral(
"GTiff" );
301 QStringList mCreateOptions;
305 bool mTiledMode =
false;
306 int mMaxTileWidth = 500;
307 int mMaxTileHeight = 500;
309 QList< int > mPyramidsList;
310 QString mPyramidsResampling = QStringLiteral(
"AVERAGE" );
313 QStringList mPyramidsConfigOptions;
315 QDomDocument mVRTDocument;
316 QList<QDomElement> mVRTBands;
324 #endif // QGSRASTERFILEWRITER_H