QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Public Member Functions | List of all members
QgsProfileGenerationContext Class Reference

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

#include <qgsabstractprofilegenerator.h>

Public Member Functions

double convertDistanceToPixels (double size, Qgis::RenderUnit unit) const
 Converts a distance size from the specified units to pixels. More...
 
QgsDoubleRange distanceRange () const
 Returns the range of distances to include in the generation. More...
 
double dpi () const
 Returns the DPI (dots per inch) for the profie, to be used in size conversions. More...
 
QgsDoubleRange elevationRange () const
 Returns the range of elevations to include in the generation. More...
 
double mapUnitsPerDistancePixel () const
 Returns the number of map units per pixel in the distance dimension. More...
 
double maximumErrorMapUnits () const
 Returns the maximum allowed error in the generated result, in profile curve map units. More...
 
bool operator!= (const QgsProfileGenerationContext &other) const
 
bool operator== (const QgsProfileGenerationContext &other) const
 
void setDistanceRange (const QgsDoubleRange &range)
 Sets the range of distances to include in the generation. More...
 
void setDpi (double dpi)
 Sets the dpi (dots per inch) for the profie, to be used in size conversions. More...
 
void setElevationRange (const QgsDoubleRange &range)
 Sets the range of elevations to include in the generation. More...
 
void setMapUnitsPerDistancePixel (double units)
 Sets the number of map units per pixel in the distance dimension. More...
 
void setMaximumErrorMapUnits (double error)
 Sets the maximum allowed error in the generated result, in profile curve map units. More...
 

Detailed Description

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

Since
QGIS 3.26

Definition at line 261 of file qgsabstractprofilegenerator.h.

Member Function Documentation

◆ convertDistanceToPixels()

double QgsProfileGenerationContext::convertDistanceToPixels ( double  size,
Qgis::RenderUnit  unit 
) const

Converts a distance size from the specified units to pixels.

Definition at line 89 of file qgsabstractprofilegenerator.cpp.

◆ distanceRange()

QgsDoubleRange QgsProfileGenerationContext::distanceRange ( ) const
inline

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
setDistanceRange()

Definition at line 306 of file qgsabstractprofilegenerator.h.

◆ dpi()

double QgsProfileGenerationContext::dpi ( ) const
inline

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

See also
setDpi()

Definition at line 347 of file qgsabstractprofilegenerator.h.

◆ elevationRange()

QgsDoubleRange QgsProfileGenerationContext::elevationRange ( ) const
inline

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
setElevationRange()

Definition at line 324 of file qgsabstractprofilegenerator.h.

◆ mapUnitsPerDistancePixel()

double QgsProfileGenerationContext::mapUnitsPerDistancePixel ( ) const
inline

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

See also
setMapUnitsPerDistancePixel()

Definition at line 290 of file qgsabstractprofilegenerator.h.

◆ maximumErrorMapUnits()

double QgsProfileGenerationContext::maximumErrorMapUnits ( ) const
inline

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
setMaximumErrorMapUnits()

Definition at line 273 of file qgsabstractprofilegenerator.h.

◆ operator!=()

bool QgsProfileGenerationContext::operator!= ( const QgsProfileGenerationContext other) const

Definition at line 136 of file qgsabstractprofilegenerator.cpp.

◆ operator==()

bool QgsProfileGenerationContext::operator== ( const QgsProfileGenerationContext other) const

Definition at line 127 of file qgsabstractprofilegenerator.cpp.

◆ setDistanceRange()

void QgsProfileGenerationContext::setDistanceRange ( const QgsDoubleRange range)
inline

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()

Definition at line 315 of file qgsabstractprofilegenerator.h.

◆ setDpi()

void QgsProfileGenerationContext::setDpi ( double  dpi)
inline

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

See also
dpi()

Definition at line 340 of file qgsabstractprofilegenerator.h.

◆ setElevationRange()

void QgsProfileGenerationContext::setElevationRange ( const QgsDoubleRange range)
inline

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()

Definition at line 333 of file qgsabstractprofilegenerator.h.

◆ setMapUnitsPerDistancePixel()

void QgsProfileGenerationContext::setMapUnitsPerDistancePixel ( double  units)
inline

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

See also
mapUnitsPerDistancePixel()

Definition at line 297 of file qgsabstractprofilegenerator.h.

◆ setMaximumErrorMapUnits()

void QgsProfileGenerationContext::setMaximumErrorMapUnits ( double  error)
inline

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
maximumErrorMapUnits()

Definition at line 283 of file qgsabstractprofilegenerator.h.


The documentation for this class was generated from the following files: