QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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 "qgis_core.h"
21#include "qgis_sip.h"
26#include "qgstriangularmesh.h"
27
28#include <memory>
29
31class QgsCurve;
32class QgsMeshLayer;
35
36#define SIP_NO_FILE
37
38
47{
48
49 public:
50
51 QString type() const override;
52 QVector<QgsProfileIdentifyResults> identify( const QgsProfilePoint &point, const QgsProfileIdentifyContext &context ) override;
53
54 private:
55
56 QPointer< QgsMeshLayer > mLayer;
57
59};
60
61
70{
71
72 public:
73
78
80
81 QString sourceId() const override;
82 bool generateProfile( const QgsProfileGenerationContext &context = QgsProfileGenerationContext() ) override;
83 QgsAbstractProfileResults *takeResults() override;
84 QgsFeedback *feedback() const override;
85
86 private:
87
88 double heightAt( double x, double y );
89
90 QString mId;
91 std::unique_ptr<QgsFeedback> mFeedback = nullptr;
92
93 std::unique_ptr< QgsCurve > mProfileCurve;
94
97 QgsCoordinateTransformContext mTransformContext;
98
99 double mOffset = 0;
100 double mScale = 1;
101 QPointer< QgsMeshLayer > mLayer;
102
103 double mStepDistance = std::numeric_limits<double>::quiet_NaN();
104
105 QgsTriangularMesh mTriangularMesh;
106
107 QgsCoordinateTransform mLayerToTargetTransform;
108
109 std::unique_ptr< QgsMeshLayerProfileResults > mResults;
110
112
113
114};
115
116#endif // QGSMESHLAYERPROFILEGENERATOR_H
Abstract base class for storage of elevation profiles.
virtual QString type() const =0
Returns the unique string identifier for the results type.
Abstract base class for objects which generate elevation profiles which represent a continuous surfac...
Abstract base class for storage of elevation profiles which represent a continuous surface (e....
QVector< QgsProfileIdentifyResults > identify(const QgsProfilePoint &point, const QgsProfileIdentifyContext &context) override
Identify results visible at the specified profile point.
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.
Class for doing transforms between two map coordinate systems.
Abstract base class for curved geometry type.
Definition qgscurve.h:35
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
Implementation of QgsAbstractProfileGenerator for mesh layers.
~QgsMeshLayerProfileGenerator() override
Implementation of QgsAbstractProfileResults for mesh layers.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Encapsulates the context in which an elevation profile is to be generated.
Encapsulates the context of identifying profile results.
Encapsulates a point on a distance-elevation profile.
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
Encapsulates the context of snapping a profile point.
Triangular/Derived Mesh is mesh with vertices in map coordinates.