QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
interpolation
qgsgridfilewriter.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgridfilewriter.h
3
--------------------
4
begin : March 10, 2008
5
copyright : (C) 2008 by Marco Hugentobler
6
email : marco dot hugentobler at karto dot baug dot ethz dot ch
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
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. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSGRIDFILEWRITER_H
19
#define QGSGRIDFILEWRITER_H
20
21
#include "qgis_analysis.h"
22
#include "
qgsrectangle.h
"
23
24
#include <QString>
25
#include <QTextStream>
26
27
class
QgsInterpolator
;
28
class
QgsFeedback
;
29
30
//todo: extend such that writing to other file types is possible
31
36
class
ANALYSIS_EXPORT
QgsGridFileWriter
37
{
38
public
:
48
QgsGridFileWriter
(
QgsInterpolator
*interpolator,
const
QString &outputPath,
const
QgsRectangle
&extent,
int
nCols,
int
nRows,
const
QString &outputFormat = QString() );
49
57
int
writeFile
(
QgsFeedback
*feedback =
nullptr
);
58
65
void
setCreationOptions
(
const
QStringList &options ) { mCreationOptions = options; }
66
73
QStringList
creationOptions
()
const
{
return
mCreationOptions; }
74
81
void
setNoDataValue
(
double
noDataValue
) { mNoDataValue =
noDataValue
; }
82
89
double
noDataValue
()
const
{
return
mNoDataValue; }
90
91
private
:
92
QgsGridFileWriter
() =
delete
;
93
94
QgsInterpolator
*mInterpolator =
nullptr
;
95
QString mOutputFilePath;
96
QgsRectangle
mInterpolationExtent;
97
int
mNumColumns = 0;
98
int
mNumRows = 0;
99
100
double
mCellSizeX = 0;
101
double
mCellSizeY = 0;
102
103
QString mOutputFormat;
104
105
QStringList mCreationOptions;
106
double
mNoDataValue = -9999.0;
107
};
108
109
#endif
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition
qgsfeedback.h:44
QgsGridFileWriter
Handles interpolation to a grid and writes the results to a raster grid file.
Definition
qgsgridfilewriter.h:37
QgsGridFileWriter::setCreationOptions
void setCreationOptions(const QStringList &options)
Sets a list of data source creation options to use when creating the output raster file.
Definition
qgsgridfilewriter.h:65
QgsGridFileWriter::setNoDataValue
void setNoDataValue(double noDataValue)
Set no data value for output file.
Definition
qgsgridfilewriter.h:81
QgsGridFileWriter::noDataValue
double noDataValue() const
Returns no data value used for output file.
Definition
qgsgridfilewriter.h:89
QgsGridFileWriter::creationOptions
QStringList creationOptions() const
Returns the list of data source creation options which will be used when creating the output raster f...
Definition
qgsgridfilewriter.h:73
QgsGridFileWriter::QgsGridFileWriter
QgsGridFileWriter(QgsInterpolator *interpolator, const QString &outputPath, const QgsRectangle &extent, int nCols, int nRows, const QString &outputFormat=QString())
Constructor for QgsGridFileWriter, for the specified interpolator.
Definition
qgsgridfilewriter.cpp:32
QgsGridFileWriter::writeFile
int writeFile(QgsFeedback *feedback=nullptr)
Writes the grid file.
Definition
qgsgridfilewriter.cpp:43
QgsInterpolator
Interface class for interpolations.
Definition
qgsinterpolator.h:73
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:47
qgsrectangle.h
Generated on
for QGIS API Documentation by
1.17.0