QGIS API Documentation 3.99.0-Master (a8f284845db)
Loading...
Searching...
No Matches
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 <memory>
21
22#include "qgis_core.h"
23#include "qgis_sip.h"
27#include "qgscurve.h"
28
29#define SIP_NO_FILE
30
32class QgsRasterLayer;
35class QgsLineSymbol;
37
38
47{
48
49 public:
50
51 QString type() const override;
53 QVector<QgsProfileIdentifyResults> identify( const QgsProfilePoint &point, const QgsProfileIdentifyContext &context ) override;
54
55 private:
56
57 QPointer< QgsRasterLayer > mLayer;
58
60};
61
70{
71
72 public:
73
78
80
81 QString sourceId() const override;
82 Qgis::ProfileGeneratorFlags flags() const override;
85 QgsFeedback *feedback() const override;
86 QString type() const override;
87
88 private:
89 QString mId;
90 std::unique_ptr<QgsRasterBlockFeedback> mFeedback;
91
92 std::unique_ptr< QgsCurve > mProfileCurve;
93
96 QgsCoordinateTransformContext mTransformContext;
97
98 double mOffset = 0;
99 double mScale = 1;
100
101 QPointer< QgsRasterLayer > mLayer;
102 std::unique_ptr< QgsRasterDataProvider > mRasterProvider;
103
104 std::unique_ptr< QgsRasterLayerProfileResults > mResults;
105
106 int mBand = 1;
107 double mRasterUnitsPerPixelX = 1;
108 double mRasterUnitsPerPixelY = 1;
109
110 double mStepDistance = std::numeric_limits<double>::quiet_NaN();
111
113
114};
115
116#endif // QGSRASTERLAYERPROFILEGENERATOR_H
QFlags< ProfileGeneratorFlag > ProfileGeneratorFlags
Definition qgis.h:4333
Abstract base class for storage of elevation profiles.
virtual QString type() const =0
Returns the unique string identifier for the results type.
QgsAbstractProfileSurfaceGenerator(const QgsProfileRequest &request)
Constructor for QgsAbstractProfileSurfaceGenerator.
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.
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
A line symbol type, for rendering LineString and MultiLineString geometries.
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.
Feedback object tailored for raster block reading.
Base class for raster data providers.
QgsAbstractProfileResults * takeResults() override
Takes results from the generator.
QgsRasterLayerProfileGenerator(QgsRasterLayer *layer, const QgsProfileRequest &request)
Constructor for QgsRasterLayerProfileGenerator.
QgsFeedback * feedback() const override
Access to feedback object of the generator (may be nullptr).
bool generateProfile(const QgsProfileGenerationContext &context=QgsProfileGenerationContext()) override
Generate the profile (based on data stored in the class).
Qgis::ProfileGeneratorFlags flags() const override
Returns flags which reflect how the profile generator operates.
QString sourceId() const override
Returns a unique identifier representing the source of the profile.
~QgsRasterLayerProfileGenerator() override
Implementation of QgsAbstractProfileResults for raster layers.
Represents a raster layer.