mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
One CRS test failure left
This commit is contained in:
parent
4d928f6619
commit
26322b6a3d
@ -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()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user