Skip to content

Commit 56d0387

Browse files
committed
apply #5598.33
1 parent b870b55 commit 56d0387

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/src/core/testqgscoordinatereferencesystem.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class TestQgsCoordinateReferenceSystem: public QObject
6767
QList<int> myGdalVersionOK;
6868
QStringList myFiles;
6969
QStringList myProj4Strings;
70+
QStringList myTOWGS84Strings;
7071
QStringList myAuthIdStrings;
7172
QString testESRIWkt( int i, QgsCoordinateReferenceSystem &theCrs );
7273
};
@@ -164,11 +165,16 @@ QString TestQgsCoordinateReferenceSystem::testESRIWkt( int i, QgsCoordinateRefer
164165

165166
if ( ! myCrs.isValid() )
166167
return QString( "test %1 crs is invalid" );
168+
#if 0
167169
if ( myCrs.toProj4() != myProj4Strings[i] )
168170
return QString( "test %1 PROJ.4 = [ %2 ] expecting [ %3 ]"
169171
).arg( i ).arg( myCrs.toProj4() ).arg( myProj4Strings[i] );
172+
#endif
173+
if ( myCrs.toProj4().indexOf( myTOWGS84Strings[i] ) == -1 )
174+
return QString( "test %1 [%2] not found, PROJ.4 = [%3] expecting [%4]"
175+
).arg( i ).arg( myTOWGS84Strings[i] ).arg( myCrs.toProj4() ).arg( myProj4Strings[i] );
170176
if ( myCrs.authid() != myAuthIdStrings[i] )
171-
return QString( "test %1 AUTHID = [ %2 ] expecting [ %3 ]"
177+
return QString( "test %1 AUTHID = [%2] expecting [%3]"
172178
).arg( i ).arg( myCrs.authid() ).arg( myAuthIdStrings[i] );
173179

174180
return "";
@@ -186,20 +192,23 @@ void TestQgsCoordinateReferenceSystem::createFromESRIWkt()
186192
myGdalVersionOK << 1800;
187193
myFiles << "bug5598.shp";
188194
myProj4Strings << "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +towgs84=198,881,317,0,0,0,0 +units=m +no_defs";
195+
myTOWGS84Strings << "+towgs84=198,881,317,0,0,0,0";
189196
myAuthIdStrings << "EPSG:3148";
190197

191198
// this example file taken from bug #5598 - geographic CRS only, supported since gdal 1.9
192199
myWktStrings << "GEOGCS[\"GCS_Indian_1960\",DATUM[\"D_Indian_1960\",SPHEROID[\"Everest_Adjustment_1937\",6377276.345,300.8017]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]";
193200
myFiles << "";
194201
myGdalVersionOK << 1900;
195202
myProj4Strings << "+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=198,881,317,0,0,0,0 +no_defs";
203+
myTOWGS84Strings << "+towgs84=198,881,317,0,0,0,0";
196204
myAuthIdStrings << "EPSG:4131";
197205

198206
// SAD69 geographic CRS, supported since gdal 1.9
199207
myWktStrings << "GEOGCS[\"GCS_South_American_1969\",DATUM[\"D_South_American_1969\",SPHEROID[\"GRS_1967_Truncated\",6378160.0,298.25]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]";
200208
myFiles << "";
201209
myGdalVersionOK << 1900;
202210
myProj4Strings << "+proj=longlat +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +no_defs";
211+
myTOWGS84Strings << "+towgs84=-57,1,-41,0,0,0,0";
203212
myAuthIdStrings << "EPSG:4618";
204213

205214
// do test with WKT definitions

0 commit comments

Comments
 (0)