Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Show classification code in identify result
- Loading branch information
Showing
with
4 additions
and
1 deletion.
-
+4
−1
src/gui/qgsmaptoolidentify.cpp
|
@@ -520,7 +520,6 @@ bool QgsMapToolIdentify::identifyPointCloudLayer( QList<QgsMapToolIdentify::Iden |
|
|
const QgsPointCloudLayerElevationProperties *elevationProps = qobject_cast< const QgsPointCloudLayerElevationProperties *>( layer->elevationProperties() ); |
|
|
for ( const QVariantMap &pt : points ) |
|
|
{ |
|
|
// TODO: replace this conversion with something better |
|
|
QMap<QString, QString> ptStr; |
|
|
for ( auto attrIt = pt.constBegin(); attrIt != pt.constEnd(); ++attrIt ) |
|
|
{ |
|
@@ -531,6 +530,10 @@ bool QgsMapToolIdentify::identifyPointCloudLayer( QList<QgsMapToolIdentify::Iden |
|
|
ptStr[ tr( "Z (original)" ) ] = attrIt.value().toString(); |
|
|
ptStr[ tr( "Z (adjusted)" ) ] = QString::number( attrIt.value().toDouble() * elevationProps->zScale() + elevationProps->zOffset() ); |
|
|
} |
|
|
else if ( attrIt.key().compare( QLatin1String( "Classification" ), Qt::CaseInsensitive ) == 0 ) |
|
|
{ |
|
|
ptStr[ attrIt.key() ] = QStringLiteral( "%1 (%2)" ).arg( attrIt.value().toString(), QgsPointCloudDataProvider::translatedLasClassificationCodes().value( attrIt.value().toInt() ) ); |
|
|
} |
|
|
else |
|
|
{ |
|
|
ptStr[attrIt.key()] = attrIt.value().toString(); |
|
|