Class: QgsCoordinateReferenceSystemUtils

class qgis.core.QgsCoordinateReferenceSystemUtils

Bases: sip.wrapper

Utility functions for working with QgsCoordinateReferenceSystem objects.

New in version 3.26:

Methods

axisDirectionToAbbreviatedString

Returns a translated abbreviation representing an axis direction.

crsTypeToString

Returns a translated string representing a CRS type.

defaultCoordinateOrderForCrs

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

translateProjection

Returns a translated string for a projection method.

axisDirectionToAbbreviatedString(axis: Qgis.CrsAxisDirection) str

Returns a translated abbreviation representing an axis direction.

Parameters:

axis (Qgis.CrsAxisDirection) –

Return type:

str

crsTypeToString(type: Qgis.CrsType) str

Returns a translated string representing a CRS type.

New in version 3.34.

Parameters:

type (Qgis.CrsType) –

Return type:

str

defaultCoordinateOrderForCrs(crs: QgsCoordinateReferenceSystem) Qgis.CoordinateOrder

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.

Parameters:

crs (QgsCoordinateReferenceSystem) –

Return type:

Qgis.CoordinateOrder

translateProjection(projection: str) str

Returns a translated string for a projection method.

Returns an empty string for unhandled methods.

New in version 3.34.

Parameters:

projection (str) –

Return type:

str