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
Converts a distance size from the specified units to pixels.
Returns the range of distances to include in the generation.
Returns the DPI (dots per inch) for the profie, to be used in size conversions.
Returns the range of elevations to include in the generation.
Returns the number of map units per pixel in the distance dimension.
Returns the maximum allowed error in the generated result, in profile curve map units.
Sets the
range
of distances to include in the generation.Sets the
dpi
(dots per inch) for the profie, to be used in size conversions.Sets the
range
of elevations to include in the generation.Sets the number of map
units
per pixel in the distance dimension.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:
size (float) –
unit (QgsUnitTypes.RenderUnit) –
- 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).
See also
- Return type:
- dpi(self) float ¶
Returns the DPI (dots per inch) for the profie, to be used in size conversions.
See also
- 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).
See also
- Return type:
- mapUnitsPerDistancePixel(self) float ¶
Returns the number of map units per pixel in the distance dimension.
See also
- 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.
See also
- 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
- Parameters:
range (QgsDoubleRange) –
- setDpi(self, dpi: float)¶
Sets the
dpi
(dots per inch) for the profie, to be used in size conversions.See also
- 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
- Parameters:
range (QgsDoubleRange) –
- setMapUnitsPerDistancePixel(self, units: float)¶
Sets the number of map
units
per pixel in the distance dimension.See also
- 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.
See also
- Parameters:
error (float) –