QGIS/python/core/raster/qgsrasterfilewriter.sip

77 lines
2.2 KiB
Plaintext
Raw Normal View History

2015-07-29 11:52:14 +02:00
/** Raster file writer */
2016-02-14 03:50:23 +01:00
/** \ingroup core
* The raster file writer which allows you to save a raster to a new file.
*/
class QgsRasterFileWriter
{
%TypeHeaderCode
#include <qgsrasterfilewriter.h>
#include <qgsrasterdataprovider.h>
%End
public:
2014-01-27 09:22:24 +01:00
enum Mode
{
2014-06-02 21:00:51 +02:00
Raw, // Raw data
Image, // Rendered image
2014-01-27 09:22:24 +01:00
};
enum WriterError
{
2014-06-02 21:00:51 +02:00
NoError,
SourceProviderError,
DestProviderError,
CreateDatasourceError,
WriteError,
// Internal error if a value used for 'no data' was found in input
2014-06-02 21:00:51 +02:00
NoDataConflict,
};
QgsRasterFileWriter( const QString& outputUrl );
2015-07-29 11:52:14 +02:00
/** Write raster file
@param pipe raster pipe
@param nCols number of output columns
@param nRows number of output rows (or -1 to automatically calculate row number to have square pixels)
@param outputExtent extent to output
@param crs crs to reproject to
@param p dialog to show progress in */
WriterError writeRaster( const QgsRasterPipe* pipe, int nCols, int nRows, QgsRectangle outputExtent,
const QgsCoordinateReferenceSystem& crs, QProgressDialog* p = 0 );
void setOutputFormat( const QString& format );
QString outputFormat() const;
void setOutputProviderKey( const QString& key );
QString outputProviderKey() const;
void setTiledMode( bool t );
bool tiledMode() const;
void setMaxTileWidth( int w );
int maxTileWidth() const;
QgsRaster::RasterBuildPyramids buildPyramidsFlag() const;
void setBuildPyramidsFlag( QgsRaster::RasterBuildPyramids f );
QList< int > pyramidsList() const;
void setPyramidsList( const QList< int > & list );
2016-02-14 03:50:23 +01:00
QString pyramidsResampling() const;
void setPyramidsResampling( const QString & str );
QgsRaster::RasterPyramidsFormat pyramidsFormat() const;
void setPyramidsFormat( QgsRaster::RasterPyramidsFormat f );
void setMaxTileHeight( int h );
int maxTileHeight() const;
void setCreateOptions( const QStringList& list );
QStringList createOptions() const;
void setPyramidsConfigOptions( const QStringList& list );
2014-05-27 23:22:50 +02:00
QStringList pyramidsConfigOptions() const;
2015-02-03 02:21:52 +01:00
};