33 throw QgsException( QObject::tr(
"Could not create transform to calculate true north" ) );
43 p2.
setY( p2.
y() + 0.000001 );
@ Reverse
Reverse/inverse transform (from destination to source)
static Q_INVOKABLE double bearingTrueNorth(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &transformContext, const QgsPointXY &point)
Returns the direction to true north from a specified point and for a specified coordinate reference s...
This class represents a coordinate reference system (CRS).
static Q_INVOKABLE QgsCoordinateReferenceSystem fromEpsgId(long epsg)
Creates a CRS from a given EPSG ID.
Contains information about the context in which a coordinate transform is executed.
Defines a QGIS exception class.
A class to represent a 2D point.
void setY(double y)
Sets the y value of the point.
double azimuth(const QgsPointXY &other) const
Calculates azimuth between this point and other one (clockwise in degree, starting from north)
const QgsCoordinateReferenceSystem & crs