Fix incorrectly reported area in identify tool (partly fixes #9060)

Occurred with projected layer CRS, non-projected map CRS, planimetric measuring.
It was assumed that units of the measurement were in map CRS.
This commit is contained in:
Martin Dobias 2014-02-19 23:11:43 +07:00
parent 988099b9d8
commit 7ea3390950

View File

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