QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
mesh
qgsmeshlayerprofilegenerator.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmeshlayerprofilegenerator.h
3
---------------
4
begin : March 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 QGSMESHLAYERPROFILEGENERATOR_H
18
#define QGSMESHLAYERPROFILEGENERATOR_H
19
20
#include <memory>
21
22
#include "qgis_core.h"
23
#include "
qgis_sip.h
"
24
#include "
qgsabstractprofilesurfacegenerator.h
"
25
#include "
qgscoordinatereferencesystem.h
"
26
#include "
qgscoordinatetransform.h
"
27
#include "
qgscoordinatetransformcontext.h
"
28
#include "
qgstriangularmesh.h
"
29
30
#define SIP_NO_FILE
31
32
class
QgsProfileRequest
;
33
class
QgsCurve
;
34
class
QgsMeshLayer
;
35
class
QgsAbstractTerrainProvider
;
36
class
QgsProfileSnapContext
;
37
38
46
class
CORE_EXPORT
QgsMeshLayerProfileResults
:
public
QgsAbstractProfileSurfaceResults
47
{
48
public
:
49
QString
type
()
const override
;
50
using
QgsAbstractProfileSurfaceResults::identify
;
51
QVector<QgsProfileIdentifyResults>
identify
(
const
QgsProfilePoint
&point,
const
QgsProfileIdentifyContext
&context )
override
;
52
53
private
:
54
QPointer< QgsMeshLayer > mLayer;
55
56
friend
class
QgsMeshLayerProfileGenerator
;
57
};
58
59
67
class
CORE_EXPORT
QgsMeshLayerProfileGenerator
:
public
QgsAbstractProfileSurfaceGenerator
68
{
69
public
:
73
QgsMeshLayerProfileGenerator
(
QgsMeshLayer
*layer,
const
QgsProfileRequest
&request );
74
75
~QgsMeshLayerProfileGenerator
()
override
;
76
77
QString
sourceId
()
const override
;
78
bool
generateProfile
(
const
QgsProfileGenerationContext
&context =
QgsProfileGenerationContext
() )
override
;
79
QgsAbstractProfileResults
*
takeResults
()
override
;
80
QgsFeedback
*
feedback
()
const override
;
81
QString
type
()
const override
;
82
83
private
:
84
double
heightAt(
double
x,
double
y );
85
86
QString mId;
87
std::unique_ptr<QgsFeedback> mFeedback =
nullptr
;
88
89
std::unique_ptr< QgsCurve > mProfileCurve;
90
91
QgsCoordinateReferenceSystem
mSourceCrs;
92
QgsCoordinateReferenceSystem
mTargetCrs;
93
QgsCoordinateTransformContext
mTransformContext;
94
95
double
mOffset = 0;
96
double
mScale = 1;
97
QPointer< QgsMeshLayer > mLayer;
98
99
double
mStepDistance = std::numeric_limits<double>::quiet_NaN();
100
101
QgsTriangularMesh
mTriangularMesh;
102
103
QgsCoordinateTransform
mLayerToTargetTransform;
104
105
std::unique_ptr< QgsMeshLayerProfileResults > mResults;
106
107
friend
class
QgsMeshLayerProfileResults
;
108
};
109
110
#endif
// QGSMESHLAYERPROFILEGENERATOR_H
QgsAbstractProfileResults
Abstract base class for storage of elevation profiles.
Definition
qgsabstractprofilegenerator.h:184
QgsAbstractProfileResults::type
virtual QString type() const =0
Returns the unique string identifier for the results type.
QgsAbstractProfileSurfaceGenerator::QgsAbstractProfileSurfaceGenerator
QgsAbstractProfileSurfaceGenerator(const QgsProfileRequest &request)
Constructor for QgsAbstractProfileSurfaceGenerator.
Definition
qgsabstractprofilesurfacegenerator.cpp:374
QgsAbstractProfileSurfaceResults
Abstract base class for storage of elevation profiles which represent a continuous surface (e....
Definition
qgsabstractprofilesurfacegenerator.h:51
QgsAbstractProfileSurfaceResults::identify
QVector< QgsProfileIdentifyResults > identify(const QgsProfilePoint &point, const QgsProfileIdentifyContext &context) override
Identify results visible at the specified profile point.
Definition
qgsabstractprofilesurfacegenerator.cpp:203
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
QgsCoordinateTransform
Handles coordinate transforms between two coordinate systems.
Definition
qgscoordinatetransform.h:63
QgsCurve
Abstract base class for curved geometry type.
Definition
qgscurve.h:36
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition
qgsfeedback.h:44
QgsMeshLayerProfileGenerator::~QgsMeshLayerProfileGenerator
~QgsMeshLayerProfileGenerator() override
QgsMeshLayerProfileGenerator::feedback
QgsFeedback * feedback() const override
Access to feedback object of the generator (may be nullptr).
Definition
qgsmeshlayerprofilegenerator.cpp:184
QgsMeshLayerProfileGenerator::QgsMeshLayerProfileGenerator
QgsMeshLayerProfileGenerator(QgsMeshLayer *layer, const QgsProfileRequest &request)
Constructor for QgsMeshLayerProfileGenerator.
Definition
qgsmeshlayerprofilegenerator.cpp:63
QgsMeshLayerProfileGenerator::takeResults
QgsAbstractProfileResults * takeResults() override
Takes results from the generator.
Definition
qgsmeshlayerprofilegenerator.cpp:179
QgsMeshLayerProfileGenerator::QgsMeshLayerProfileResults
friend class QgsMeshLayerProfileResults
Definition
qgsmeshlayerprofilegenerator.h:107
QgsMeshLayerProfileGenerator::generateProfile
bool generateProfile(const QgsProfileGenerationContext &context=QgsProfileGenerationContext()) override
Generate the profile (based on data stored in the class).
Definition
qgsmeshlayerprofilegenerator.cpp:97
QgsMeshLayerProfileGenerator::sourceId
QString sourceId() const override
Returns a unique identifier representing the source of the profile.
Definition
qgsmeshlayerprofilegenerator.cpp:85
QgsMeshLayerProfileResults
Implementation of QgsAbstractProfileResults for mesh layers.
Definition
qgsmeshlayerprofilegenerator.h:47
QgsMeshLayerProfileResults::QgsMeshLayerProfileGenerator
friend class QgsMeshLayerProfileGenerator
Definition
qgsmeshlayerprofilegenerator.h:56
QgsMeshLayer
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition
qgsmeshlayer.h:105
QgsProfileGenerationContext
Encapsulates the context in which an elevation profile is to be generated.
Definition
qgsabstractprofilegenerator.h:276
QgsProfileIdentifyContext
Encapsulates the context of identifying profile results.
Definition
qgsabstractprofilegenerator.h:121
QgsProfilePoint
Encapsulates a point on a distance-elevation profile.
Definition
qgsprofilepoint.h:35
QgsProfileRequest
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
Definition
qgsprofilerequest.h:38
QgsProfileSnapContext
Encapsulates the context of snapping a profile point.
Definition
qgsprofilesnapping.h:31
QgsTriangularMesh
A triangular/derived mesh with vertices in map coordinates.
Definition
qgstriangularmesh.h:54
qgis_sip.h
qgsabstractprofilesurfacegenerator.h
qgscoordinatereferencesystem.h
qgscoordinatetransform.h
qgscoordinatetransformcontext.h
qgstriangularmesh.h
Generated on
for QGIS API Documentation by
1.17.0