QGIS API Documentation 3.99.0-Master (26c88405ac0)
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
31class CORE_EXPORT QgsProjectionFactors
32{
33 public:
34
38 bool isValid() const { return mIsValid; }
39
41 double meridionalScale() const { return mMeridionalScale; }
42
44 double parallelScale() const { return mParallelScale; }
45
47 double arealScale() const { return mArealScale; }
48
50 double angularDistortion() const { return mAngularDistortion; }
51
53 double meridianParallelAngle() const { return mMeridianParallelAngle; }
54
56 double meridianConvergence() const { return mMeridianConvergence; }
57
59 double tissotSemimajor() const { return mTissotSemimajor; }
60
62 double tissotSemiminor() const { return mTissotSemiminor; }
63
65 double dxDlam() const { return mDxDlam; }
66
68 double dxDphi() const { return mDxDphi; }
69
71 double dyDlam() const { return mDyDlam; }
72
74 double dyDphi() const { return mDyDphi; }
75
76#ifdef SIP_RUN
77 SIP_PYOBJECT __repr__();
78 % MethodCode
79 QString str;
80 if ( !sipCpp->isValid() )
81 {
82 str = QStringLiteral( "<QgsProjectionFactors: invalid>" );
83 }
84 else
85 {
86 str = QStringLiteral( "<QgsProjectionFactors>" );
87 }
88 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
89 % End
90#endif
91
92 private:
93
94 bool mIsValid = false;
95 double mMeridionalScale = 0;
96 double mParallelScale = 0;
97 double mArealScale = 0;
98 double mAngularDistortion = 0;
99 double mMeridianParallelAngle = 0;
100 double mMeridianConvergence = 0;
101 double mTissotSemimajor = 0;
102 double mTissotSemiminor = 0;
103 double mDxDlam = 0;
104 double mDxDphi = 0;
105 double mDyDlam = 0;
106 double mDyDphi = 0;
107
109};
110
111#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.