Class: QgsBearingUtils

Utilities for calculating bearings and directions.

Static Methods

bearingTrueNorth

Returns the direction to true north from a specified point and for a specified coordinate reference system.

class qgis.core.QgsBearingUtils[source]

Bases: object

static bearingTrueNorth(crs: QgsCoordinateReferenceSystem, transformContext: QgsCoordinateTransformContext, point: QgsPointXY) float[source]

Returns the direction to true north from a specified point and for a specified coordinate reference system. The returned value is in degrees clockwise from vertical. An exception will be thrown if the bearing could not be calculated.

Parameters:
Return type:

float