1
/***************************************************************************
5
copyright : (C) 2008 by Marco Hugentobler
6
email : marco dot hugentobler at karto dot baug dot ethz dot ch
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
18
#ifndef QGSGRIDFILEWRITER_H
19
#define QGSGRIDFILEWRITER_H
21
#include "qgsrectangle.h"
23
#include <QTextStream>
25
class QgsInterpolator;
27
/**A class that does interpolation to a grid and writes the results to an ascii grid*/
28
//todo: extend such that writing to other file types is possible
29
class ANALYSIS_EXPORT QgsGridFileWriter
32
QgsGridFileWriter( QgsInterpolator* i, QString outputPath, QgsRectangle extent, int nCols, int nRows, double cellSizeX, double cellSizeY );
35
/**Writes the grid file.
36
@param showProgressDialog shows a dialog with the possibility to cancel
37
@return 0 in case of success*/
39
int writeFile( bool showProgressDialog = false );
43
QgsGridFileWriter(); //forbidden
44
int writeHeader( QTextStream& outStream );
46
QgsInterpolator* mInterpolator;
47
QString mOutputFilePath;
48
QgsRectangle mInterpolationExtent;