33 throw QgsException( QObject::tr(
"Could not create transform to calculate true north" ) );
43 p2.
setY( p2.
y() + 0.000001 );
static 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...
A class to represent a 2D point.
const QgsCoordinateReferenceSystem & crs
static Q_INVOKABLE QgsCoordinateReferenceSystem fromEpsgId(long epsg)
Creates a CRS from a given EPSG ID.
double azimuth(const QgsPointXY &other) const
Calculates azimuth between this point and other one (clockwise in degree, starting from north) ...
void setY(double y)
Sets the y value of the point.
Contains information about the context in which a coordinate transform is executed.
This class represents a coordinate reference system (CRS).
Defines a QGIS exception class.