mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
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:
parent
988099b9d8
commit
7ea3390950
@ -991,6 +991,12 @@ void QgsDistanceArea::convertMeasurement( double &measure, QGis::UnitType &measu
|
|||||||
measureUnits = QGis::Meters;
|
measureUnits = QGis::Meters;
|
||||||
QgsDebugMsg( "We're measuring on an ellipsoid or using projections, the system is returning 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
|
// Gets the conversion factor between the specified units
|
||||||
double factorUnits = QGis::fromUnitToUnitFactor( measureUnits, displayUnits );
|
double factorUnits = QGis::fromUnitToUnitFactor( measureUnits, displayUnits );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user