diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:11:01 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:11:01 +0900 |
commit | 3fdc3e5ee96dca5b11d1694975a65200787eab86 (patch) | |
tree | 5c1733853892b8397d67706fa453a9bd978d2102 /boost/geometry/algorithms/detail/normalize.hpp | |
parent | 88e602c57797660ebe0f9e15dbd64c1ff16dead3 (diff) | |
download | boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.gz boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.bz2 boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.zip |
Imported Upstream version 1.66.0upstream/1.66.0
Diffstat (limited to 'boost/geometry/algorithms/detail/normalize.hpp')
-rw-r--r-- | boost/geometry/algorithms/detail/normalize.hpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/boost/geometry/algorithms/detail/normalize.hpp b/boost/geometry/algorithms/detail/normalize.hpp index 913fe324b7..7a761d42bb 100644 --- a/boost/geometry/algorithms/detail/normalize.hpp +++ b/boost/geometry/algorithms/detail/normalize.hpp @@ -1,8 +1,9 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2015, Oracle and/or its affiliates. +// Copyright (c) 2015-2017, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html @@ -120,7 +121,7 @@ struct assign_loop<1, DimensionCount> }; -template <typename PointIn, typename PointOut> +template <typename PointIn, typename PointOut, bool IsEquatorial = true> struct normalize_point { static inline void apply(PointIn const& point_in, PointOut& point_out) @@ -133,6 +134,7 @@ struct normalize_point math::normalize_spheroidal_coordinates < typename coordinate_system<PointIn>::type::units, + IsEquatorial, in_coordinate_type >(longitude, latitude); @@ -144,7 +146,7 @@ struct normalize_point }; -template <typename BoxIn, typename BoxOut> +template <typename BoxIn, typename BoxOut, bool IsEquatorial = true> class normalize_box { template <typename UnitsIn, typename UnitsOut, typename CoordinateInType> @@ -193,6 +195,7 @@ public: math::normalize_spheroidal_box_coordinates < typename coordinate_system<BoxIn>::type::units, + IsEquatorial, in_coordinate_type >(lon_min, lat_min, lon_max, lat_max); @@ -237,6 +240,15 @@ struct normalize template <typename PointIn, typename PointOut> struct normalize < + PointIn, PointOut, point_tag, point_tag, + spherical_polar_tag, spherical_polar_tag + > : detail::normalization::normalize_point<PointIn, PointOut, false> +{}; + + +template <typename PointIn, typename PointOut> +struct normalize + < PointIn, PointOut, point_tag, point_tag, geographic_tag, geographic_tag > : detail::normalization::normalize_point<PointIn, PointOut> {}; @@ -254,6 +266,15 @@ struct normalize template <typename BoxIn, typename BoxOut> struct normalize < + BoxIn, BoxOut, box_tag, box_tag, + spherical_polar_tag, spherical_polar_tag + > : detail::normalization::normalize_box<BoxIn, BoxOut, false> +{}; + + +template <typename BoxIn, typename BoxOut> +struct normalize + < BoxIn, BoxOut, box_tag, box_tag, geographic_tag, geographic_tag > : detail::normalization::normalize_box<BoxIn, BoxOut> {}; |