2012-09-06 19:16:05 +02:00
|
|
|
|
|
|
|
/** Raster file writer */
|
|
|
|
|
|
|
|
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
|
|
|
};
|
2012-09-06 19:16:05 +02:00
|
|
|
enum WriterError
|
|
|
|
{
|
2014-06-02 21:00:51 +02:00
|
|
|
NoError,
|
|
|
|
SourceProviderError,
|
|
|
|
DestProviderError,
|
|
|
|
CreateDatasourceError,
|
|
|
|
WriteError,
|
2012-09-24 02:28:15 +02:00
|
|
|
// Internal error if a value used for 'no data' was found in input
|
2014-06-02 21:00:51 +02:00
|
|
|
NoDataConflict,
|
2012-09-06 19:16:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
QgsRasterFileWriter( const QString& outputUrl );
|
|
|
|
~QgsRasterFileWriter();
|
2012-09-24 02:28:15 +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 */
|
2012-09-06 19:16:05 +02:00
|
|
|
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;
|
|
|
|
|
2013-04-24 17:18:15 +02:00
|
|
|
QgsRaster::RasterBuildPyramids buildPyramidsFlag() const;
|
|
|
|
void setBuildPyramidsFlag( QgsRaster::RasterBuildPyramids f );
|
2012-09-06 19:16:05 +02:00
|
|
|
|
|
|
|
QList< int > pyramidsList() const;
|
|
|
|
void setPyramidsList( const QList< int > & list );
|
|
|
|
|
|
|
|
QString pyramidsResampling() const;
|
|
|
|
void setPyramidsResampling( const QString & str );
|
|
|
|
|
2013-04-24 17:18:15 +02:00
|
|
|
QgsRaster::RasterPyramidsFormat pyramidsFormat() const;
|
|
|
|
void setPyramidsFormat( QgsRaster::RasterPyramidsFormat f );
|
2012-09-06 19:16:05 +02:00
|
|
|
|
|
|
|
void setMaxTileHeight( int h );
|
|
|
|
int maxTileHeight() const;
|
|
|
|
|
|
|
|
void setCreateOptions( const QStringList& list );
|
|
|
|
QStringList createOptions() const;
|
2013-01-18 18:18:47 -02:00
|
|
|
|
|
|
|
void setPyramidsConfigOptions( const QStringList& list );
|
2014-05-27 23:22:50 +02:00
|
|
|
QStringList pyramidsConfigOptions() const;
|
2012-09-06 19:16:05 +02:00
|
|
|
};
|
|
|
|
|