mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-10 00:05:25 -04:00
Because 3D coordinates should be the default. References https://github.com/qgis/qgis3.0_api/issues/36
47 lines
1.7 KiB
C++
47 lines
1.7 KiB
C++
/***************************************************************************
|
|
qgsbearingutils.h
|
|
-----------------
|
|
begin : October 2016
|
|
copyright : (C) 2016 by Nyall Dawson
|
|
email : nyall dot dawson at gmail dot com
|
|
***************************************************************************/
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
#ifndef QGSBEARINGUTILS_H
|
|
#define QGSBEARINGUTILS_H
|
|
|
|
class QgsCoordinateReferenceSystem;
|
|
class QgsPointXY;
|
|
|
|
#include "qgis_core.h"
|
|
|
|
/**
|
|
* \class QgsBearingUtils
|
|
* \ingroup core
|
|
* Utilities for calculating bearings and directions.
|
|
* \since QGIS 2.18
|
|
*/
|
|
class CORE_EXPORT QgsBearingUtils
|
|
{
|
|
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 QgsPointXY &point );
|
|
|
|
};
|
|
|
|
#endif //QGSBEARINGUTILS_H
|