QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
elevation
qgsprofilerequest.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsprofilerequest.h
3
---------------
4
begin : February 2022
5
copyright : (C) 2022 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
#ifndef QGSPROFILEREQUEST_H
18
#define QGSPROFILEREQUEST_H
19
20
#include <memory>
21
22
#include "qgis_core.h"
23
#include "
qgis_sip.h
"
24
#include "
qgscoordinatereferencesystem.h
"
25
#include "
qgscoordinatetransformcontext.h
"
26
#include "
qgsexpressioncontext.h
"
27
28
class
QgsCurve
;
29
class
QgsAbstractTerrainProvider
;
30
37
class
CORE_EXPORT
QgsProfileRequest
38
{
39
public
:
46
QgsProfileRequest
(
QgsCurve
*curve
SIP_TRANSFER
);
47
48
QgsProfileRequest
(
const
QgsProfileRequest
&other );
49
50
~QgsProfileRequest
();
51
52
QgsProfileRequest
&
operator=
(
const
QgsProfileRequest
&other );
53
54
bool
operator==
(
const
QgsProfileRequest
&other )
const
;
55
bool
operator!=
(
const
QgsProfileRequest
&other )
const
;
56
66
QgsProfileRequest
&
setProfileCurve
(
QgsCurve
*curve
SIP_TRANSFER
);
67
75
QgsCurve
*
profileCurve
()
const
;
76
84
QgsProfileRequest
&
setCrs
(
const
QgsCoordinateReferenceSystem
&
crs
);
85
93
QgsCoordinateReferenceSystem
crs
()
const
;
94
101
QgsCoordinateTransformContext
transformContext
()
const
;
102
109
QgsProfileRequest
&
setTransformContext
(
const
QgsCoordinateTransformContext
&context );
110
121
QgsProfileRequest
&
setTolerance
(
double
tolerance
);
122
133
double
tolerance
()
const
{
return
mTolerance; }
134
142
QgsProfileRequest
&setTerrainProvider(
QgsAbstractTerrainProvider
*provider
SIP_TRANSFER
);
143
149
QgsAbstractTerrainProvider
*terrainProvider()
const
;
150
164
QgsProfileRequest
&setStepDistance(
double
distance );
165
179
double
stepDistance
()
const
{
return
mStepDistance; }
180
185
QgsExpressionContext
&
expressionContext
() {
return
mExpressionContext; }
186
191
const
QgsExpressionContext
&
expressionContext
() const
SIP_SKIP
{
return
mExpressionContext; }
192
197
QgsProfileRequest
&setExpressionContext(
const
QgsExpressionContext
&context );
198
199
private
:
200
std::unique_ptr< QgsCurve> mCurve;
201
QgsCoordinateReferenceSystem
mCrs;
202
QgsCoordinateTransformContext
mTransformContext;
203
204
double
mTolerance = 0;
205
206
double
mStepDistance = std::numeric_limits<float>::quiet_NaN();
207
208
std::unique_ptr< QgsAbstractTerrainProvider > mTerrainProvider;
209
QgsExpressionContext
mExpressionContext;
210
};
211
212
#endif
// QGSPROFILEREQUEST_H
QgsAbstractTerrainProvider
Abstract base class for terrain providers.
Definition
qgsterrainprovider.h:44
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition
qgscoordinatetransformcontext.h:61
QgsCurve
Abstract base class for curved geometry type.
Definition
qgscurve.h:36
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition
qgsexpressioncontext.h:491
QgsProfileRequest
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
Definition
qgsprofilerequest.h:38
QgsProfileRequest::~QgsProfileRequest
~QgsProfileRequest()
QgsProfileRequest::QgsProfileRequest
QgsProfileRequest(QgsCurve *curve)
Constructor for QgsProfileRequest.
Definition
qgsprofilerequest.cpp:22
QgsProfileRequest::expressionContext
QgsExpressionContext & expressionContext()
Returns the expression context used to evaluate expressions.
Definition
qgsprofilerequest.h:185
QgsProfileRequest::crs
QgsCoordinateReferenceSystem crs() const
Returns the desired Coordinate Reference System for the profile.
Definition
qgsprofilerequest.cpp:103
QgsProfileRequest::stepDistance
double stepDistance() const
Returns the profile step distance (in crs() units).
Definition
qgsprofilerequest.h:179
QgsProfileRequest::tolerance
double tolerance() const
Returns the tolerance of the request (in crs() units).
Definition
qgsprofilerequest.h:133
QgsProfileRequest::setTransformContext
QgsProfileRequest & setTransformContext(const QgsCoordinateTransformContext &context)
Sets the transform context, for use when transforming coordinates from a source to the request's crs(...
Definition
qgsprofilerequest.cpp:113
QgsProfileRequest::profileCurve
QgsCurve * profileCurve() const
Returns the cross section profile curve, which represents the line along which the profile should be ...
Definition
qgsprofilerequest.cpp:92
QgsProfileRequest::expressionContext
const QgsExpressionContext & expressionContext() const
Returns the expression context used to evaluate expressions.
Definition
qgsprofilerequest.h:191
QgsProfileRequest::setProfileCurve
QgsProfileRequest & setProfileCurve(QgsCurve *curve)
Sets the cross section profile curve, which represents the line along which the profile should be gen...
Definition
qgsprofilerequest.cpp:86
QgsProfileRequest::setTolerance
QgsProfileRequest & setTolerance(double tolerance)
Sets the tolerance of the request (in crs() units).
Definition
qgsprofilerequest.cpp:119
QgsProfileRequest::setCrs
QgsProfileRequest & setCrs(const QgsCoordinateReferenceSystem &crs)
Sets the desired Coordinate Reference System (crs) for the profile.
Definition
qgsprofilerequest.cpp:97
QgsProfileRequest::operator=
QgsProfileRequest & operator=(const QgsProfileRequest &other)
Definition
qgsprofilerequest.cpp:38
QgsProfileRequest::transformContext
QgsCoordinateTransformContext transformContext() const
Returns the transform context, for use when transforming coordinates from a source to the request's c...
Definition
qgsprofilerequest.cpp:108
qgis_sip.h
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
qgscoordinatereferencesystem.h
qgscoordinatetransformcontext.h
qgsexpressioncontext.h
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:427
operator!=
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:432
Generated on
for QGIS API Documentation by
1.17.0