Skip to content

Commit

Permalink
Fix incorrectly reported area in identify tool (partly fixes #9060)
Browse files Browse the repository at this point in the history
Occurred with projected layer CRS, non-projected map CRS, planimetric measuring.
It was assumed that units of the measurement were in map CRS.
  • Loading branch information
wonder-sk committed Feb 19, 2014
1 parent 988099b commit 7ea3390
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/qgsdistancearea.cpp
Expand Up @@ -991,6 +991,12 @@ void QgsDistanceArea::convertMeasurement( double &measure, QGis::UnitType &measu
measureUnits = QGis::Meters;
QgsDebugMsg( "We're measuring on an ellipsoid or using projections, the system is returning meters" );
}
else if ( mEllipsoidalMode && mEllipsoid == GEO_NONE )
{
// Measuring in plane within the source CRS. Force its map units
measureUnits = mCoordTransform->sourceCrs().mapUnits();
QgsDebugMsg( "We're measuing on planimetric distance/area on given CRS, measured value is in CRS units" );
}

// Gets the conversion factor between the specified units
double factorUnits = QGis::fromUnitToUnitFactor( measureUnits, displayUnits );
Expand Down

0 comments on commit 7ea3390

Please sign in to comment.