Class: QgsDerivativeFilter¶
Adds the ability to calculate derivatives in x- and y-directions.
Needs to be subclassed (e.g. for slope and aspect).
Class Hierarchy¶
Base classes¶
Base class for raster analysis methods that work with a 3x3 cell filter and calculate the value of each cell based on the cell value and the eight neighbour cells. |
Subclasses¶
Calculates aspect values in a window of 3x3 cells based on first order derivatives in x- and y- directions. |
|
A hillshade filter. |
|
Calculates slope values in a window of 3x3 cells based on first order derivatives in x- and y- directions. |
Methods
Calculates the first order derivative in x-direction according to Horn (1981) |
|
Calculates the first order derivative in y-direction according to Horn (1981) |
- class qgis.analysis.QgsDerivativeFilter[source]¶
Bases:
QgsNineCellFilter- calcFirstDerX(self, x11: float, x21: float, x31: float, x12: float, x22: float, x32: float, x13: float, x23: float, x33: float) float[source]¶
Calculates the first order derivative in x-direction according to Horn (1981)
- Parameters:
x11 (float)
x21 (float)
x31 (float)
x12 (float)
x22 (float)
x32 (float)
x13 (float)
x23 (float)
x33 (float)
- Return type:
float
- calcFirstDerY(self, x11: float, x21: float, x31: float, x12: float, x22: float, x32: float, x13: float, x23: float, x33: float) float[source]¶
Calculates the first order derivative in y-direction according to Horn (1981)
- Parameters:
x11 (float)
x21 (float)
x31 (float)
x12 (float)
x22 (float)
x32 (float)
x13 (float)
x23 (float)
x33 (float)
- Return type:
float