123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- #ifndef BOOST_GEOMETRY_PROJECTIONS_DENOY_HPP
- #define BOOST_GEOMETRY_PROJECTIONS_DENOY_HPP
- #include <boost/geometry/srs/projections/impl/base_static.hpp>
- #include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
- #include <boost/geometry/srs/projections/impl/projects.hpp>
- #include <boost/geometry/srs/projections/impl/factory_entry.hpp>
- namespace boost { namespace geometry
- {
- namespace projections
- {
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail { namespace denoy
- {
- static const double C0 = 0.95;
-
-
- static const double D1 = 0.9;
- static const double D5 = 0.03;
- template <typename T>
- inline T C1() { return -0.0833333333333333333333333333333; }
- template <typename T>
- inline T C3() { return 0.0016666666666666666666666666666; }
- template <typename T, typename Parameters>
- struct base_denoy_spheroid
- {
-
-
- inline void fwd(Parameters const& , T lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
- {
- static const T C1 = denoy::C1<T>();
- static const T C3 = denoy::C3<T>();
- xy_y = lp_lat;
- xy_x = lp_lon;
- lp_lon = fabs(lp_lon);
- xy_x *= cos((C0 + lp_lon * (C1 + lp_lon * lp_lon * C3)) *
- (lp_lat * (D1 + D5 * lp_lat * lp_lat * lp_lat * lp_lat)));
- }
- static inline std::string get_name()
- {
- return "denoy_spheroid";
- }
- };
-
- template <typename Parameters>
- inline void setup_denoy(Parameters& par)
- {
- par.es = 0.0;
- }
- }}
- #endif
-
- template <typename T, typename Parameters>
- struct denoy_spheroid : public detail::denoy::base_denoy_spheroid<T, Parameters>
- {
- template <typename Params>
- inline denoy_spheroid(Params const& , Parameters & par)
- {
- detail::denoy::setup_denoy(par);
- }
- };
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail
- {
-
- BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_F(srs::spar::proj_denoy, denoy_spheroid)
-
- BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(denoy_entry, denoy_spheroid)
- BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(denoy_init)
- {
- BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(denoy, denoy_entry);
- }
- }
- #endif
- }
- }}
- #endif
|