Skip to content
Permalink
Browse files
One CRS test failure left
  • Loading branch information
timlinux committed Apr 7, 2012
1 parent 4d928f6 commit 26322b6a3df271fb373fe4d9e22bb3fbb4cced50
Showing with 16 additions and 3 deletions.
  1. +8 −1 src/core/qgscoordinatereferencesystem.h
  2. +8 −2 tests/src/core/testqgscoordinatereferencesystem.cpp
@@ -358,7 +358,14 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
*/
void setDescription( QString theDescription );
/* Set the Proj Proj4String.
* @param QString theProj4String Proj4 format specifies (excluding proj and ellips) that define this srs.
* @param QString theProj4String Proj4 format specifies
* (excluding proj and ellips) that define this srs.
* @note some content of the PROJ4 string may be stripped off by this
* method due to the parsing of the string by OSRNewSpatialReference .
* For example input:
* +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
* Gets stored in the CRS as:
* +proj=longlat +datum=WGS84 +no_defs
*/
void setProj4String( QString theProj4String );
/*! Set this Geographic? flag
@@ -231,14 +231,20 @@ void TestQgsCoordinateReferenceSystem::toWkt()
myCrs.createFromSrid( GEOSRID );
QString myWkt = myCrs.toWkt();
debugPrint( myCrs );
QVERIFY( myWkt == GEOWKT );
//Note: this is not the same as GEOWKT as OGR strips off the TOWGS clause...
QString myStrippedWkt("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.0174532925199433,AUTHORITY"
"[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]");
QVERIFY( myWkt == myStrippedWkt );
}
void TestQgsCoordinateReferenceSystem::toProj4()
{
QgsCoordinateReferenceSystem myCrs;
myCrs.createFromSrid( GEOSRID );
debugPrint( myCrs );
QVERIFY( myCrs.toProj4() == GEOPROJ4 );
QVERIFY( myCrs.toProj4() == "+proj=longlat +datum=WGS84 +no_defs" );
}
void TestQgsCoordinateReferenceSystem::geographicFlag()
{

0 comments on commit 26322b6

Please sign in to comment.