Skip to content
Permalink
Browse files

Expose QgsBearingUtils to QML

  • Loading branch information
nirvn committed Dec 26, 2019
1 parent c004f40 commit ddd2c6ea3d89e16ffd0a53f267dd7524a87b23b9
Showing with 11 additions and 5 deletions.
  1. +5 −2 python/core/auto_generated/qgsbearingutils.sip.in
  2. +6 −3 src/core/qgsbearingutils.h
@@ -21,11 +21,14 @@ Utilities for calculating bearings and directions.
%TypeHeaderCode
#include "qgsbearingutils.h"
%End
public:
static const QMetaObject staticMetaObject;

public:

static double bearingTrueNorth( const QgsCoordinateReferenceSystem &crs,
const QgsCoordinateTransformContext &transformContext,
const QgsPointXY &point );
const QgsCoordinateTransformContext &transformContext,
const QgsPointXY &point );
%Docstring
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
@@ -23,6 +23,7 @@ class QgsCoordinateTransformContext;
class QgsPointXY;

#include "qgis_core.h"
#include <QObject>

/**
* \class QgsBearingUtils
@@ -32,16 +33,18 @@ class QgsPointXY;
*/
class CORE_EXPORT QgsBearingUtils
{
Q_GADGET

public:

/**
* 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.
*/
static double bearingTrueNorth( const QgsCoordinateReferenceSystem &crs,
const QgsCoordinateTransformContext &transformContext,
const QgsPointXY &point );
Q_INVOKABLE static double bearingTrueNorth( const QgsCoordinateReferenceSystem &crs,
const QgsCoordinateTransformContext &transformContext,
const QgsPointXY &point );

};

0 comments on commit ddd2c6e

Please sign in to comment.
You can’t perform that action at this time.