QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsrasterlayerprofilegenerator.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterlayerprofilegenerator.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 QGSRASTERLAYERPROFILEGENERATOR_H
18 #define QGSRASTERLAYERPROFILEGENERATOR_H
19 
20 #include "qgis_core.h"
21 #include "qgis_sip.h"
25 
26 #include <memory>
27 
28 class QgsProfileRequest;
29 class QgsCurve;
30 class QgsRasterLayer;
33 class QgsLineSymbol;
35 
36 #define SIP_NO_FILE
37 
46 {
47 
48  public:
49 
50  QString type() const override;
51  QVector<QgsProfileIdentifyResults> identify( const QgsProfilePoint &point, const QgsProfileIdentifyContext &context ) override;
52 
53  private:
54 
55  QPointer< QgsRasterLayer > mLayer;
56 
58 };
59 
68 {
69 
70  public:
71 
76 
78 
79  QString sourceId() const override;
80  Qgis::ProfileGeneratorFlags flags() const override;
83  QgsFeedback *feedback() const override;
84 
85  private:
86  QString mId;
87  std::unique_ptr<QgsRasterBlockFeedback> mFeedback = nullptr;
88 
89  std::unique_ptr< QgsCurve > mProfileCurve;
90 
93  QgsCoordinateTransformContext mTransformContext;
94 
95  double mOffset = 0;
96  double mScale = 1;
97 
98  QPointer< QgsRasterLayer > mLayer;
99  std::unique_ptr< QgsRasterDataProvider > mRasterProvider;
100 
101  std::unique_ptr< QgsRasterLayerProfileResults > mResults;
102 
103  int mBand = 1;
104  double mRasterUnitsPerPixelX = 1;
105  double mRasterUnitsPerPixelY = 1;
106 
107  double mStepDistance = std::numeric_limits<double>::quiet_NaN();
108 
110 
111 };
112 
113 #endif // QGSRASTERLAYERPROFILEGENERATOR_H
QgsProfileIdentifyContext
Encapsulates the context of identifying profile results.
Definition: qgsabstractprofilegenerator.h:125
QgsCurve
Abstract base class for curved geometry type.
Definition: qgscurve.h:35
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition: qgscoordinatetransformcontext.h:57
qgscoordinatetransformcontext.h
qgsabstractprofilesurfacegenerator.h
QgsProfileSnapContext
Encapsulates the context of snapping a profile point.
Definition: qgsprofilesnapping.h:30
QgsProfilePoint
Encapsulates a point on a distance-elevation profile.
Definition: qgsprofilepoint.h:30
QgsProfileGenerationContext
Encapsulates the context in which an elevation profile is to be generated.
Definition: qgsabstractprofilegenerator.h:262
QgsRasterLayerProfileGenerator
Implementation of QgsAbstractProfileGenerator for raster layers.
Definition: qgsrasterlayerprofilegenerator.h:67
QgsAbstractProfileSurfaceResults
Abstract base class for storage of elevation profiles which represent a continuous surface (e....
Definition: qgsabstractprofilesurfacegenerator.h:37
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:44
QgsAbstractProfileGenerator::feedback
virtual QgsFeedback * feedback() const =0
Access to feedback object of the generator (may be nullptr)
qgis_sip.h
QgsLineSymbol
A line symbol type, for rendering LineString and MultiLineString geometries.
Definition: qgslinesymbol.h:29
QgsProfileRequest
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
Definition: qgsprofilerequest.h:37
QgsAbstractProfileSurfaceResults::identify
QVector< QgsProfileIdentifyResults > identify(const QgsProfilePoint &point, const QgsProfileIdentifyContext &context) override
Identify results visible at the specified profile point.
Definition: qgsabstractprofilesurfacegenerator.cpp:85
QgsRasterLayer
Represents a raster layer.
Definition: qgsrasterlayer.h:76
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:211
QgsAbstractProfileSurfaceGenerator
Abstract base class for objects which generate elevation profiles which represent a continuous surfac...
Definition: qgsabstractprofilesurfacegenerator.h:69
QgsRasterBlockFeedback
Feedback object tailored for raster block reading.
Definition: qgsrasterinterface.h:41
QgsRasterLayerProfileResults
Implementation of QgsAbstractProfileResults for raster layers.
Definition: qgsrasterlayerprofilegenerator.h:45
QgsAbstractProfileGenerator::flags
virtual Qgis::ProfileGeneratorFlags flags() const
Returns flags which reflect how the profile generator operates.
Definition: qgsabstractprofilegenerator.cpp:141
QgsAbstractProfileResults::type
virtual QString type() const =0
Returns the unique string identifier for the results type.
QgsAbstractProfileResults
Abstract base class for storage of elevation profiles.
Definition: qgsabstractprofilegenerator.h:193
QgsAbstractProfileGenerator::takeResults
virtual QgsAbstractProfileResults * takeResults()=0
Takes results from the generator.
QgsAbstractProfileGenerator::sourceId
virtual QString sourceId() const =0
Returns a unique identifier representing the source of the profile.
qgscoordinatereferencesystem.h
QgsRasterDataProvider
Base class for raster data providers.
Definition: qgsrasterdataprovider.h:88
QgsAbstractProfileGenerator::generateProfile
virtual bool generateProfile(const QgsProfileGenerationContext &context=QgsProfileGenerationContext())=0
Generate the profile (based on data stored in the class).