15#ifndef QGSRASTERFILEWRITER_H
16#define QGSRASTERFILEWRITER_H
21#include <QDomDocument>
50 SortRecommended = 1 << 1,
52 Q_DECLARE_FLAGS( RasterFormatOptions, RasterFormatOption )
68 int width,
int height,
81 int width,
int height,
120 QString outputUrl()
const {
return mOutputUrl; }
287 static QString filterForDriver(
const QString &driverName );
311 static QList< QgsRasterFileWriter::FilterFormatDetails > supportedFiltersAndFormats( RasterFormatOptions options = SortRecommended );
322 static QStringList supportedFormatExtensions( RasterFormatOptions options = SortRecommended );
334 static QString driverForExtension(
const QString &extension );
347 static QStringList extensionsForFormat(
const QString &format );
358 int nCols,
int nRows,
362 const QList<bool> &destHasNoDataValueList,
363 const QList<double> &destNoDataValueList,
383 bool writeVRT(
const QString &file );
385 void addToVRT(
const QString &filename,
int band,
int xSize,
int ySize,
int xOffset,
int yOffset );
390 int iterLeft,
int iterTop,
391 const QString &outputUrl,
int fileIndex,
int nBands,
Qgis::DataType type,
408 const QList<bool> &destHasNoDataValueList = QList<bool>(),
const QList<double> &destNoDataValueList = QList<double>() );
411 void globalOutputParameters(
const QgsRectangle &extent,
int nCols,
int &nRows,
double *geoTransform,
double &pixelSize );
413 QString partFileName(
int fileIndex );
414 QString vrtFileName();
418 QString mOutputProviderKey = QStringLiteral(
"gdal" );
419 QString mOutputFormat = QStringLiteral(
"GTiff" );
420 QStringList mCreateOptions;
424 bool mTiledMode =
false;
425 int mMaxTileWidth = 500;
426 int mMaxTileHeight = 500;
428 QList< int > mPyramidsList;
429 QString mPyramidsResampling = QStringLiteral(
"AVERAGE" );
432 QStringList mPyramidsConfigOptions;
434 QDomDocument mVRTDocument;
435 QList<QDomElement> mVRTBands;
The Qgis class provides global constants for use throughout the application.
RasterPyramidFormat
Raster pyramid formats.
RasterFileWriterResult
Raster file export results.
DataType
Raster data types.
RasterBuildPyramidOption
Raster pyramid building options.
RasterExportType
Raster file export 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)
Sets the list of pyramids which will be created for the output file.
void setPyramidsResampling(const QString &str)
int maxTileHeight() const
Returns the maximum tile height (in pixels) for tiled outputs.
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.
Qgis::RasterBuildPyramidOption buildPyramidsFlag() const
Returns the pyramid building option.
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.
Qgis::RasterPyramidFormat pyramidsFormat() const
Returns the raster pyramid format.
QString outputFormat() const
Returns the output format.
QStringList createOptions() const
Returns the list of data source creation options which will be used when creating the output raster f...
QString outputProviderKey() const
Returns the name of the data provider for the raster output.
QString pyramidsResampling() const
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.
RasterFormatOption
Options for sorting and filtering raster formats.
void setOutputFormat(const QString &format)
Sets the output format.
int maxTileWidth() const
Returns the maximum tile width (in pixels) for tiled outputs.
void setCreateOptions(const QStringList &list)
Sets a list of data source creation options to use when creating the output raster file.
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.
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