123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- #ifndef BOOST_GEOMETRY_PROJECTIONS_ECK5_HPP
- #define BOOST_GEOMETRY_PROJECTIONS_ECK5_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 eck5
- {
- static const double XF = 0.44101277172455148219;
- static const double RXF = 2.26750802723822639137;
- static const double YF = 0.88202554344910296438;
- static const double RYF = 1.13375401361911319568;
- template <typename T, typename Parameters>
- struct base_eck5_spheroid
- {
-
-
- inline void fwd(Parameters const& , T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
- {
- xy_x = XF * (1. + cos(lp_lat)) * lp_lon;
- xy_y = YF * lp_lat;
- }
-
-
- inline void inv(Parameters const& , T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
- {
- lp_lon = RXF * xy_x / (1. + cos( lp_lat = RYF * xy_y));
- }
- static inline std::string get_name()
- {
- return "eck5_spheroid";
- }
- };
-
- template <typename Parameters>
- inline void setup_eck5(Parameters& par)
- {
- par.es = 0.0;
- }
- }}
- #endif
-
- template <typename T, typename Parameters>
- struct eck5_spheroid : public detail::eck5::base_eck5_spheroid<T, Parameters>
- {
- template <typename Params>
- inline eck5_spheroid(Params const& , Parameters & par)
- {
- detail::eck5::setup_eck5(par);
- }
- };
- #ifndef DOXYGEN_NO_DETAIL
- namespace detail
- {
-
- BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI(srs::spar::proj_eck5, eck5_spheroid)
-
- BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck5_entry, eck5_spheroid)
- BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck5_init)
- {
- BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck5, eck5_entry);
- }
- }
- #endif
- }
- }}
- #endif
|