Skip to content
Permalink
Browse files

fix precise build (followup 3667651)

  • Loading branch information
jef-n committed Nov 19, 2015
1 parent 3667651 commit ce6a6902867a30f50ac6352d3a27618d8cd64cfb
Showing with 20 additions and 5 deletions.
  1. +15 −1 python/core/qgsdistancearea.sip
  2. +1 −1 src/core/qgsdistancearea.cpp
  3. +4 −3 src/core/qgsdistancearea.h
@@ -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 );

@@ -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();
@@ -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 );

1 comment on commit ce6a690

@jef-n

This comment has been minimized.

Copy link
Member Author

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

oops, of course this is not just for precise.

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