QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Types | Public Member Functions | List of all members
QgsRasterFileWriter Class Reference

The raster file writer which allows you to save a raster to a new file. More...

#include <qgsrasterfilewriter.h>

Public Types

enum  Mode { Raw = 0, Image = 1 }
 
enum  WriterError {
  NoError = 0, SourceProviderError = 1, DestProviderError = 2, CreateDatasourceError = 3,
  WriteError = 4, NoDataConflict = 5
}
 

Public Member Functions

 QgsRasterFileWriter (const QString &outputUrl)
 
QgsRaster::RasterBuildPyramids buildPyramidsFlag () const
 
QStringList createOptions () const
 
int maxTileHeight () const
 
int maxTileWidth () const
 
QString outputFormat () const
 
QString outputProviderKey () const
 
QStringList pyramidsConfigOptions () const
 
QgsRaster::RasterPyramidsFormat pyramidsFormat () const
 
QList< int > pyramidsList () const
 
QString pyramidsResampling () const
 
void setBuildPyramidsFlag (QgsRaster::RasterBuildPyramids f)
 
void setCreateOptions (const QStringList &list)
 
void setMaxTileHeight (int h)
 
void setMaxTileWidth (int w)
 
void setOutputFormat (const QString &format)
 
void setOutputProviderKey (const QString &key)
 
void setPyramidsConfigOptions (const QStringList &list)
 
void setPyramidsFormat (QgsRaster::RasterPyramidsFormat f)
 
void setPyramidsList (const QList< int > &list)
 
void setPyramidsResampling (const QString &str)
 
void setTiledMode (bool t)
 
bool tiledMode () const
 
WriterError writeRaster (const QgsRasterPipe *pipe, int nCols, int nRows, QgsRectangle outputExtent, const QgsCoordinateReferenceSystem &crs, QProgressDialog *p=nullptr)
 Write raster file. More...
 

Detailed Description

The raster file writer which allows you to save a raster to a new file.

Definition at line 32 of file qgsrasterfilewriter.h.

Member Enumeration Documentation

◆ Mode

Enumerator
Raw 
Image 

Definition at line 35 of file qgsrasterfilewriter.h.

◆ WriterError

Enumerator
NoError 
SourceProviderError 
DestProviderError 
CreateDatasourceError 
WriteError 
NoDataConflict 

Definition at line 40 of file qgsrasterfilewriter.h.

Constructor & Destructor Documentation

◆ QgsRasterFileWriter()

QgsRasterFileWriter::QgsRasterFileWriter ( const QString outputUrl)

Definition at line 29 of file qgsrasterfilewriter.cpp.

Member Function Documentation

◆ buildPyramidsFlag()

QgsRaster::RasterBuildPyramids QgsRasterFileWriter::buildPyramidsFlag ( ) const
inline

Definition at line 75 of file qgsrasterfilewriter.h.

◆ createOptions()

QStringList QgsRasterFileWriter::createOptions ( ) const
inline

Definition at line 91 of file qgsrasterfilewriter.h.

◆ maxTileHeight()

int QgsRasterFileWriter::maxTileHeight ( ) const
inline

Definition at line 88 of file qgsrasterfilewriter.h.

◆ maxTileWidth()

int QgsRasterFileWriter::maxTileWidth ( ) const
inline

Definition at line 73 of file qgsrasterfilewriter.h.

◆ outputFormat()

QString QgsRasterFileWriter::outputFormat ( ) const
inline

Definition at line 64 of file qgsrasterfilewriter.h.

◆ outputProviderKey()

QString QgsRasterFileWriter::outputProviderKey ( ) const
inline

Definition at line 67 of file qgsrasterfilewriter.h.

◆ pyramidsConfigOptions()

QStringList QgsRasterFileWriter::pyramidsConfigOptions ( ) const
inline

Definition at line 94 of file qgsrasterfilewriter.h.

◆ pyramidsFormat()

QgsRaster::RasterPyramidsFormat QgsRasterFileWriter::pyramidsFormat ( ) const
inline

Definition at line 84 of file qgsrasterfilewriter.h.

◆ pyramidsList()

QList< int > QgsRasterFileWriter::pyramidsList ( ) const
inline

Definition at line 78 of file qgsrasterfilewriter.h.

◆ pyramidsResampling()

QString QgsRasterFileWriter::pyramidsResampling ( ) const
inline

Definition at line 81 of file qgsrasterfilewriter.h.

◆ setBuildPyramidsFlag()

void QgsRasterFileWriter::setBuildPyramidsFlag ( QgsRaster::RasterBuildPyramids  f)
inline

Definition at line 76 of file qgsrasterfilewriter.h.

◆ setCreateOptions()

void QgsRasterFileWriter::setCreateOptions ( const QStringList list)
inline

Definition at line 90 of file qgsrasterfilewriter.h.

◆ setMaxTileHeight()

void QgsRasterFileWriter::setMaxTileHeight ( int  h)
inline

Definition at line 87 of file qgsrasterfilewriter.h.

◆ setMaxTileWidth()

void QgsRasterFileWriter::setMaxTileWidth ( int  w)
inline

Definition at line 72 of file qgsrasterfilewriter.h.

◆ setOutputFormat()

void QgsRasterFileWriter::setOutputFormat ( const QString format)
inline

Definition at line 63 of file qgsrasterfilewriter.h.

◆ setOutputProviderKey()

void QgsRasterFileWriter::setOutputProviderKey ( const QString key)
inline

Definition at line 66 of file qgsrasterfilewriter.h.

◆ setPyramidsConfigOptions()

void QgsRasterFileWriter::setPyramidsConfigOptions ( const QStringList list)
inline

Definition at line 93 of file qgsrasterfilewriter.h.

◆ setPyramidsFormat()

void QgsRasterFileWriter::setPyramidsFormat ( QgsRaster::RasterPyramidsFormat  f)
inline

Definition at line 85 of file qgsrasterfilewriter.h.

◆ setPyramidsList()

void QgsRasterFileWriter::setPyramidsList ( const QList< int > &  list)
inline

Definition at line 79 of file qgsrasterfilewriter.h.

◆ setPyramidsResampling()

void QgsRasterFileWriter::setPyramidsResampling ( const QString str)
inline

Definition at line 82 of file qgsrasterfilewriter.h.

◆ setTiledMode()

void QgsRasterFileWriter::setTiledMode ( bool  t)
inline

Definition at line 69 of file qgsrasterfilewriter.h.

◆ tiledMode()

bool QgsRasterFileWriter::tiledMode ( ) const
inline

Definition at line 70 of file qgsrasterfilewriter.h.

◆ writeRaster()

QgsRasterFileWriter::WriterError QgsRasterFileWriter::writeRaster ( const QgsRasterPipe pipe,
int  nCols,
int  nRows,
QgsRectangle  outputExtent,
const QgsCoordinateReferenceSystem crs,
QProgressDialog p = nullptr 
)

Write raster file.

Parameters
piperaster pipe
nColsnumber of output columns
nRowsnumber of output rows (or -1 to automatically calculate row number to have square pixels)
outputExtentextent to output
crscrs to reproject to
pdialog to show progress in

Definition at line 62 of file qgsrasterfilewriter.cpp.


The documentation for this class was generated from the following files: