Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix compiler warnings in core directory
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6497 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Feb 3, 2007
1 parent fe6f74f commit d1510a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsscalecalculator.cpp
Expand Up @@ -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);
Expand Down
12 changes: 9 additions & 3 deletions src/core/qgsspatialrefsys.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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: "\
Expand Down Expand Up @@ -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 ");
Expand Down

0 comments on commit d1510a0

Please sign in to comment.