Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix precise build (followup 3667651)
  • Loading branch information
jef-n committed Nov 19, 2015
1 parent 3667651 commit ce6a690
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
16 changes: 15 additions & 1 deletion python/core/qgsdistancearea.sip
Expand Up @@ -64,9 +64,23 @@ class QgsDistanceArea
//! measures line
double measureLine( const QList<QgsPoint>& points );

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsdistancearea.cpp
Expand Up @@ -465,7 +465,7 @@ double QgsDistanceArea::measureLine( const QgsPoint &p1, const QgsPoint &p2 )
return measureLine( p1, p2, units );
}

double QgsDistanceArea::measureLine( const QgsPoint& p1, const QgsPoint& p2, QGis::UnitType& units ) const
double QgsDistanceArea::measureLine( const QgsPoint& p1, const QgsPoint& p2, QGis::UnitType& units )
{
double result;
units = mCoordTransform->sourceCrs().mapUnits();
Expand Down
7 changes: 4 additions & 3 deletions src/core/qgsdistancearea.h
Expand Up @@ -100,16 +100,17 @@ class CORE_EXPORT QgsDistanceArea
* @param p2 end of line
* @returns distance in meters, or map units if cartesian calculation was performed
*/
double measureLine( const QgsPoint& p1, const QgsPoint& p2 ) const;
double measureLine( const QgsPoint& p1, const QgsPoint& p2 );

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

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

1 comment on commit ce6a690

@jef-n
Copy link
Member Author

@jef-n jef-n commented on ce6a690 Nov 19, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, of course this is not just for precise.

Please sign in to comment.