Skip to content
Permalink
Browse files
Fix compiler warnings in core directory
git-svn-id: http://svn.osgeo.org/qgis/trunk@6497 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Feb 3, 2007
1 parent 27da5e5 commit 2be7dcffaa6262daa63c01d7704dbc1aa8ec3ccd
Showing with 11 additions and 5 deletions.
  1. +2 −2 src/core/qgsscalecalculator.cpp
  2. +9 −3 src/core/qgsspatialrefsys.cpp
@@ -114,8 +114,8 @@ double QgsScaleCalculator::calculateGeographicDistance(QgsRect &mapExtent)
double a = pow(cos(lat * rads), 2);
double c = 2.0 * atan2(sqrt(a), sqrt(1.0-a));
const static double ra = 6378000; // [m]
const static double rb = 6357000; // [m]
// The eccentricity. This comes from sqrt(1.0 - rb*rb/(ra*ra));
// The eccentricity. This comes from sqrt(1.0 - rb*rb/(ra*ra)) with rb set
// to 6357000 m.
const static double e = 0.0810820288;
double radius = ra * (1.0 - e*e) /
pow(1.0 - e*e*sin(lat*rads)*sin(lat*rads), 1.5);
@@ -290,10 +290,10 @@ bool QgsSpatialRefSys::createFromWkt(QString theWkt)
// that we can try to fill in the remaining class members...
//create from Proj wil set the isValidFalg
createFromProj4(QString(proj4src));
CPLFree(proj4src);

return mIsValidFlag;
//setMapunits will be called by createfromproj above

CPLFree(proj4src);
}

bool QgsSpatialRefSys::createFromEpsg(long theEpsg)
@@ -518,7 +518,7 @@ bool QgsSpatialRefSys::createFromProj4 (const QString theProj4String)
}
// if (!myRecord.empty())
// What if descriptions aren't unique?
if (NULL)
if (false)
{
mySrsId=myRecord["srs_id"].toLong();
QgsDebugMsg("QgsSpatialRefSys::createFromProj4 Projection Description match search for srsid returned srsid: "\
@@ -1016,6 +1016,12 @@ bool QgsSpatialRefSys::equals(QString theProj4CharArray)
OGRErr myInputResult1 = myOgrSpatialRef1.importFromProj4( myCharArrayPointer1 );
OGRErr myInputResult2 = myOgrSpatialRef2.importFromProj4( theProj4CharArray.latin1() );

// Could do some error reporting here...
if (myInputResult1 != OGRERR_NONE)
{}
if (myInputResult2 != OGRERR_NONE)
{}

if (myOgrSpatialRef1.IsGeographic() && myOgrSpatialRef2.IsGeographic())
{
// qWarning("QgsSpatialRefSys::operator== srs1 and srs2 are geographic ");

0 comments on commit 2be7dcf

Please sign in to comment.