QGIS API Documentation
3.28.0-Firenze (ed3ad0430f)
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 "qgis_core.h"
21
#include "
qgis_sip.h
"
22
#include "
qgscoordinatereferencesystem.h
"
23
#include "
qgscoordinatetransformcontext.h
"
24
#include "
qgsexpressioncontext.h
"
25
26
#include <memory>
27
28
class
QgsCurve
;
29
class
QgsAbstractTerrainProvider
;
30
37
class
CORE_EXPORT
QgsProfileRequest
38
{
39
40
public
:
41
48
QgsProfileRequest
(
QgsCurve
*curve
SIP_TRANSFER
);
49
53
QgsProfileRequest
(
const
QgsProfileRequest
&other );
54
55
~QgsProfileRequest
();
56
60
QgsProfileRequest
&operator=(
const
QgsProfileRequest
&other );
61
62
bool
operator==
(
const
QgsProfileRequest
&other )
const
;
63
bool
operator!=
(
const
QgsProfileRequest
&other )
const
;
64
74
QgsProfileRequest
&setProfileCurve(
QgsCurve
*curve
SIP_TRANSFER
);
75
83
QgsCurve
*profileCurve()
const
;
84
92
QgsProfileRequest
&setCrs(
const
QgsCoordinateReferenceSystem
&
crs
);
93
101
QgsCoordinateReferenceSystem
crs
()
const
;
102
109
QgsCoordinateTransformContext
transformContext()
const
;
110
117
QgsProfileRequest
&setTransformContext(
const
QgsCoordinateTransformContext
&context );
118
129
QgsProfileRequest
&setTolerance(
double
tolerance );
130
141
double
tolerance
()
const
{
return
mTolerance; }
142
150
QgsProfileRequest
&setTerrainProvider(
QgsAbstractTerrainProvider
*provider
SIP_TRANSFER
);
151
157
QgsAbstractTerrainProvider
*terrainProvider()
const
;
158
172
QgsProfileRequest
&setStepDistance(
double
distance );
173
187
double
stepDistance
()
const
{
return
mStepDistance; }
188
193
QgsExpressionContext
&
expressionContext
() {
return
mExpressionContext; }
194
199
const
QgsExpressionContext
&
expressionContext
() const
SIP_SKIP
{
return
mExpressionContext; }
200
205
QgsProfileRequest
&setExpressionContext(
const
QgsExpressionContext
&context );
206
207
private
:
208
209
std::unique_ptr< QgsCurve> mCurve;
210
QgsCoordinateReferenceSystem
mCrs;
211
QgsCoordinateTransformContext
mTransformContext;
212
213
double
mTolerance = 0;
214
215
double
mStepDistance = std::numeric_limits<float>::quiet_NaN();
216
217
std::unique_ptr< QgsAbstractTerrainProvider > mTerrainProvider;
218
QgsExpressionContext
mExpressionContext;
219
220
};
221
222
#endif
// QGSPROFILEREQUEST_H
QgsAbstractTerrainProvider
Abstract base class for terrain providers.
Definition:
qgsterrainprovider.h:41
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition:
qgscoordinatereferencesystem.h:212
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition:
qgscoordinatetransformcontext.h:58
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:455
QgsProfileRequest
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
Definition:
qgsprofilerequest.h:38
QgsProfileRequest::~QgsProfileRequest
~QgsProfileRequest()
QgsProfileRequest::expressionContext
QgsExpressionContext & expressionContext()
Returns the expression context used to evaluate expressions.
Definition:
qgsprofilerequest.h:193
QgsProfileRequest::stepDistance
double stepDistance() const
Returns the profile step distance (in crs() units).
Definition:
qgsprofilerequest.h:187
QgsProfileRequest::tolerance
double tolerance() const
Returns the tolerance of the request (in crs() units).
Definition:
qgsprofilerequest.h:141
QgsProfileRequest::expressionContext
const QgsExpressionContext & expressionContext() const
Returns the expression context used to evaluate expressions.
Definition:
qgsprofilerequest.h:199
qgis_sip.h
SIP_SKIP
#define SIP_SKIP
Definition:
qgis_sip.h:126
SIP_TRANSFER
#define SIP_TRANSFER
Definition:
qgis_sip.h:36
qgscoordinatereferencesystem.h
qgscoordinatetransformcontext.h
qgsexpressioncontext.h
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition:
qgsfeatureiterator.h:425
operator!=
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition:
qgsfeatureiterator.h:430
crs
const QgsCoordinateReferenceSystem & crs
Definition:
qgswfsgetfeature.cpp:53
Generated on Sat Oct 22 2022 16:10:47 for QGIS API Documentation by
1.9.4