Skip to content

Commit

Permalink
Convert all values from string to numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk authored and nyalldawson committed Oct 7, 2021
1 parent cb8fe6e commit 293ab68
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions tests/src/providers/testqgseptprovider.cpp
Expand Up @@ -351,25 +351,27 @@ void TestQgsEptProvider::testIdentify()
QVector<QMap<QString, QVariant>> expected;
{
QMap<QString, QVariant> point;
point[ QStringLiteral( "Blue" ) ] = "0" ;
point[ QStringLiteral( "Classification" ) ] = "2" ;
point[ QStringLiteral( "EdgeOfFlightLine" ) ] = "0" ;
point[ QStringLiteral( "GpsTime" ) ] = "268793.3373408913" ;
point[ QStringLiteral( "Green" ) ] = "0" ;
point[ QStringLiteral( "Intensity" ) ] = "278" ;
point[ QStringLiteral( "NumberOfReturns" ) ] = "1" ;
point[ QStringLiteral( "PointSourceId" ) ] = "7041" ;
point[ QStringLiteral( "Red" ) ] = "0" ;
point[ QStringLiteral( "ReturnNumber" ) ] = "1" ;
point[ QStringLiteral( "ScanAngleRank" ) ] = "-28" ;
point[ QStringLiteral( "ScanDirectionFlag" ) ] = "1" ;
point[ QStringLiteral( "UserData" ) ] = "17" ;
point[ QStringLiteral( "X" ) ] = "498066.27" ;
point[ QStringLiteral( "Y" ) ] = "7050995.06" ;
point[ QStringLiteral( "Z" ) ] = 74.6 ;
point[ QStringLiteral( "Blue" ) ] = 0;
point[ QStringLiteral( "Classification" ) ] = 2;
point[ QStringLiteral( "EdgeOfFlightLine" ) ] = 0;
point[ QStringLiteral( "GpsTime" ) ] = 268793.3373408913;
point[ QStringLiteral( "Green" ) ] = 0;
point[ QStringLiteral( "Intensity" ) ] = 278;
point[ QStringLiteral( "NumberOfReturns" ) ] = 1;
point[ QStringLiteral( "PointSourceId" ) ] = 7041;
point[ QStringLiteral( "Red" ) ] = 0;
point[ QStringLiteral( "ReturnNumber" ) ] = 1;
point[ QStringLiteral( "ScanAngleRank" ) ] = -28;
point[ QStringLiteral( "ScanDirectionFlag" ) ] = 1;
point[ QStringLiteral( "UserData" ) ] = 17;
point[ QStringLiteral( "X" ) ] = 498066.27;
point[ QStringLiteral( "Y" ) ] = 7050995.06;
point[ QStringLiteral( "Z" ) ] = 74.60;
expected.push_back( point );
}

for ( QString k : expected[0].keys() )
QCOMPARE( identifiedPoints[0][k], expected[0][k] );
QVERIFY( identifiedPoints == expected );
}

Expand Down

0 comments on commit 293ab68

Please sign in to comment.