QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 
30 class 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
QgsProjectionFactors::meridianConvergence
double meridianConvergence() const
Meridian convergence (in degrees) at coordinate (λ,ϕ). Sometimes also described as grid declination.
Definition: qgsprojectionfactors.h:55
QgsProjectionFactors::meridianParallelAngle
double meridianParallelAngle() const
Meridian/parallel angle (in degrees), θ′, at coordinate (λ,ϕ).
Definition: qgsprojectionfactors.h:52
QgsProjectionFactors::dxDlam
double dxDlam() const
Partial derivative ∂x/∂λ of coordinate (λ,ϕ).
Definition: qgsprojectionfactors.h:64
QgsProjectionFactors::tissotSemimajor
double tissotSemimajor() const
Maximum scale factor.
Definition: qgsprojectionfactors.h:58
QgsProjectionFactors::dxDphi
double dxDphi() const
Partial derivative ∂x/∂ϕ of coordinate (λ,ϕ).
Definition: qgsprojectionfactors.h:67
QgsProjectionFactors::angularDistortion
double angularDistortion() const
Angular distortion at coordinate (λ,ϕ).
Definition: qgsprojectionfactors.h:49
QgsProjectionFactors::parallelScale
double parallelScale() const
Parallel scale at coordinate (λ,ϕ).
Definition: qgsprojectionfactors.h:43
qgis_sip.h
QgsProjectionFactors::tissotSemiminor
double tissotSemiminor() const
Minimum scale factor.
Definition: qgsprojectionfactors.h:61
QgsProjectionFactors::arealScale
double arealScale() const
Areal scale factor at coordinate (λ,ϕ).
Definition: qgsprojectionfactors.h:46
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:211
QgsProjectionFactors::isValid
bool isValid() const
Returns true if the factors are valid, or false if they could not be calculated.
Definition: qgsprojectionfactors.h:37
QgsProjectionFactors
contains various cartographic properties, such as scale factors, angular distortion and meridian conv...
Definition: qgsprojectionfactors.h:30
str
#define str(x)
Definition: qgis.cpp:37
QgsProjectionFactors::meridionalScale
double meridionalScale() const
Meridional scale at coordinate (λ,ϕ).
Definition: qgsprojectionfactors.h:40
QgsProjectionFactors::dyDphi
double dyDphi() const
Partial derivative ∂y/∂ϕ of coordinate (λ,ϕ).
Definition: qgsprojectionfactors.h:73
QgsProjectionFactors::dyDlam
double dyDlam() const
Partial derivative ∂y/∂λ of coordinate (λ,ϕ).
Definition: qgsprojectionfactors.h:70