QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
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:
39 bool isValid() const { return mIsValid; }
40
42 double meridionalScale() const { return mMeridionalScale; }
43
45 double parallelScale() const { return mParallelScale; }
46
48 double arealScale() const { return mArealScale; }
49
51 double angularDistortion() const { return mAngularDistortion; }
52
54 double meridianParallelAngle() const { return mMeridianParallelAngle; }
55
57 double meridianConvergence() const { return mMeridianConvergence; }
58
60 double tissotSemimajor() const { return mTissotSemimajor; }
61
63 double tissotSemiminor() const { return mTissotSemiminor; }
64
66 double dxDlam() const { return mDxDlam; }
67
69 double dxDphi() const { return mDxDphi; }
70
72 double dyDlam() const { return mDyDlam; }
73
75 double dyDphi() const { return mDyDphi; }
76
77#ifdef SIP_RUN
78 // clang-format off
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// clang-format on
93#endif
94
95 // clang-format off
96 private:
97 // clang-format on
98
99 bool mIsValid
100 = false;
101 double mMeridionalScale = 0;
102 double mParallelScale = 0;
103 double mArealScale = 0;
104 double mAngularDistortion = 0;
105 double mMeridianParallelAngle = 0;
106 double mMeridianConvergence = 0;
107 double mTissotSemimajor = 0;
108 double mTissotSemiminor = 0;
109 double mDxDlam = 0;
110 double mDxDphi = 0;
111 double mDyDlam = 0;
112 double mDyDphi = 0;
113
115};
116
117#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.