Skip to content

Commit ce6a690

Browse files
committed
fix precise build (followup 3667651)
1 parent 3667651 commit ce6a690

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

python/core/qgsdistancearea.sip

+15-1
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,23 @@ class QgsDistanceArea
6464
//! measures line
6565
double measureLine( const QList<QgsPoint>& points );
6666

67-
//! measures line with one segment
67+
/** Measures length of line with one segment
68+
* @param p1 start of line
69+
* @param p2 end of line
70+
* @returns distance in meters, or map units if cartesian calculation was performed
71+
*/
6872
double measureLine( const QgsPoint& p1, const QgsPoint& p2 );
6973

74+
/** Measures length of line with one segment and returns units of distance.
75+
* @param p1 start of line
76+
* @param p2 end of line
77+
* @param units will be set to units of measure
78+
* @returns calculated distance between points. Distance units are stored in units parameter.
79+
* @note backported from QGIS 2.12 (where it is const)
80+
* @note not available in python bindings
81+
*/
82+
// double measureLine( const QgsPoint& p1, const QgsPoint& p2, QGis::UnitType& units );
83+
7084
//! measures polygon area
7185
double measurePolygon( const QList<QgsPoint>& points );
7286

src/core/qgsdistancearea.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ double QgsDistanceArea::measureLine( const QgsPoint &p1, const QgsPoint &p2 )
465465
return measureLine( p1, p2, units );
466466
}
467467

468-
double QgsDistanceArea::measureLine( const QgsPoint& p1, const QgsPoint& p2, QGis::UnitType& units ) const
468+
double QgsDistanceArea::measureLine( const QgsPoint& p1, const QgsPoint& p2, QGis::UnitType& units )
469469
{
470470
double result;
471471
units = mCoordTransform->sourceCrs().mapUnits();

src/core/qgsdistancearea.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,17 @@ class CORE_EXPORT QgsDistanceArea
100100
* @param p2 end of line
101101
* @returns distance in meters, or map units if cartesian calculation was performed
102102
*/
103-
double measureLine( const QgsPoint& p1, const QgsPoint& p2 ) const;
103+
double measureLine( const QgsPoint& p1, const QgsPoint& p2 );
104104

105105
/** Measures length of line with one segment and returns units of distance.
106106
* @param p1 start of line
107107
* @param p2 end of line
108108
* @param units will be set to units of measure
109109
* @returns calculated distance between points. Distance units are stored in units parameter.
110-
* @note added in QGIS 2.12
110+
* @note backported from QGIS 2.12 (where it is const)
111+
* @note not available in python bindings
111112
*/
112-
double measureLine( const QgsPoint& p1, const QgsPoint& p2, QGis::UnitType& units ) const;
113+
double measureLine( const QgsPoint& p1, const QgsPoint& p2, QGis::UnitType& units );
113114

114115
//! measures polygon area
115116
double measurePolygon( const QList<QgsPoint>& points );

0 commit comments

Comments
 (0)