Class: QgsEllipsoidUtils¶
Contains utility functions for working with ellipsoids and querying the ellipsoid database.
Static Methods
Returns a list of all known ellipsoid acronyms from the internal ellipsoid database. |
|
Returns a list of all known celestial bodies. |
|
Returns a list of the definitions for all known ellipsoids from the internal ellipsoid database. |
|
Returns the parameters for the specified ellipsoid. |
- class qgis.core.QgsEllipsoidUtils[source]¶
Bases:
object
- class EllipsoidDefinition¶
Bases:
object
Contains definition of an ellipsoid.
- acronym: str¶
authority:code for QGIS builds with proj version 6 or greater, or custom acronym for ellipsoid for earlier proj builds
- celestialBodyName: str¶
Name of the associated celestial body (e.g. “Earth”).
Warning
This method requires PROJ 8.1 or later. On earlier PROJ builds the string will always be empty.
Added in version 3.20.
- description: str¶
Description of ellipsoid
- parameters: EllipsoidParameters¶
Ellipsoid parameters
- class EllipsoidParameters¶
Bases:
object
Contains parameters for an ellipsoid.
- crs: QgsCoordinateReferenceSystem¶
Associated coordinate reference system
- inverseFlattening: float¶
Inverse flattening
- semiMajor: float¶
Semi-major axis, in meters
- semiMinor: float¶
Semi-minor axis, in meters
- useCustomParameters: bool¶
Whether custom parameters alone should be used (semiMajor/semiMinor only)
- valid: bool¶
Whether ellipsoid parameters are valid
- static acronyms() List[str] [source]¶
Returns a list of all known ellipsoid acronyms from the internal ellipsoid database.
See also
- Return type:
List[str]
- static celestialBodies() List[QgsCelestialBody] ¶
Returns a list of all known celestial bodies.
Note
This method is an alias for
QgsCoordinateReferenceSystemRegistry.celestialBodies()
.Warning
This method requires PROJ 8.1 or later
- Raises:
QgsNotSupportedException – on QGIS builds based on PROJ 8.0 or earlier.
Added in version 3.20.
- Return type:
List[QgsCelestialBody]
- static definitions() List[QgsEllipsoidUtils.EllipsoidDefinition] ¶
Returns a list of the definitions for all known ellipsoids from the internal ellipsoid database.
See also
- Return type:
- static ellipsoidParameters(ellipsoid: str | None) QgsEllipsoidUtils.EllipsoidParameters [source]¶
Returns the parameters for the specified
ellipsoid
. Results are cached to allow for fast retrieval of parameters.- Parameters:
ellipsoid (Optional[str])
- Return type: