[extensions][proj] Fix compilation error

This commit is contained in:
Adam Wulkiewicz
2014-07-25 15:04:20 +02:00
parent 592b0f500b
commit c4e442fffe

View File

@@ -126,18 +126,21 @@ inline void pj_ell_set(std::vector<pvalue>& parameters, double &a, double &es)
} else if (pj_param(parameters, "bR_h").i) { /* sphere--harmonic mean */
a = 2. * a * b / (a + b);
es = 0.;
} else if ((int i = pj_param(parameters, "tR_lat_a").i) || /* sphere--arith. */
pj_param(parameters, "tR_lat_g").i) { /* or geom. mean at latitude */
double tmp;
} else {
int i = pj_param(parameters, "tR_lat_a").i;
if (i || /* sphere--arith. */
pj_param(parameters, "tR_lat_g").i) { /* or geom. mean at latitude */
double tmp;
tmp = sin(pj_param(parameters, i ? "rR_lat_a" : "rR_lat_g").f);
if (geometry::math::abs(tmp) > HALFPI) {
throw proj_exception(-11);
tmp = sin(pj_param(parameters, i ? "rR_lat_a" : "rR_lat_g").f);
if (geometry::math::abs(tmp) > HALFPI) {
throw proj_exception(-11);
}
tmp = 1. - es * tmp * tmp;
a *= i ? .5 * (1. - es + tmp) / ( tmp * sqrt(tmp)) :
sqrt(1. - es) / tmp;
es = 0.;
}
tmp = 1. - es * tmp * tmp;
a *= i ? .5 * (1. - es + tmp) / ( tmp * sqrt(tmp)) :
sqrt(1. - es) / tmp;
es = 0.;
}
}