Class: QgsGridFileWriter¶
Handles interpolation to a grid and writes the results to a raster grid file.
Methods
Returns the list of data source creation options which will be used when creating the output raster file. |
|
Returns no data value used for output file. |
|
Sets a list of data source creation options to use when creating the output raster file. |
|
Set no data value for output file. |
|
Writes the grid file. |
- class qgis.analysis.QgsGridFileWriter[source]¶
Bases:
object- __init__(interpolator: QgsInterpolator | None, outputPath: str | None, extent: QgsRectangle, nCols: int, nRows: int)
Constructor for QgsGridFileWriter, for the specified
interpolator.The
outputPathargument is used to set the output file path.The
extentandnCols,nRowsarguments dictate the extent and size of the output raster.- Parameters:
interpolator (Optional[QgsInterpolator])
outputPath (Optional[str])
extent (QgsRectangle)
nCols (int)
nRows (int)
- __init__(a0: QgsGridFileWriter)
- Parameters:
a0 (QgsGridFileWriter)
- creationOptions(self) List[str][source]¶
Returns the list of data source creation options which will be used when creating the output raster file.
See also
Added in version 3.44.
- Return type:
List[str]
- noDataValue(self) float[source]¶
Returns no data value used for output file.
See also
Added in version 3.44.
- Return type:
float
- setCreationOptions(self, options: Iterable[str | None])[source]¶
Sets a list of data source creation options to use when creating the output raster file.
See also
Added in version 3.44.
- Parameters:
options (Iterable[Optional[str]])
- setNoDataValue(self, noDataValue: float)[source]¶
Set no data value for output file.
See also
Added in version 3.44.
- Parameters:
noDataValue (float)
- writeFile(self, feedback: QgsFeedback | None = None) int[source]¶
Writes the grid file.
An optional
feedbackobject can be set for progress reports and cancellation support- Return type:
int
- Returns:
0 in case of success
- Parameters:
feedback (Optional[QgsFeedback] = None)