Skip to content

Commit 7ea3390

Browse files
committed
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.
1 parent 988099b commit 7ea3390

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/qgsdistancearea.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,12 @@ void QgsDistanceArea::convertMeasurement( double &measure, QGis::UnitType &measu
991991
measureUnits = QGis::Meters;
992992
QgsDebugMsg( "We're measuring on an ellipsoid or using projections, the system is returning meters" );
993993
}
994+
else if ( mEllipsoidalMode && mEllipsoid == GEO_NONE )
995+
{
996+
// Measuring in plane within the source CRS. Force its map units
997+
measureUnits = mCoordTransform->sourceCrs().mapUnits();
998+
QgsDebugMsg( "We're measuing on planimetric distance/area on given CRS, measured value is in CRS units" );
999+
}
9941000

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

0 commit comments

Comments
 (0)