[projections] enable sphere for utm, which can be done if the throw

at non par.es is skipped
This commit is contained in:
Barend Gehrels
2015-04-29 11:07:59 +02:00
parent ca9fa7260d
commit cc5f891b1a

View File

@@ -244,7 +244,6 @@ namespace boost { namespace geometry { namespace projections
void setup_utm(Parameters& par, par_tmerc& proj_parm)
{
int zone;
if (!par.es) throw proj_exception(-34);
par.y0 = pj_param(par.params, "bsouth").i ? 10000000. : 0.;
par.x0 = 500000.;
if (pj_param(par.params, "tzone").i) /* zone input ? */
@@ -332,6 +331,28 @@ namespace boost { namespace geometry { namespace projections
}
};
/*!
\brief Universal Transverse Mercator (UTM) projection
\ingroup projections
\tparam Geographic latlong point type
\tparam Cartesian xy point type
\tparam Parameters parameter type
\par Projection characteristics
- Cylindrical
- Spheroid
- zone= south
\par Example
\image html ex_utm.gif
*/
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
struct utm_spheroid : public detail::tmerc::base_tmerc_spheroid<Geographic, Cartesian, Parameters>
{
inline utm_spheroid(const Parameters& par) : detail::tmerc::base_tmerc_spheroid<Geographic, Cartesian, Parameters>(par)
{
detail::tmerc::setup_utm(this->m_par, this->m_proj_parm);
}
};
#ifndef DOXYGEN_NO_DETAIL
namespace detail
{