QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsellipsoidutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsellipsoidutils.h
3 --------------------
4 Date : April 2017
5 Copyright : (C) 2017 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSELLIPSOIDUTILS_H
17#define QGSELLIPSOIDUTILS_H
18
19#include "qgis_core.h"
20#include "qgis_sip.h"
22
23#include <QStringList>
24
26
33class CORE_EXPORT QgsEllipsoidUtils
34{
35 public:
36
41 {
43 bool valid{ true };
44
46 double semiMajor{ -1.0 };
48 double semiMinor{ -1.0 };
49
51 bool useCustomParameters{ false };
52
54 double inverseFlattening{ -1.0 };
55
58
59 };
60
82
87 static EllipsoidParameters ellipsoidParameters( const QString &ellipsoid );
88
94 static QList< QgsEllipsoidUtils::EllipsoidDefinition > definitions();
95
101 static QStringList acronyms();
102
114 static QList< QgsCelestialBody > celestialBodies();
115
116#ifndef SIP_RUN
117
126 static void invalidateCache( bool disableCache = false );
127#endif
128};
129
130#endif // QGSELLIPSOIDUTILS_H
131
Contains information about a celestial body.
Represents a coordinate reference system (CRS).
Contains utility functions for working with ellipsoids and querying the ellipsoid database.
static QList< QgsEllipsoidUtils::EllipsoidDefinition > definitions()
Returns a list of the definitions for all known ellipsoids from the internal ellipsoid database.
static QList< QgsCelestialBody > celestialBodies()
Returns a list of all known celestial bodies.
static void invalidateCache(bool disableCache=false)
Clears the internal cache used.
static EllipsoidParameters ellipsoidParameters(const QString &ellipsoid)
Returns the parameters for the specified ellipsoid.
static QStringList acronyms()
Returns a list of all known ellipsoid acronyms from the internal ellipsoid database.
Contains definition of an ellipsoid.
QString acronym
authority:code for QGIS builds with proj version 6 or greater, or custom acronym for ellipsoid for ea...
QString celestialBodyName
Name of the associated celestial body (e.g.
QString description
Description of ellipsoid.
QgsEllipsoidUtils::EllipsoidParameters parameters
Ellipsoid parameters.
Contains parameters for an ellipsoid.
double semiMajor
Semi-major axis, in meters.
bool valid
Whether ellipsoid parameters are valid.
double semiMinor
Semi-minor axis, in meters.
QgsCoordinateReferenceSystem crs
Associated coordinate reference system.
double inverseFlattening
Inverse flattening.
bool useCustomParameters
Whether custom parameters alone should be used (semiMajor/semiMinor only).