QGIS API Documentation 3.99.0-Master (e9821da5c6b)
Loading...
Searching...
No Matches
qgsprojectionfactors.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprojectionfactors.h
3 ------------------------
4 begin : May 2021
5 copyright : (C) 2021 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 QGSPROJECTIONFACTORS_H
18#define QGSPROJECTIONFACTORS_H
19
20#include "qgis_core.h"
21#include "qgis_sip.h"
22
23#include <QString>
24
25using namespace Qt::StringLiterals;
26
33class CORE_EXPORT QgsProjectionFactors
34{
35 public:
36
40 bool isValid() const { return mIsValid; }
41
43 double meridionalScale() const { return mMeridionalScale; }
44
46 double parallelScale() const { return mParallelScale; }
47
49 double arealScale() const { return mArealScale; }
50
52 double angularDistortion() const { return mAngularDistortion; }
53
55 double meridianParallelAngle() const { return mMeridianParallelAngle; }
56
58 double meridianConvergence() const { return mMeridianConvergence; }
59
61 double tissotSemimajor() const { return mTissotSemimajor; }
62
64 double tissotSemiminor() const { return mTissotSemiminor; }
65
67 double dxDlam() const { return mDxDlam; }
68
70 double dxDphi() const { return mDxDphi; }
71
73 double dyDlam() const { return mDyDlam; }
74
76 double dyDphi() const { return mDyDphi; }
77
78#ifdef SIP_RUN
79 SIP_PYOBJECT __repr__();
80 % MethodCode
81 QString str;
82 if ( !sipCpp->isValid() )
83 {
84 str = u"<QgsProjectionFactors: invalid>"_s;
85 }
86 else
87 {
88 str = u"<QgsProjectionFactors>"_s;
89 }
90 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
91 % End
92#endif
93
94 private:
95
96 bool mIsValid = false;
97 double mMeridionalScale = 0;
98 double mParallelScale = 0;
99 double mArealScale = 0;
100 double mAngularDistortion = 0;
101 double mMeridianParallelAngle = 0;
102 double mMeridianConvergence = 0;
103 double mTissotSemimajor = 0;
104 double mTissotSemiminor = 0;
105 double mDxDlam = 0;
106 double mDxDphi = 0;
107 double mDyDlam = 0;
108 double mDyDphi = 0;
109
111};
112
113#endif // QGSPROJECTIONFACTORS_H
Contains various cartographic properties, such as scale factors, angular distortion and meridian conv...
double meridianParallelAngle() const
Meridian/parallel angle (in degrees), θ′, at coordinate (λ,ϕ).
double parallelScale() const
Parallel scale at coordinate (λ,ϕ).
double dyDphi() const
Partial derivative ∂y/∂ϕ of coordinate (λ,ϕ).
double meridionalScale() const
Meridional scale at coordinate (λ,ϕ).
double meridianConvergence() const
Meridian convergence (in degrees) at coordinate (λ,ϕ). Sometimes also described as grid declination.
double arealScale() const
Areal scale factor at coordinate (λ,ϕ).
double angularDistortion() const
Angular distortion at coordinate (λ,ϕ).
double dxDlam() const
Partial derivative ∂x/∂λ of coordinate (λ,ϕ).
double dyDlam() const
Partial derivative ∂y/∂λ of coordinate (λ,ϕ).
friend class QgsCoordinateReferenceSystem
double tissotSemiminor() const
Minimum scale factor.
bool isValid() const
Returns true if the factors are valid, or false if they could not be calculated.
double dxDphi() const
Partial derivative ∂x/∂ϕ of coordinate (λ,ϕ).
double tissotSemimajor() const
Maximum scale factor.