Skip to content

Commit

Permalink
Add unit tests from #30643
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 26, 2019
1 parent 9ff5c65 commit 309d559
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/src/core/testqgscoordinatetransform.cpp
Expand Up @@ -342,6 +342,30 @@ void TestQgsCoordinateTransform::transform_data()
<< QgsCoordinateReferenceSystem::fromEpsgId( 3059 )
<< QgsCoordinateReferenceSystem::fromEpsgId( 4326 )
<< 27.61113711 << 55.87910378 << static_cast< int >( QgsCoordinateTransform::ReverseTransform ) << 725865.850 << 198519.947 << 0.001;
QTest::newRow( "From BNG to WGS84" )
<< QgsCoordinateReferenceSystem::fromEpsgId( 27700 )
<< QgsCoordinateReferenceSystem::fromEpsgId( 4326 )
<< 7467023.96 << -5527971.74 << static_cast< int >( QgsCoordinateTransform::ForwardTransform ) << 51.400222 << 0.000025 << 0.4;
QTest::newRow( "From BNG to WGS84 (reverse)" )
<< QgsCoordinateReferenceSystem::fromEpsgId( 27700 )
<< QgsCoordinateReferenceSystem::fromEpsgId( 4326 )
<< 51.400222 << 0.000025 << static_cast< int >( QgsCoordinateTransform::ReverseTransform ) << 7467023.96 << -5527971.74 << 22000.0;
QTest::newRow( "From WGS84 to BNG (reverse)" )
<< QgsCoordinateReferenceSystem::fromEpsgId( 4326 )
<< QgsCoordinateReferenceSystem::fromEpsgId( 27700 )
<< 7467023.96 << -5527971.74 << static_cast< int >( QgsCoordinateTransform::ReverseTransform ) << 51.400222 << 0.000025 << 0.4;
QTest::newRow( "From WGS84 to BNG" )
<< QgsCoordinateReferenceSystem::fromEpsgId( 4326 )
<< QgsCoordinateReferenceSystem::fromEpsgId( 27700 )
<< 51.400222 << 0.000025 << static_cast< int >( QgsCoordinateTransform::ForwardTransform ) << 7467023.96 << -5527971.74 << 22000.0;
QTest::newRow( "From BNG to 3857" )
<< QgsCoordinateReferenceSystem::fromEpsgId( 27700 )
<< QgsCoordinateReferenceSystem::fromEpsgId( 3857 )
<< 7467023.96 << -5527971.74 << static_cast< int >( QgsCoordinateTransform::ForwardTransform ) << 5721846.47 << 2.78 << 43000.0;
QTest::newRow( "From BNG to 3857 (reverse)" )
<< QgsCoordinateReferenceSystem::fromEpsgId( 27700 )
<< QgsCoordinateReferenceSystem::fromEpsgId( 3857 )
<< 5721846.47 << 2.78 << static_cast< int >( QgsCoordinateTransform::ReverseTransform ) << 7467023.96 << -5527971.74 << 22000.0;
}

void TestQgsCoordinateTransform::transform()
Expand Down

0 comments on commit 309d559

Please sign in to comment.