QGIS API Documentation 4.3.0-Master (0de80482b60)
Loading...
Searching...
No Matches
QgsCoordinateReferenceSystemUtils Class Reference

Utility functions for working with QgsCoordinateReferenceSystem objects. More...

#include <qgscoordinatereferencesystemutils.h>

Static Public Member Functions

static QString axisDirectionToAbbreviatedString (Qgis::CrsAxisDirection axis)
 Returns a translated abbreviation representing an axis direction.
static QString crsTypeToString (Qgis::CrsType type)
 Returns a translated string representing a CRS type.
static Qgis::CoordinateOrder defaultCoordinateOrderForCrs (const QgsCoordinateReferenceSystem &crs)
 Returns the default coordinate order to use for the specified crs.
static QgsGeometry topocentricHorizonGeometry (const QgsCoordinateReferenceSystem &topocentricCrs, const QgsCoordinateReferenceSystem &outputCrs, const QgsCoordinateTransformContext &transformContext, double degreeStep=1.0)
 Builds the geometry of the visible horizon (in outputCrs) when topocentricCrs is a topocentric CRS.
static QString translateProjection (const QString &projection)
 Returns a translated string for a projection method.

Detailed Description

Utility functions for working with QgsCoordinateReferenceSystem objects.

Since
QGIS 3.26

Definition at line 34 of file qgscoordinatereferencesystemutils.h.

Member Function Documentation

◆ axisDirectionToAbbreviatedString()

QString QgsCoordinateReferenceSystemUtils::axisDirectionToAbbreviatedString ( Qgis::CrsAxisDirection axis)
static

Returns a translated abbreviation representing an axis direction.

Definition at line 98 of file qgscoordinatereferencesystemutils.cpp.

◆ crsTypeToString()

QString QgsCoordinateReferenceSystemUtils::crsTypeToString ( Qgis::CrsType type)
static

Returns a translated string representing a CRS type.

Since
QGIS 3.34

Definition at line 187 of file qgscoordinatereferencesystemutils.cpp.

◆ defaultCoordinateOrderForCrs()

Qgis::CoordinateOrder QgsCoordinateReferenceSystemUtils::defaultCoordinateOrderForCrs ( const QgsCoordinateReferenceSystem & crs)
static

Returns the default coordinate order to use for the specified crs.

Warning
This is quite a "coarse" method, in that many possible CRS axis don't map well to a simply X/Y or Y/X order. Accordingly this method will default to returning Qgis::CoordinateOrder::XY unless we are reasonably certain of a Y/X order.

Definition at line 31 of file qgscoordinatereferencesystemutils.cpp.

◆ topocentricHorizonGeometry()

QgsGeometry QgsCoordinateReferenceSystemUtils::topocentricHorizonGeometry ( const QgsCoordinateReferenceSystem & topocentricCrs,
const QgsCoordinateReferenceSystem & outputCrs,
const QgsCoordinateTransformContext & transformContext,
double degreeStep = 1.0 )
static

Builds the geometry of the visible horizon (in outputCrs) when topocentricCrs is a topocentric CRS.

The horizon is built up from points spaced at degreeStep degree intervals around the horizon.

Returns null geometry if topocentricCrs is not a topocentric CRS or if the transform fails.

Since
QGIS 4.4

Definition at line 508 of file qgscoordinatereferencesystemutils.cpp.

◆ translateProjection()

QString QgsCoordinateReferenceSystemUtils::translateProjection ( const QString & projection)
static

Returns a translated string for a projection method.

Returns an empty string for unhandled methods.

Since
QGIS 3.34

Definition at line 221 of file qgscoordinatereferencesystemutils.cpp.


The documentation for this class was generated from the following files: