summaryrefslogtreecommitdiff
path: root/boost/geometry/srs/projections/proj/crast.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/srs/projections/proj/crast.hpp')
-rw-r--r--boost/geometry/srs/projections/proj/crast.hpp33
1 files changed, 10 insertions, 23 deletions
diff --git a/boost/geometry/srs/projections/proj/crast.hpp b/boost/geometry/srs/projections/proj/crast.hpp
index 5f781f8776..fa6fb98a7d 100644
--- a/boost/geometry/srs/projections/proj/crast.hpp
+++ b/boost/geometry/srs/projections/proj/crast.hpp
@@ -48,12 +48,6 @@
namespace boost { namespace geometry
{
-namespace srs { namespace par4
-{
- struct crast {};
-
-}} //namespace srs::par4
-
namespace projections
{
#ifndef DOXYGEN_NO_DETAIL
@@ -77,7 +71,7 @@ namespace projections
// FORWARD(s_forward) spheroid
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
- inline void fwd(T& lp_lon, T& lp_lat, T& xy_x, T& xy_y) const
+ inline void fwd(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
{
static const T third = detail::third<T>();
@@ -88,7 +82,7 @@ namespace projections
// INVERSE(s_inverse) spheroid
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
- inline void inv(T& xy_x, T& xy_y, T& lp_lon, T& lp_lat) const
+ inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
{
static const T third = detail::third<T>();
@@ -128,7 +122,9 @@ namespace projections
template <typename T, typename Parameters>
struct crast_spheroid : public detail::crast::base_crast_spheroid<T, Parameters>
{
- inline crast_spheroid(const Parameters& par) : detail::crast::base_crast_spheroid<T, Parameters>(par)
+ template <typename Params>
+ inline crast_spheroid(Params const& , Parameters const& par)
+ : detail::crast::base_crast_spheroid<T, Parameters>(par)
{
detail::crast::setup_crast(this->m_par);
}
@@ -139,23 +135,14 @@ namespace projections
{
// Static projection
- BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::crast, crast_spheroid, crast_spheroid)
+ BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_crast, crast_spheroid, crast_spheroid)
// Factory entry(s)
- template <typename T, typename Parameters>
- class crast_entry : public detail::factory_entry<T, Parameters>
- {
- public :
- virtual base_v<T, Parameters>* create_new(const Parameters& par) const
- {
- return new base_v_fi<crast_spheroid<T, Parameters>, T, Parameters>(par);
- }
- };
-
- template <typename T, typename Parameters>
- inline void crast_init(detail::base_factory<T, Parameters>& factory)
+ BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(crast_entry, crast_spheroid)
+
+ BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(crast_init)
{
- factory.add_to_factory("crast", new crast_entry<T, Parameters>);
+ BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(crast, crast_entry);
}
} // namespace detail