Class: QgsProfileGenerationContext

class qgis.core.QgsProfileGenerationContext

Bases: sip.wrapper

Encapsulates the context in which an elevation profile is to be generated.

New in version 3.26:

Methods

convertDistanceToPixels

Converts a distance size from the specified units to pixels.

distanceRange

Returns the range of distances to include in the generation.

dpi

Returns the DPI (dots per inch) for the profie, to be used in size conversions.

elevationRange

Returns the range of elevations to include in the generation.

mapUnitsPerDistancePixel

Returns the number of map units per pixel in the distance dimension.

maximumErrorMapUnits

Returns the maximum allowed error in the generated result, in profile curve map units.

setDistanceRange

Sets the range of distances to include in the generation.

setDpi

Sets the dpi (dots per inch) for the profie, to be used in size conversions.

setElevationRange

Sets the range of elevations to include in the generation.

setMapUnitsPerDistancePixel

Sets the number of map units per pixel in the distance dimension.

setMaximumErrorMapUnits

Sets the maximum allowed error in the generated result, in profile curve map units.

convertDistanceToPixels(self, size: float, unit: QgsUnitTypes.RenderUnit) float

Converts a distance size from the specified units to pixels.

Parameters:
Return type:

float

distanceRange(self) QgsDoubleRange

Returns the range of distances to include in the generation.

Distances outside this range may be excluded from the generation (if it results in faster profile generation).

Return type:

QgsDoubleRange

dpi(self) float

Returns the DPI (dots per inch) for the profie, to be used in size conversions.

See also

setDpi()

Return type:

float

elevationRange(self) QgsDoubleRange

Returns the range of elevations to include in the generation.

Elevations outside this range may be excluded from the generation (if it results in faster profile generation).

Return type:

QgsDoubleRange

mapUnitsPerDistancePixel(self) float

Returns the number of map units per pixel in the distance dimension.

Return type:

float

maximumErrorMapUnits(self) float

Returns the maximum allowed error in the generated result, in profile curve map units.

By default this is NaN, which indicates that the profile should be generated in the highest precision possible. Larger values will result in a faster profile to generate.

Return type:

float

setDistanceRange(self, range: QgsDoubleRange)

Sets the range of distances to include in the generation.

Distances outside this range may be excluded from the generation (if it results in faster profile generation).

See also

distanceRange()

Parameters:

range (QgsDoubleRange) –

setDpi(self, dpi: float)

Sets the dpi (dots per inch) for the profie, to be used in size conversions.

See also

dpi()

Parameters:

dpi (float) –

setElevationRange(self, range: QgsDoubleRange)

Sets the range of elevations to include in the generation.

Elevations outside this range may be excluded from the generation (if it results in faster profile generation).

See also

elevationRange()

Parameters:

range (QgsDoubleRange) –

setMapUnitsPerDistancePixel(self, units: float)

Sets the number of map units per pixel in the distance dimension.

Parameters:

units (float) –

setMaximumErrorMapUnits(self, error: float)

Sets the maximum allowed error in the generated result, in profile curve map units.

By default this is NaN, which indicates that the profile should be generated in the highest precision possible. Larger values will result in a faster profile to generate.

Parameters:

error (float) –