1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
4 // Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
5 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
7 // This file was modified by Oracle on 2020.
8 // Modifications copyright (c) 2020, Oracle and/or its affiliates.
9 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
11 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
12 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
14 // Use, modification and distribution is subject to the Boost Software License,
15 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
16 // http://www.boost.org/LICENSE_1_0.txt)
18 #ifndef BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP
19 #define BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP
22 #include <boost/geometry/core/point_type.hpp>
23 #include <boost/geometry/core/static_assert.hpp>
24 #include <boost/geometry/util/type_traits_std.hpp>
27 namespace boost { namespace geometry
35 \brief Traits class defining the coordinate system of a point, important for strategy selection
39 \par Specializations should provide:
40 - typedef CS type; (cs::cartesian, cs::spherical, etc)
42 template <typename Point, typename Enable = void>
43 struct coordinate_system
45 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
46 "Not implemented for this Point type.",
54 #ifndef DOXYGEN_NO_DISPATCH
55 namespace core_dispatch
57 template <typename GeometryTag, typename G>
58 struct coordinate_system
60 typedef typename point_type<GeometryTag, G>::type P;
62 // Call its own specialization on point-tag
63 typedef typename coordinate_system<point_tag, P>::type type;
67 template <typename Point>
68 struct coordinate_system<point_tag, Point>
70 typedef typename traits::coordinate_system
72 typename util::remove_cptrref<Point>::type
77 } // namespace core_dispatch
82 \brief \brief_meta{type, coordinate system (cartesian\, spherical\, etc), \meta_point_type}
83 \tparam Geometry \tparam_geometry
86 \qbk{[include reference/core/coordinate_system.qbk]}
88 template <typename Geometry>
89 struct coordinate_system
91 typedef typename core_dispatch::coordinate_system
93 typename tag<Geometry>::type,
94 typename util::remove_cptrref<Geometry>::type
99 }} // namespace boost::geometry
102 #endif // BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP