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

Inheritance diagram of qgis.analysis.QgsDerivativeFilter

Base classes

QgsNineCellFilter

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

QgsAspectFilter

Calculates aspect values in a window of 3x3 cells based on first order derivatives in x- and y- directions.

QgsHillshadeFilter

A hillshade filter.

QgsSlopeFilter

Calculates slope values in a window of 3x3 cells based on first order derivatives in x- and y- directions.

Methods

calcFirstDerX

Calculates the first order derivative in x-direction according to Horn (1981)

calcFirstDerY

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