QGIS API Documentation 3.41.0-Master (3291e9ff48b)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsProfileRequest Class Reference

Encapsulates properties and constraints relating to fetching elevation profiles from different sources. More...

#include <qgsprofilerequest.h>

Public Member Functions

 QgsProfileRequest (const QgsProfileRequest &other)
 
 QgsProfileRequest (QgsCurve *curve)
 Constructor for QgsProfileRequest.
 
 ~QgsProfileRequest ()
 
QgsCoordinateReferenceSystem crs () const
 Returns the desired Coordinate Reference System for the profile.
 
QgsExpressionContextexpressionContext ()
 Returns the expression context used to evaluate expressions.
 
const QgsExpressionContextexpressionContext () const
 Returns the expression context used to evaluate expressions.
 
bool operator!= (const QgsProfileRequest &other) const
 
QgsProfileRequestoperator= (const QgsProfileRequest &other)
 
bool operator== (const QgsProfileRequest &other) const
 
QgsCurveprofileCurve () const
 Returns the cross section profile curve, which represents the line along which the profile should be generated.
 
QgsProfileRequestsetCrs (const QgsCoordinateReferenceSystem &crs)
 Sets the desired Coordinate Reference System (crs) for the profile.
 
QgsProfileRequestsetExpressionContext (const QgsExpressionContext &context)
 Sets the expression context used to evaluate expressions.
 
QgsProfileRequestsetProfileCurve (QgsCurve *curve)
 Sets the cross section profile curve, which represents the line along which the profile should be generated.
 
QgsProfileRequestsetStepDistance (double distance)
 Sets the profile step distance (in crs() units).
 
QgsProfileRequestsetTerrainProvider (QgsAbstractTerrainProvider *provider)
 Sets the terrain provider.
 
QgsProfileRequestsetTolerance (double tolerance)
 Sets the tolerance of the request (in crs() units).
 
QgsProfileRequestsetTransformContext (const QgsCoordinateTransformContext &context)
 Sets the transform context, for use when transforming coordinates from a source to the request's crs()
 
double stepDistance () const
 Returns the profile step distance (in crs() units).
 
QgsAbstractTerrainProviderterrainProvider () const
 Returns the terrain provider.
 
double tolerance () const
 Returns the tolerance of the request (in crs() units).
 
QgsCoordinateTransformContext transformContext () const
 Returns the transform context, for use when transforming coordinates from a source to the request's crs()
 

Detailed Description

Encapsulates properties and constraints relating to fetching elevation profiles from different sources.

Since
QGIS 3.26

Definition at line 37 of file qgsprofilerequest.h.

Constructor & Destructor Documentation

◆ QgsProfileRequest() [1/2]

QgsProfileRequest::QgsProfileRequest ( QgsCurve curve)

Constructor for QgsProfileRequest.

The curve argument specifies the line along which the profile should be generated. Ownership is transferred to the request.

Definition at line 21 of file qgsprofilerequest.cpp.

◆ QgsProfileRequest() [2/2]

QgsProfileRequest::QgsProfileRequest ( const QgsProfileRequest other)

Definition at line 29 of file qgsprofilerequest.cpp.

◆ ~QgsProfileRequest()

QgsProfileRequest::~QgsProfileRequest ( )
default

Member Function Documentation

◆ crs()

QgsCoordinateReferenceSystem QgsProfileRequest::crs ( ) const

Returns the desired Coordinate Reference System for the profile.

This also represents the CRS associated with the profileCurve().

See also
setCrs()

Definition at line 108 of file qgsprofilerequest.cpp.

◆ expressionContext() [1/2]

QgsExpressionContext & QgsProfileRequest::expressionContext ( )
inline

Returns the expression context used to evaluate expressions.

See also
setExpressionContext()

Definition at line 187 of file qgsprofilerequest.h.

◆ expressionContext() [2/2]

const QgsExpressionContext & QgsProfileRequest::expressionContext ( ) const
inline

Returns the expression context used to evaluate expressions.

See also
setExpressionContext()

Definition at line 193 of file qgsprofilerequest.h.

◆ operator!=()

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

Definition at line 86 of file qgsprofilerequest.cpp.

◆ operator=()

QgsProfileRequest & QgsProfileRequest::operator= ( const QgsProfileRequest other)

Definition at line 41 of file qgsprofilerequest.cpp.

◆ operator==()

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

Definition at line 53 of file qgsprofilerequest.cpp.

◆ profileCurve()

QgsCurve * QgsProfileRequest::profileCurve ( ) const

Returns the cross section profile curve, which represents the line along which the profile should be generated.

The coordinate reference system of the curve is retrieved via crs().

See also
setProfileCurve()

Definition at line 97 of file qgsprofilerequest.cpp.

◆ setCrs()

QgsProfileRequest & QgsProfileRequest::setCrs ( const QgsCoordinateReferenceSystem crs)

Sets the desired Coordinate Reference System (crs) for the profile.

This also represents the CRS associated with the profileCurve().

See also
crs()

Definition at line 102 of file qgsprofilerequest.cpp.

◆ setExpressionContext()

QgsProfileRequest & QgsProfileRequest::setExpressionContext ( const QgsExpressionContext context)

Sets the expression context used to evaluate expressions.

See also
expressionContext()

Definition at line 147 of file qgsprofilerequest.cpp.

◆ setProfileCurve()

QgsProfileRequest & QgsProfileRequest::setProfileCurve ( QgsCurve curve)

Sets the cross section profile curve, which represents the line along which the profile should be generated.

Ownership of curve is transferred to the request.

The coordinate reference system of the curve is set via setCrs().

See also
profileCurve()

Definition at line 91 of file qgsprofilerequest.cpp.

◆ setStepDistance()

QgsProfileRequest & QgsProfileRequest::setStepDistance ( double  distance)

Sets the profile step distance (in crs() units).

This value determines the approximate distance between sampled points along the profileCurve(). Depending on the sources sampled, smaller step distances may be used in some circumstances. Effectively, this value is the "smallest permissible maximum distance between sampled points".

Smaller distances will take longer to calculate.

A NaN distance value will cause an appropriate step distance to be automatically calculated.

See also
stepDistance()

Definition at line 141 of file qgsprofilerequest.cpp.

◆ setTerrainProvider()

QgsProfileRequest & QgsProfileRequest::setTerrainProvider ( QgsAbstractTerrainProvider provider)

Sets the terrain provider.

Ownership of provider is transferred to the request.

See also
terrainProvider()

Definition at line 130 of file qgsprofilerequest.cpp.

◆ setTolerance()

QgsProfileRequest & QgsProfileRequest::setTolerance ( double  tolerance)

Sets the tolerance of the request (in crs() units).

This value determines how far from the profileCurve() is appropriate for inclusion of results. For instance, when a profile is generated for a point vector layer this tolerance distance will dictate how far from the actual profile curve a point can reside within to be included in the results. Other sources may completely ignore this tolerance if it is not appropriate for the particular source.

See also
tolerance()

Definition at line 124 of file qgsprofilerequest.cpp.

◆ setTransformContext()

QgsProfileRequest & QgsProfileRequest::setTransformContext ( const QgsCoordinateTransformContext context)

Sets the transform context, for use when transforming coordinates from a source to the request's crs()

See also
transformContext()

Definition at line 118 of file qgsprofilerequest.cpp.

◆ stepDistance()

double QgsProfileRequest::stepDistance ( ) const
inline

Returns the profile step distance (in crs() units).

This value determines the approximate distance between sampled points along the profileCurve(). Depending on the sources sampled, smaller step distances may be used in some circumstances. Effectively, this value is the "smallest permissible maximum distance between sampled points".

Smaller distances will take longer to calculate.

A NaN distance value indicates that an appropriate step distance will be automatically calculated.

See also
setStepDistance()

Definition at line 181 of file qgsprofilerequest.h.

◆ terrainProvider()

QgsAbstractTerrainProvider * QgsProfileRequest::terrainProvider ( ) const

Returns the terrain provider.

See also
setTerrainProvider()

Definition at line 136 of file qgsprofilerequest.cpp.

◆ tolerance()

double QgsProfileRequest::tolerance ( ) const
inline

Returns the tolerance of the request (in crs() units).

This value determines how far from the profileCurve() is appropriate for inclusion of results. For instance, when a profile is generated for a point vector layer this tolerance distance will dictate how far from the actual profile curve a point can reside within to be included in the results. Other sources may completely ignore this tolerance if it is not appropriate for the particular source.

See also
setTolerance()

Definition at line 135 of file qgsprofilerequest.h.

◆ transformContext()

QgsCoordinateTransformContext QgsProfileRequest::transformContext ( ) const

Returns the transform context, for use when transforming coordinates from a source to the request's crs()

See also
setTransformContext()

Definition at line 113 of file qgsprofilerequest.cpp.


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