QGIS API Documentation 3.41.0-Master (181b2f43d8e)
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#include <QString>
23
30class CORE_EXPORT QgsProjectionFactors
31{
32 public:
33
37 bool isValid() const { return mIsValid; }
38
40 double meridionalScale() const { return mMeridionalScale; }
41
43 double parallelScale() const { return mParallelScale; }
44
46 double arealScale() const { return mArealScale; }
47
49 double angularDistortion() const { return mAngularDistortion; }
50
52 double meridianParallelAngle() const { return mMeridianParallelAngle; }
53
55 double meridianConvergence() const { return mMeridianConvergence; }
56
58 double tissotSemimajor() const { return mTissotSemimajor; }
59
61 double tissotSemiminor() const { return mTissotSemiminor; }
62
64 double dxDlam() const { return mDxDlam; }
65
67 double dxDphi() const { return mDxDphi; }
68
70 double dyDlam() const { return mDyDlam; }
71
73 double dyDphi() const { return mDyDphi; }
74
75#ifdef SIP_RUN
76 SIP_PYOBJECT __repr__();
77 % MethodCode
78 QString str;
79 if ( !sipCpp->isValid() )
80 {
81 str = QStringLiteral( "<QgsProjectionFactors: invalid>" );
82 }
83 else
84 {
85 str = QStringLiteral( "<QgsProjectionFactors>" );
86 }
87 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
88 % End
89#endif
90
91 private:
92
93 bool mIsValid = false;
94 double mMeridionalScale = 0;
95 double mParallelScale = 0;
96 double mArealScale = 0;
97 double mAngularDistortion = 0;
98 double mMeridianParallelAngle = 0;
99 double mMeridianConvergence = 0;
100 double mTissotSemimajor = 0;
101 double mTissotSemiminor = 0;
102 double mDxDlam = 0;
103 double mDxDphi = 0;
104 double mDyDlam = 0;
105 double mDyDphi = 0;
106
108};
109
110#endif // QGSPROJECTIONFACTORS_H
This class represents a coordinate reference system (CRS).
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 (λ,ϕ).
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.