File indexing completed on 2025-11-05 09:18:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #ifndef BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP
0020 #define BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP
0021
0022
0023 #include <boost/geometry/core/point_type.hpp>
0024 #include <boost/geometry/core/static_assert.hpp>
0025 #include <boost/geometry/util/type_traits_std.hpp>
0026
0027
0028 namespace boost { namespace geometry
0029 {
0030
0031
0032 namespace traits
0033 {
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043 template <typename Point, typename Enable = void>
0044 struct coordinate_system
0045 {
0046 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
0047 "Not implemented for this Point type.",
0048 Point);
0049 };
0050
0051 }
0052
0053
0054
0055 #ifndef DOXYGEN_NO_DISPATCH
0056 namespace core_dispatch
0057 {
0058 template <typename GeometryTag, typename G>
0059 struct coordinate_system
0060 {
0061 using P = typename point_type<GeometryTag, G>::type;
0062
0063
0064 using type = typename coordinate_system<point_tag, P>::type;
0065 };
0066
0067
0068 template <typename Point>
0069 struct coordinate_system<point_tag, Point>
0070 {
0071 using type = typename traits::coordinate_system
0072 <
0073 util::remove_cptrref_t<Point>
0074 >::type;
0075 };
0076
0077
0078 }
0079 #endif
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089 template <typename Geometry>
0090 struct coordinate_system
0091 {
0092 using type = typename core_dispatch::coordinate_system
0093 <
0094 tag_t<Geometry>,
0095 util::remove_cptrref_t<Geometry>
0096 >::type;
0097 };
0098
0099 template <typename Geometry>
0100 using coordinate_system_t = typename coordinate_system<Geometry>::type;
0101
0102 #ifndef DOXYGEN_NO_DETAIL
0103 namespace detail {
0104
0105
0106 template <typename Geometry>
0107 struct coordinate_system_units
0108 {
0109 using type = typename coordinate_system<Geometry>::type::units;
0110 };
0111
0112
0113 template <typename Geometry>
0114 using coordinate_system_units_t = typename coordinate_system_units<Geometry>::type;
0115
0116 }
0117 #endif
0118
0119 }}
0120
0121
0122 #endif