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;
DataType
Raster data types.
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 setPyramidsFormat(QgsRaster::RasterPyramidsFormat f)
void setMaxTileWidth(int w)
void setTiledMode(bool t)
QStringList pyramidsConfigOptions() const
void setOutputProviderKey(const QString &key)
void setMaxTileHeight(int h)
QString outputFormat() const
QStringList createOptions() const
QString outputProviderKey() const
QString pyramidsResampling() const
void setBuildPyramidsFlag(QgsRaster::RasterBuildPyramids f)
QList< int > pyramidsList() const
RasterFormatOption
Options for sorting and filtering raster formats.
void setOutputFormat(const QString &format)
QgsRaster::RasterBuildPyramids buildPyramidsFlag() const
void setCreateOptions(const QStringList &list)
void setPyramidsConfigOptions(const QStringList &list)
QgsRaster::RasterPyramidsFormat pyramidsFormat() const
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