Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:41

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2017-2022, Oracle and/or its affiliates.
0004 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
0005 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0006 
0007 // Use, modification and distribution is subject to the Boost Software License,
0008 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 
0011 #ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_SPAR_HPP
0012 #define BOOST_GEOMETRY_SRS_PROJECTIONS_SPAR_HPP
0013 
0014 
0015 #include <string>
0016 #include <type_traits>
0017 #include <vector>
0018 
0019 #include <boost/geometry/core/radius.hpp>
0020 #include <boost/geometry/core/static_assert.hpp>
0021 #include <boost/geometry/core/tag.hpp>
0022 #include <boost/geometry/core/tags.hpp>
0023 
0024 #include <boost/geometry/srs/projections/impl/pj_datums.hpp>
0025 #include <boost/geometry/srs/projections/impl/pj_ellps.hpp>
0026 #include <boost/geometry/srs/projections/dpar.hpp>
0027 #include <boost/geometry/srs/projections/par_data.hpp>
0028 #include <boost/geometry/srs/sphere.hpp>
0029 #include <boost/geometry/srs/spheroid.hpp>
0030 
0031 #include <boost/geometry/util/sequence.hpp>
0032 #include <boost/geometry/util/tuples.hpp>
0033 
0034 #include <boost/variant/variant.hpp>
0035 
0036 
0037 namespace boost { namespace geometry { namespace srs
0038 {
0039 
0040 namespace spar
0041 {
0042 
0043 // Static parameters holder
0044 
0045 template <typename ...>
0046 class parameters {};
0047 
0048 namespace detail
0049 {
0050 
0051 // TODO: implement this as a sequence utility
0052 template <std::size_t I, typename ...>
0053 struct parameters_base
0054 {
0055     BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
0056         "I out of bounds.",
0057         std::integral_constant<size_t, I>);
0058 };
0059 
0060 template <std::size_t I, typename P, typename ...Ps>
0061 struct parameters_base<I, P, Ps...>
0062 {
0063     typedef typename parameters_base<I - 1, Ps...>::type type;
0064 };
0065 
0066 template <typename P, typename ...Ps>
0067 struct parameters_base<0, P, Ps...>
0068 {
0069     typedef parameters<P, Ps...> type;
0070 };
0071 
0072 } // namespace detail
0073 
0074 template <typename P, typename ...Ps>
0075 class parameters<P, Ps...>
0076     : private parameters<Ps...>
0077 {
0078 public:
0079     parameters() = default;
0080     parameters(parameters const&) = default;
0081     parameters(parameters&&) = default;
0082     parameters & operator=(parameters const&) = default;
0083     parameters & operator=(parameters&&) = default;
0084 
0085     template
0086     <
0087         typename R, typename ...Rs,
0088         std::enable_if_t<std::is_constructible<P, R>::value, int> = 0
0089     >
0090     explicit parameters(R&& r, Rs&&... rs)
0091         : parameters<Ps...>(std::forward<Rs>(rs)...)
0092         , m_p(std::forward<R>(r))
0093     {}
0094 
0095     template <std::size_t I>
0096     auto const& get() const
0097     {
0098         typedef typename detail::parameters_base<I, P, Ps...>::type base_t;
0099         return static_cast<base_t const&>(*this).m_p;
0100     }
0101 
0102 private:
0103     P m_p;
0104 
0105     template <typename ...>
0106     friend class parameters;
0107 };
0108 
0109 } // namespace spar
0110 
0111 }}} // namespace boost::geometry::srs
0112 
0113 
0114 namespace boost { namespace geometry { namespace tuples
0115 {
0116 
0117 template <std::size_t I, typename ...Ts>
0118 struct element<I, srs::spar::parameters<Ts...> >
0119     : util::sequence_element<I, util::type_sequence<Ts...> >
0120 {};
0121 
0122 template <typename ...Ts>
0123 struct size<srs::spar::parameters<Ts...> >
0124     : std::integral_constant<std::size_t, sizeof...(Ts)>
0125 {};
0126 
0127 template <int I, typename ...Ts>
0128 inline typename element<I, srs::spar::parameters<Ts...> >::type const&
0129 get(srs::spar::parameters<Ts...> const& tup)
0130 {
0131     return tup.template get<I>();
0132 }
0133 
0134 
0135 }}} // namespace boost::geometry::tuples
0136 
0137 
0138 namespace boost { namespace geometry { namespace srs
0139 {
0140 
0141 namespace spar
0142 {
0143 
0144 // Static parameters values
0145 
0146 struct datum_wgs84 {};
0147 struct datum_ggrs87 {};
0148 struct datum_nad83 {};
0149 struct datum_nad27 {};
0150 struct datum_potsdam {};
0151 struct datum_carthage {};
0152 struct datum_hermannskogel {};
0153 struct datum_ire65 {};
0154 struct datum_nzgd49 {};
0155 struct datum_osgb36 {};
0156 
0157 struct ellps_merit {};
0158 struct ellps_sgs85 {};
0159 struct ellps_grs80 {};
0160 struct ellps_iau76 {};
0161 struct ellps_airy {};
0162 struct ellps_apl4_9 {};
0163 struct ellps_nwl9d {};
0164 struct ellps_mod_airy {};
0165 struct ellps_andrae {};
0166 struct ellps_aust_sa {};
0167 struct ellps_grs67 {};
0168 struct ellps_bessel {};
0169 struct ellps_bess_nam {};
0170 struct ellps_clrk66 {};
0171 struct ellps_clrk80 {};
0172 struct ellps_clrk80ign {};
0173 struct ellps_cpm {};
0174 struct ellps_delmbr {};
0175 struct ellps_engelis {};
0176 struct ellps_evrst30 {};
0177 struct ellps_evrst48 {};
0178 struct ellps_evrst56 {};
0179 struct ellps_evrst69 {};
0180 struct ellps_evrstss {};
0181 struct ellps_fschr60 {};
0182 struct ellps_fschr60m {};
0183 struct ellps_fschr68 {};
0184 struct ellps_helmert {};
0185 struct ellps_hough {};
0186 struct ellps_intl {};
0187 struct ellps_krass {};
0188 struct ellps_kaula {};
0189 struct ellps_lerch {};
0190 struct ellps_mprts {};
0191 struct ellps_new_intl {};
0192 struct ellps_plessis {};
0193 struct ellps_seasia {};
0194 struct ellps_walbeck {};
0195 struct ellps_wgs60 {};
0196 struct ellps_wgs66 {};
0197 struct ellps_wgs72 {};
0198 struct ellps_wgs84 {};
0199 struct ellps_sphere {};
0200 
0201 struct mode_plane {};
0202 struct mode_di {};
0203 struct mode_dd {};
0204 struct mode_hex {};
0205 
0206 struct orient_isea {};
0207 struct orient_pole {};
0208 
0209 struct pm_greenwich {};
0210 struct pm_lisbon {};
0211 struct pm_paris {};
0212 struct pm_bogota {};
0213 struct pm_madrid {};
0214 struct pm_rome {};
0215 struct pm_bern {};
0216 struct pm_jakarta {};
0217 struct pm_ferro {};
0218 struct pm_brussels {};
0219 struct pm_stockholm {};
0220 struct pm_athens {};
0221 struct pm_oslo {};
0222 
0223 struct proj_aea {}; struct proj_leac {}; // Albers Equal Area, Lambert Equal Area Conic
0224 struct proj_aeqd {}; // Azimuthal Equidistant
0225 struct proj_airy {}; // Airy
0226 struct proj_aitoff {}; struct proj_wintri {}; // Aitoff, Winkel Tripel
0227 struct proj_august {};
0228 struct proj_apian {}; struct proj_ortel {}; struct proj_bacon {};
0229 struct proj_bipc {};
0230 struct proj_boggs {};
0231 struct proj_bonne {};
0232 struct proj_cass {};
0233 struct proj_cc {};
0234 struct proj_cea {};
0235 struct proj_chamb {};
0236 struct proj_col_urban {};
0237 struct proj_collg {};
0238 struct proj_crast {};
0239 struct proj_denoy {};
0240 struct proj_eck1 {};
0241 struct proj_eck2 {};
0242 struct proj_eck3 {}; struct proj_putp1 {}; struct proj_wag6 {}; struct proj_kav7 {};
0243 struct proj_eck4 {};
0244 struct proj_eck5 {};
0245 struct proj_eqc {};
0246 struct proj_eqdc {};
0247 struct proj_etmerc {}; struct proj_utm {};
0248 struct proj_fahey {};
0249 struct proj_fouc_s {};
0250 struct proj_gall {};
0251 struct proj_geocent {};
0252 struct proj_geos {};
0253 struct proj_gins8 {};
0254 struct proj_gn_sinu {}; struct proj_sinu {}; struct proj_eck6 {}; struct proj_mbtfps {};
0255 struct proj_gnom {};
0256 struct proj_goode {};
0257 struct proj_gstmerc {};
0258 struct proj_hammer {};
0259 struct proj_hatano {};
0260 struct proj_healpix {};
0261 struct proj_rhealpix {};
0262 struct proj_igh {};
0263 struct proj_imw_p {};
0264 struct proj_isea {};
0265 struct proj_krovak {};
0266 struct proj_labrd {};
0267 struct proj_laea {};
0268 struct proj_lagrng {};
0269 struct proj_larr {};
0270 struct proj_lask {};
0271 struct proj_lonlat {}; struct proj_latlon {}; struct proj_latlong {}; struct proj_longlat {};
0272 struct proj_lcc {};
0273 struct proj_lcca {};
0274 struct proj_loxim {};
0275 struct proj_lsat {};
0276 struct proj_mbt_fps {};
0277 struct proj_mbtfpp {};
0278 struct proj_mbtfpq {};
0279 struct proj_merc {};
0280 struct proj_mill {};
0281 struct proj_mil_os {}; struct proj_lee_os {}; struct proj_gs48 {}; struct proj_alsk {}; struct proj_gs50 {};
0282 struct proj_moll {}; struct proj_wag4 {}; struct proj_wag5 {};
0283 struct proj_natearth {};
0284 struct proj_nell {};
0285 struct proj_nell_h {};
0286 struct proj_nicol {};
0287 struct proj_nsper {}; struct proj_tpers {};
0288 struct proj_nzmg {};
0289 struct proj_ob_tran {};
0290 struct proj_ocea {};
0291 struct proj_oea {};
0292 struct proj_omerc {};
0293 struct proj_ortho {};
0294 struct proj_poly {};
0295 struct proj_putp2 {};
0296 struct proj_putp3 {}; struct proj_putp3p {};
0297 struct proj_putp4p {}; struct proj_weren {};
0298 struct proj_putp5 {}; struct proj_putp5p {};
0299 struct proj_putp6 {}; struct proj_putp6p {};
0300 struct proj_qsc {};
0301 struct proj_robin {};
0302 struct proj_rouss {};
0303 struct proj_rpoly {};
0304 struct proj_euler {}; struct proj_murd1 {}; struct proj_murd2 {}; struct proj_murd3 {}; struct proj_pconic {}; struct proj_tissot {}; struct proj_vitk1 {};
0305 struct proj_somerc {};
0306 struct proj_stere {}; struct proj_ups {};
0307 struct proj_sterea {};
0308 struct proj_kav5 {}; struct proj_qua_aut {}; struct proj_fouc {}; struct proj_mbt_s {};
0309 struct proj_tcc {};
0310 struct proj_tcea {};
0311 struct proj_tmerc {};
0312 struct proj_tpeqd {};
0313 struct proj_urm5 {};
0314 struct proj_urmfps {}; struct proj_wag1 {};
0315 struct proj_vandg {};
0316 struct proj_vandg2 {}; struct proj_vandg3 {};
0317 struct proj_vandg4 {};
0318 struct proj_wag2 {};
0319 struct proj_wag3 {};
0320 struct proj_wag7 {};
0321 struct proj_webmerc {};
0322 struct proj_wink1 {};
0323 struct proj_wink2 {};
0324 
0325 struct sweep_x {};
0326 struct sweep_y {};
0327 
0328 struct units_km {};
0329 struct units_m {};
0330 struct units_dm {};
0331 struct units_cm {};
0332 struct units_mm {};
0333 struct units_kmi {};
0334 struct units_in {};
0335 struct units_ft {};
0336 struct units_yd {};
0337 struct units_mi {};
0338 struct units_fath {};
0339 struct units_ch {};
0340 struct units_link {};
0341 struct units_us_in {};
0342 struct units_us_ft {};
0343 struct units_us_yd {};
0344 struct units_us_ch {};
0345 struct units_us_mi {};
0346 struct units_ind_yd {};
0347 struct units_ind_ft {};
0348 struct units_ind_ch {};
0349 
0350 // Static parameters names
0351 
0352 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(NAME) \
0353 template <typename T = double> \
0354 struct NAME \
0355 { \
0356     NAME() : value(0) {} \
0357     explicit NAME(T const& v) : value(v) {} \
0358     T value; \
0359 };
0360 
0361 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(a)
0362 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(b)
0363 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(e)
0364 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(es)
0365 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(f)
0366 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(gamma)
0367 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(h)
0368 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(h_0)
0369 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(k)
0370 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(k_0)
0371 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(m)
0372 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(n)
0373 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(q)
0374 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(r)
0375 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(rf)
0376 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(to_meter)
0377 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(vto_meter)
0378 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(w)
0379 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(x_0)
0380 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(y_0)
0381 
0382 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(NAME) \
0383 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_F(NAME)
0384 
0385 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(alpha)
0386 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(azi)
0387 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lat_0)
0388 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lat_1)
0389 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lat_2)
0390 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lat_b)
0391 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lat_ts)
0392 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lon_0)
0393 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lon_1)
0394 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lon_2)
0395 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lon_wrap)
0396 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(lonc)
0397 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(o_alpha)
0398 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(o_lat_1)
0399 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(o_lat_2)
0400 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(o_lat_c)
0401 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(o_lat_p)
0402 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(o_lon_1)
0403 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(o_lon_2)
0404 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(o_lon_c)
0405 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(o_lon_p)
0406 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(pm)
0407 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(r_lat_a)
0408 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(r_lat_g)
0409 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(theta)
0410 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_R(tilt)
0411 
0412 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_I(NAME) \
0413 template <int I> struct NAME { static const int value = I; };
0414 
0415 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_I(aperture)
0416 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_I(lsat)
0417 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_I(north_square)
0418 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_I(path)
0419 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_I(resolution)
0420 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_I(south_square)
0421 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_I(zone)
0422 
0423 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(NAME) \
0424 struct NAME {};
0425 
0426 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(czech)
0427 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(geoc)
0428 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(guam)
0429 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(no_cut)
0430 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(no_defs)
0431 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(no_rot)
0432 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(ns)
0433 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(over)
0434 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(r_a)
0435 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(r_au)
0436 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(r_g)
0437 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(r_h)
0438 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(r_v)
0439 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(rescale)
0440 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(south)
0441 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(variant_c)
0442 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(no_off)
0443 BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PARAM_BE(hyperbolic)
0444 
0445 template
0446 <
0447     typename SpheroidOrSphere
0448 >
0449 struct ellps
0450 {
0451     typedef SpheroidOrSphere model_type;
0452 
0453     ellps() : model() {}
0454     explicit ellps(SpheroidOrSphere const& sph) : model(sph) {}
0455 
0456     SpheroidOrSphere model;
0457 };
0458 
0459 struct nadgrids
0460     : srs::detail::nadgrids
0461 {
0462     typedef srs::detail::nadgrids base_t;
0463     nadgrids(std::string const& g0) : base_t(g0) {}
0464     nadgrids(std::string const& g0, std::string const& g1) : base_t(g0, g1) {}
0465     nadgrids(std::string const& g0, std::string const& g1, std::string const& g2) : base_t(g0, g1, g2) {}
0466     nadgrids(std::string const& g0, std::string const& g1, std::string const& g2, std::string const& g3) : base_t(g0, g1, g2, g3) {}
0467     nadgrids(std::string const& g0, std::string const& g1, std::string const& g2, std::string const& g3, std::string const& g4) : base_t(g0, g1, g2, g3, g4) {}
0468     nadgrids(std::initializer_list<std::string> l) : base_t(l) {}
0469 };
0470 
0471 template <typename Proj>
0472 struct o_proj
0473 {
0474     typedef Proj type;
0475 };
0476 
0477 template <typename T = double>
0478 struct towgs84
0479     : srs::detail::towgs84<T>
0480 {
0481     typedef srs::detail::towgs84<T> base_t;
0482 
0483     towgs84(T const& v0, T const& v1, T const& v2)
0484         : base_t(v0, v1, v2)
0485     {}
0486     towgs84(T const& v0, T const& v1, T const& v2, T const& v3, T const& v4, T const& v5, T const& v6)
0487         : base_t(v0, v1, v2, v3, v4, v5, v6)
0488     {}
0489     towgs84(std::initializer_list<T> l) : base_t(l) {}
0490 };
0491 
0492 struct axis
0493     : srs::detail::axis
0494 {
0495     typedef srs::detail::axis base_t;
0496 
0497     axis(int const& v0, int const& v1, int const& v2)
0498         : base_t(v0, v1, v2)
0499     {}
0500     axis(std::initializer_list<int> l) : base_t(l) {}
0501 };
0502 
0503 template <typename Units>
0504 struct vunits
0505 {
0506     typedef Units type;
0507 };
0508 
0509 // Static parameters traits
0510 
0511 #ifndef DOXYGEN_NO_DETAIL
0512 namespace detail
0513 {
0514 
0515 template <typename D>
0516 struct datum_traits
0517 {
0518     static const bool is_specialized = false;
0519     typedef void ellps_type;
0520     typedef void def_type;
0521 };
0522 
0523 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(NAME, ELLPS, DEF_T, DEF_V) \
0524 template <> \
0525 struct datum_traits<spar::NAME> \
0526 { \
0527     static const bool is_specialized = true; \
0528     typedef spar::ELLPS ellps_type; \
0529     typedef spar::DEF_T def_type; \
0530     static spar::DEF_T def() { return spar::DEF_T DEF_V; } \
0531     static const dpar::value_datum id = dpar::NAME; \
0532 };
0533 
0534 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_wgs84, ellps_wgs84, towgs84<double>, (0,0,0))
0535 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_ggrs87, ellps_grs80, towgs84<double>, (-199.87,74.79,246.62))
0536 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_nad83, ellps_grs80, towgs84<double>, (0,0,0))
0537 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_nad27, ellps_clrk66, nadgrids, ("@conus","@alaska","@ntv2_0.gsb","@ntv1_can.dat"))
0538 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_potsdam, ellps_bessel, towgs84<double>, (598.1,73.7,418.2,0.202,0.045,-2.455,6.7))
0539 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_carthage, ellps_clrk80ign, towgs84<double>, (-263.0,6.0,431.0))
0540 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_hermannskogel, ellps_bessel, towgs84<double>, (577.326,90.129,463.919,5.137,1.474,5.297,2.4232))
0541 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_ire65, ellps_mod_airy, towgs84<double>, (482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15))
0542 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_nzgd49, ellps_intl, towgs84<double>, (59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993))
0543 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(datum_osgb36, ellps_airy, towgs84<double>, (446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894))
0544 
0545 
0546 template <typename E>
0547 struct ellps_traits
0548 {
0549     static const bool is_specialized = false;
0550     template <typename T> struct model_type
0551     {
0552         typedef void type;
0553     };
0554 };
0555 
0556 template <typename E>
0557 struct ellps_traits<spar::ellps<E> >
0558 {
0559     static const bool is_specialized = true;
0560     template <typename T> struct model_type
0561     {
0562         // TODO: transform to spheroid<T> or sphere<T>
0563         typedef typename spar::ellps<E>::model_type type;
0564     };
0565 
0566     template <typename T>
0567     static typename spar::ellps<E>::model_type const& model(spar::ellps<E> const& e)
0568     {
0569         return e.model;
0570     }
0571 };
0572 
0573 // TODO: Implement as RadiusType-agnostic, member struct template defining model
0574 //       and function template returning it
0575 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(NAME) \
0576 template <> \
0577 struct ellps_traits<spar::NAME> \
0578 { \
0579     static const bool is_specialized = true; \
0580     template <typename T> struct model_type \
0581     { \
0582         typedef srs::spheroid<T> type; \
0583     }; \
0584     template <typename T> \
0585     static srs::spheroid<T> model(spar::NAME const&) { \
0586         return srs::spheroid<T>(projections::detail::pj_get_ellps<T>().first[dpar::NAME].a, \
0587                                 projections::detail::pj_get_ellps<T>().first[dpar::NAME].b); \
0588     } \
0589 };
0590 
0591 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_SPHERE(NAME) \
0592 template <> \
0593 struct ellps_traits<spar::NAME> \
0594 { \
0595     static const bool is_specialized = true; \
0596     template <typename T> struct model_type \
0597     { \
0598         typedef srs::sphere<T> type; \
0599     }; \
0600     template <typename T> \
0601     static srs::sphere<T> model(spar::NAME const&) { \
0602         return srs::sphere<T>(projections::detail::pj_get_ellps<T>().first[dpar::NAME].a); \
0603     } \
0604 };
0605 
0606 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_merit)
0607 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_sgs85)
0608 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_grs80)
0609 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_iau76)
0610 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_airy)
0611 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_apl4_9)
0612 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_nwl9d)
0613 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_mod_airy)
0614 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_andrae)
0615 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_aust_sa)
0616 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_grs67)
0617 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_bessel)
0618 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_bess_nam)
0619 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_clrk66)
0620 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_clrk80)
0621 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_clrk80ign)
0622 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_cpm)
0623 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_delmbr)
0624 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_engelis)
0625 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_evrst30)
0626 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_evrst48)
0627 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_evrst56)
0628 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_evrst69)
0629 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_evrstss)
0630 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_fschr60)
0631 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_fschr60m)
0632 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_fschr68)
0633 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_helmert)
0634 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_hough)
0635 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_intl)
0636 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_krass)
0637 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_kaula)
0638 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_lerch)
0639 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_mprts)
0640 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_new_intl)
0641 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_plessis)
0642 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_seasia)
0643 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_walbeck)
0644 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_wgs60)
0645 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_wgs66)
0646 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_wgs72)
0647 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS(ellps_wgs84)
0648 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_SPHERE(ellps_sphere)
0649 
0650 template <typename M>
0651 struct mode_traits
0652 {
0653     static const bool is_specialized = false;
0654     typedef void type;
0655 };
0656 
0657 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_MODE(NAME) \
0658 template <> \
0659 struct mode_traits<spar::NAME> \
0660 { \
0661     static const bool is_specialized = true; \
0662     typedef spar::NAME type; \
0663 };
0664 
0665 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_MODE(mode_plane)
0666 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_MODE(mode_di)
0667 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_MODE(mode_dd)
0668 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_MODE(mode_hex)
0669 
0670 template <typename O>
0671 struct orient_traits
0672 {
0673     static const bool is_specialized = false;
0674     typedef void type;
0675 };
0676 
0677 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ORIENT(NAME) \
0678 template <> \
0679 struct orient_traits<spar::NAME> \
0680 { \
0681     static const bool is_specialized = true; \
0682     typedef spar::NAME type; \
0683 };
0684 
0685 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ORIENT(orient_isea)
0686 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ORIENT(orient_pole)
0687 
0688 template <typename M>
0689 struct pm_traits
0690 {
0691     static const bool is_specialized = false;
0692     typedef void type;
0693 };
0694 
0695 template <typename T>
0696 struct pm_traits<spar::pm<T> >
0697 {
0698     static const bool is_specialized = true;
0699     typedef T type;
0700     static T const& value(spar::pm<T> const& p) { return p.value; }
0701 };
0702 
0703 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(NAME, INDEX) \
0704 template <> \
0705 struct pm_traits<spar::NAME> \
0706 { \
0707     static const bool is_specialized = true; \
0708     typedef double type; \
0709     static double value(spar::NAME const& ) { return projections::detail::pj_prime_meridians[INDEX].deg; } \
0710 };
0711 
0712 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_greenwich, 0)
0713 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_lisbon,    1)
0714 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_paris,     2)
0715 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_bogota,    3)
0716 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_madrid,    4)
0717 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_rome,      5)
0718 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_bern,      6)
0719 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_jakarta,   7)
0720 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_ferro,     8)
0721 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_brussels,  9)
0722 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_stockholm, 10)
0723 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_athens,    11)
0724 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PM(pm_oslo,      12)
0725 
0726 template <typename P>
0727 struct proj_traits
0728 {
0729     static const bool is_specialized = false;
0730     typedef void type;
0731 };
0732 
0733 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(NAME) \
0734 template <> \
0735 struct proj_traits<spar::NAME> \
0736 { \
0737     static const bool is_specialized = true; \
0738     typedef spar::NAME type; \
0739     static const srs::dpar::value_proj id = dpar::NAME; \
0740 };
0741 
0742 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_aea)
0743 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_leac)
0744 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_aeqd)
0745 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_airy)
0746 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_aitoff)
0747 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wintri)
0748 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_august)
0749 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_apian)
0750 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_ortel)
0751 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_bacon)
0752 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_bipc)
0753 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_boggs)
0754 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_bonne)
0755 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_cass)
0756 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_cc)
0757 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_cea)
0758 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_chamb)
0759 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_col_urban)
0760 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_collg)
0761 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_crast)
0762 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_denoy)
0763 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_eck1)
0764 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_eck2)
0765 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_eck3)
0766 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_putp1)
0767 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wag6)
0768 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_kav7)
0769 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_eck4)
0770 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_eck5)
0771 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_eqc)
0772 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_eqdc)
0773 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_etmerc)
0774 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_utm)
0775 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_fahey)
0776 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_fouc_s)
0777 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_gall)
0778 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_geocent)
0779 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_geos)
0780 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_gins8)
0781 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_gn_sinu)
0782 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_sinu)
0783 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_eck6)
0784 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_mbtfps)
0785 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_gnom)
0786 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_goode)
0787 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_gstmerc)
0788 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_hammer)
0789 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_hatano)
0790 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_healpix)
0791 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_rhealpix)
0792 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_igh)
0793 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_imw_p)
0794 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_isea)
0795 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_krovak)
0796 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_labrd)
0797 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_laea)
0798 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_lagrng)
0799 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_larr)
0800 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_lask)
0801 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_lonlat)
0802 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_latlon)
0803 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_latlong)
0804 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_longlat)
0805 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_lcc)
0806 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_lcca)
0807 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_loxim)
0808 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_lsat)
0809 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_mbt_fps)
0810 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_mbtfpp)
0811 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_mbtfpq)
0812 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_merc)
0813 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_mill)
0814 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_mil_os)
0815 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_lee_os)
0816 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_gs48)
0817 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_alsk)
0818 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_gs50)
0819 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_moll)
0820 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wag4)
0821 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wag5)
0822 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_natearth)
0823 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_nell)
0824 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_nell_h)
0825 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_nicol)
0826 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_nsper)
0827 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_tpers)
0828 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_nzmg)
0829 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_ob_tran)
0830 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_ocea)
0831 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_oea)
0832 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_omerc)
0833 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_ortho)
0834 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_poly)
0835 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_putp2)
0836 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_putp3)
0837 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_putp3p)
0838 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_putp4p)
0839 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_weren)
0840 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_putp5)
0841 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_putp5p)
0842 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_putp6)
0843 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_putp6p)
0844 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_qsc)
0845 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_robin)
0846 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_rouss)
0847 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_rpoly)
0848 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_euler)
0849 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_murd1)
0850 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_murd2)
0851 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_murd3)
0852 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_pconic)
0853 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_tissot)
0854 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_vitk1)
0855 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_somerc)
0856 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_stere)
0857 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_ups)
0858 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_sterea)
0859 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_kav5)
0860 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_qua_aut)
0861 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_fouc)
0862 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_mbt_s)
0863 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_tcc)
0864 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_tcea)
0865 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_tmerc)
0866 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_tpeqd)
0867 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_urm5)
0868 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_urmfps)
0869 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wag1)
0870 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_vandg)
0871 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_vandg2)
0872 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_vandg3)
0873 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_vandg4)
0874 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wag2)
0875 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wag3)
0876 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wag7)
0877 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_webmerc)
0878 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wink1)
0879 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(proj_wink2)
0880 
0881 template <typename S>
0882 struct sweep_traits
0883 {
0884     static const bool is_specialized = false;
0885     typedef void type;
0886 };
0887 
0888 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_SWEEP(NAME) \
0889 template <> \
0890 struct sweep_traits<spar::NAME> \
0891 { \
0892     static const bool is_specialized = true; \
0893     typedef spar::NAME type; \
0894 };
0895 
0896 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_SWEEP(sweep_x)
0897 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_SWEEP(sweep_y)
0898 
0899 template <typename S>
0900 struct units_traits
0901 {
0902     static const bool is_specialized = false;
0903     typedef void type;
0904 };
0905 
0906 #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(NAME) \
0907 template <> \
0908 struct units_traits<spar::NAME> \
0909 { \
0910     static const bool is_specialized = true; \
0911     typedef spar::NAME type; \
0912     static const srs::dpar::value_units id = dpar::NAME; \
0913 };
0914 
0915 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_km)
0916 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_m)
0917 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_dm)
0918 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_cm)
0919 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_mm)
0920 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_kmi)
0921 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_in)
0922 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_ft)
0923 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_yd)
0924 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_mi)
0925 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_fath)
0926 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_ch)
0927 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_link)
0928 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_us_in)
0929 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_us_ft)
0930 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_us_yd)
0931 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_us_ch)
0932 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_us_mi)
0933 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_ind_yd)
0934 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_ind_ft)
0935 BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(units_ind_ch)
0936 
0937 
0938 template <typename T, template <typename> class Param>
0939 struct is_same_t : std::false_type {};
0940 template <typename T, template <typename> class Param>
0941 struct is_same_t<Param<T>, Param> : std::true_type {};
0942 
0943 template <typename T, template <int> class Param>
0944 struct is_same_i : std::false_type {};
0945 template <int I, template <int> class Param>
0946 struct is_same_i<Param<I>, Param> : std::true_type {};
0947 
0948 template <typename T, template <typename> class Traits>
0949 struct it_traits_specialized
0950     : std::integral_constant
0951         <
0952             bool,
0953             Traits<T>::is_specialized
0954         >
0955 {};
0956 
0957 template <typename Param>
0958 struct is_param
0959 {
0960     template <typename T>
0961     struct pred : std::is_same<T, Param> {};
0962 };
0963 
0964 template <template <typename> class Param>
0965 struct is_param_t
0966 {
0967     template <typename T>
0968     struct pred : is_same_t<T, Param> {};
0969 };
0970 
0971 template <template <int> class Param>
0972 struct is_param_i
0973 {
0974     template <typename T>
0975     struct pred : is_same_i<T, Param> {};
0976 };
0977 
0978 template <template <typename> class Traits>
0979 struct is_param_tr
0980 {
0981     template <typename T>
0982     struct pred : it_traits_specialized<T, Traits> {};
0983 };
0984 
0985 // pick proj static name
0986 
0987 template <typename Tuple>
0988 struct pick_proj_tag
0989 {
0990     typedef typename geometry::tuples::find_if
0991         <
0992             Tuple,
0993             is_param_tr<proj_traits>::pred
0994         >::type proj_type;
0995 
0996     static const bool is_found = geometry::tuples::is_found<proj_type>::value;
0997 
0998     BOOST_GEOMETRY_STATIC_ASSERT((is_found), "Projection not named.", Tuple);
0999 
1000     typedef proj_traits<proj_type> traits_type;
1001     typedef typename traits_type::type type;
1002 };
1003 
1004 template <typename Tuple>
1005 struct pick_o_proj_tag
1006 {
1007     typedef typename geometry::tuples::find_if
1008         <
1009             Tuple,
1010             is_param_t<o_proj>::pred
1011         >::type o_proj_type;
1012 
1013     static const bool is_found = geometry::tuples::is_found<o_proj_type>::value;
1014 
1015     BOOST_GEOMETRY_STATIC_ASSERT((is_found), "Expected o_proj parameter.", Tuple);
1016 
1017     typedef proj_traits<typename o_proj_type::type> traits_type;
1018     typedef typename traits_type::type type;
1019 };
1020 
1021 
1022 } // namespace detail
1023 #endif // DOXYGEN_NO_DETAIL
1024 
1025 } // namespace spar
1026 
1027 }}} // namespace boost::geometry::srs
1028 
1029 
1030 #endif // BOOST_GEOMETRY_SRS_PROJECTIONS_SPAR_HPP