Skip to content
Permalink
Browse files

Show classification code in identify result

  • Loading branch information
nyalldawson authored and wonder-sk committed Jan 4, 2021
1 parent cc73757 commit e3e8af7d5458252cc590b09545b4b28f134da03b
Showing with 4 additions and 1 deletion.
  1. +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();

0 comments on commit e3e8af7

Please sign in to comment.
You can’t perform that action at this time.