From cc5f891b1a6e2c0fff44b998f8fc152d86fb03fc Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 29 Apr 2015 11:07:59 +0200 Subject: [PATCH] [projections] enable sphere for utm, which can be done if the throw at non par.es is skipped --- .../extensions/gis/projections/proj/tmerc.hpp | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp index 384059f12..6816a7fdb 100644 --- a/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp +++ b/include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp @@ -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 + struct utm_spheroid : public detail::tmerc::base_tmerc_spheroid + { + inline utm_spheroid(const Parameters& par) : detail::tmerc::base_tmerc_spheroid(par) + { + detail::tmerc::setup_utm(this->m_par, this->m_proj_parm); + } + }; + #ifndef DOXYGEN_NO_DETAIL namespace detail {