Class: QgsRelief

class qgis.analysis.QgsRelief

Bases: sip.wrapper

Produces colored relief rasters from DEM*

Methods

addReliefColorClass

param color

calculateOptimizedReliefClasses

Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression

clearReliefColors

exportFrequencyDistributionToCsv

Write frequency of elevation values to file for manual inspection

processRaster

Starts the calculation, reads from mInputFile and stores the result in mOutputFile

reliefColors

rtype

List[QgsRelief.ReliefColor]

setReliefColors

param c

setZFactor

param factor

zFactor

rtype

float

class ReliefColor(c: Union[QColor, Qt.GlobalColor], min: float, max: float)

Bases: sip.wrapper

QgsRelief.ReliefColor(QgsRelief.ReliefColor)

Parameters
  • c (Union[QColor) –

  • min (float) –

  • max (float) –

color
maxElevation
minElevation
addReliefColorClass(self, color: QgsRelief.ReliefColor)
Parameters

color (QgsRelief.ReliefColor) –

calculateOptimizedReliefClasses(self) → List[QgsRelief.ReliefColor]

Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression

Return type

List[QgsRelief.ReliefColor]

Returns

true in case of success*

clearReliefColors(self)
exportFrequencyDistributionToCsv(self, file: str) → bool

Write frequency of elevation values to file for manual inspection

Parameters

file (str) –

Return type

bool

processRaster(self, feedback: QgsFeedback = None) → int

Starts the calculation, reads from mInputFile and stores the result in mOutputFile

Parameters

feedback (QgsFeedback = None) – feedback object that receives update and that is checked for cancellation.

Return type

int

Returns

0 in case of success*

reliefColors(self) → List[QgsRelief.ReliefColor]
Return type

List[QgsRelief.ReliefColor]

setReliefColors(self, c: Iterable[QgsRelief.ReliefColor])
Parameters

c (Iterable[QgsRelief.ReliefColor]) –

setZFactor(self, factor: float)
Parameters

factor (float) –

zFactor(self) → float
Return type

float