30 : mCurve( other.mCurve ? other.mCurve->clone() : nullptr )
32 , mTransformContext( other.mTransformContext )
33 , mTolerance( other.mTolerance )
34 , mStepDistance( other.mStepDistance )
35 , mTerrainProvider( other.mTerrainProvider ? other.mTerrainProvider->clone() : nullptr )
36 , mExpressionContext( other.mExpressionContext )
43 mCurve.reset( other.mCurve ? other.mCurve->clone() : nullptr );
45 mTransformContext = other.mTransformContext;
46 mTolerance = other.mTolerance;
47 mStepDistance = other.mStepDistance;
48 mTerrainProvider.reset( other.mTerrainProvider ? other.mTerrainProvider->clone() : nullptr );
49 mExpressionContext = other.mExpressionContext;
58 || !( mTransformContext == other.mTransformContext ) )
61 if ( ( !mCurve && other.mCurve )
62 || ( mCurve && !other.mCurve ) )
66 else if ( mCurve && other.mCurve )
68 if ( !mCurve->equals( *other.mCurve ) )
72 if ( ( mTerrainProvider && !other.mTerrainProvider )
73 || ( !mTerrainProvider && other.mTerrainProvider ) )
77 else if ( mTerrainProvider && other.mTerrainProvider )
79 if ( !mTerrainProvider->equals( other.mTerrainProvider.get() ) )
88 return !( *
this == other );
93 mCurve.reset( curve );
115 return mTransformContext;
120 mTransformContext = context;
132 mTerrainProvider.reset( provider );
138 return mTerrainProvider.get();
143 mStepDistance = distance;
149 mExpressionContext = context;
Abstract base class for terrain providers.
This class represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Abstract base class for curved geometry type.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
QgsProfileRequest & setStepDistance(double distance)
Sets the profile step distance (in crs() units).
QgsAbstractTerrainProvider * terrainProvider() const
Returns the terrain provider.
QgsProfileRequest(QgsCurve *curve)
Constructor for QgsProfileRequest.
QgsProfileRequest & setExpressionContext(const QgsExpressionContext &context)
Sets the expression context used to evaluate expressions.
bool operator==(const QgsProfileRequest &other) const
QgsCoordinateReferenceSystem crs() const
Returns the desired Coordinate Reference System for the profile.
bool operator!=(const QgsProfileRequest &other) const
double tolerance() const
Returns the tolerance of the request (in crs() units).
QgsProfileRequest & setTransformContext(const QgsCoordinateTransformContext &context)
Sets the transform context, for use when transforming coordinates from a source to the request's crs(...
QgsCurve * profileCurve() const
Returns the cross section profile curve, which represents the line along which the profile should be ...
QgsProfileRequest & setTerrainProvider(QgsAbstractTerrainProvider *provider)
Sets the terrain provider.
QgsProfileRequest & setProfileCurve(QgsCurve *curve)
Sets the cross section profile curve, which represents the line along which the profile should be gen...
QgsProfileRequest & setTolerance(double tolerance)
Sets the tolerance of the request (in crs() units).
QgsProfileRequest & setCrs(const QgsCoordinateReferenceSystem &crs)
Sets the desired Coordinate Reference System (crs) for the profile.
QgsProfileRequest & operator=(const QgsProfileRequest &other)
QgsCoordinateTransformContext transformContext() const
Returns the transform context, for use when transforming coordinates from a source to the request's c...
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
const QgsCoordinateReferenceSystem & crs