@@ -80,6 +80,7 @@ class TestQgsCoordinateReferenceSystem: public QObject
80
80
void saveAsUserCrs ();
81
81
void projectWithCustomCrs ();
82
82
void projectEPSG25833 ();
83
+ void geoCcsDescription ();
83
84
84
85
private:
85
86
void debugPrint ( QgsCoordinateReferenceSystem &crs );
@@ -893,5 +894,25 @@ void TestQgsCoordinateReferenceSystem::projectEPSG25833()
893
894
QVERIFY ( p.crs ().authid () == QStringLiteral ( " EPSG:25833" ) );
894
895
QCOMPARE ( spyCrsChanged.count (), 1 );
895
896
}
897
+
898
+ void TestQgsCoordinateReferenceSystem::geoCcsDescription ()
899
+ {
900
+ // test that geoccs crs descriptions are correctly imported from GDAL
901
+ QgsCoordinateReferenceSystem crs;
902
+ crs.createFromString ( QStringLiteral ( " EPSG:3822" ) );
903
+ QVERIFY ( crs.isValid () );
904
+ QCOMPARE ( crs.authid (), QStringLiteral ( " EPSG:3822" ) );
905
+ QCOMPARE ( crs.description (), QStringLiteral ( " TWD97" ) );
906
+
907
+ crs.createFromString ( QStringLiteral ( " EPSG:4340" ) );
908
+ QVERIFY ( crs.isValid () );
909
+ QCOMPARE ( crs.authid (), QStringLiteral ( " EPSG:4340" ) );
910
+ QCOMPARE ( crs.description (), QStringLiteral ( " Australian Antarctic (geocentric)" ) );
911
+
912
+ crs.createFromString ( QStringLiteral ( " EPSG:4348" ) );
913
+ QVERIFY ( crs.isValid () );
914
+ QCOMPARE ( crs.authid (), QStringLiteral ( " EPSG:4348" ) );
915
+ QCOMPARE ( crs.description (), QStringLiteral ( " GDA94 (geocentric)" ) );
916
+ }
896
917
QGSTEST_MAIN ( TestQgsCoordinateReferenceSystem )
897
918
#include " testqgscoordinatereferencesystem.moc"
0 commit comments