Skip to content
Permalink
Browse files
Fixes for coordinate ref sys test errors on Werner's machine
  • Loading branch information
timlinux committed Apr 14, 2012
1 parent 8517162 commit 191a229f2de14ed9d543d9f79eafdb66984b6dbd
Showing with 11 additions and 2 deletions.
  1. +11 −2 tests/src/core/testqgscoordinatereferencesystem.cpp
@@ -244,18 +244,27 @@ void TestQgsCoordinateReferenceSystem::toWkt()
"AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY"
"[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY"
"[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]");
// for GDAL 1.7
QString myAltStrippedWkt("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID"
"[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],"
"AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY"
"[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY"
"[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]");
qDebug() << "myWkt:\n";
qDebug() << myWkt;
qDebug() << "myStrippedWkt:\n";
qDebug() << myStrippedWkt;
QVERIFY( myWkt == myStrippedWkt );
QVERIFY( myWkt == myStrippedWkt || myWkt == myAltStrippedWkt );
}
void TestQgsCoordinateReferenceSystem::toProj4()
{
QgsCoordinateReferenceSystem myCrs;
myCrs.createFromSrid( GEOSRID );
debugPrint( myCrs );
QVERIFY( myCrs.toProj4() == "+proj=longlat +datum=WGS84 +no_defs" );
//first proj string produced by gdal 1.8-1.9
//second by gdal 1.7
QVERIFY( myCrs.toProj4() == "+proj=longlat +datum=WGS84 +no_defs" ||
myCrs.toProj4() == "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs");
}
void TestQgsCoordinateReferenceSystem::geographicFlag()
{

0 comments on commit 191a229

Please sign in to comment.