File indexing completed on 2025-01-18 09:36:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_GEOMETRY_UTIL_IS_INVERSE_SPHEROIDAL_COORDINATES_HPP
0013 #define BOOST_GEOMETRY_UTIL_IS_INVERSE_SPHEROIDAL_COORDINATES_HPP
0014
0015 #include <boost/geometry/core/access.hpp>
0016 #include <boost/geometry/core/coordinate_type.hpp>
0017 #include <boost/geometry/core/point_type.hpp>
0018
0019 #include <boost/geometry/util/math.hpp>
0020
0021 namespace boost { namespace geometry
0022 {
0023
0024 template<class CT>
0025 struct bounds
0026 {
0027 static CT lowest () { return boost::numeric::bounds<CT>::lowest(); }
0028 static CT highest () { return boost::numeric::bounds<CT>::highest(); }
0029 };
0030
0031 template <typename Box>
0032 bool is_inverse_spheroidal_coordinates(Box const& box)
0033 {
0034 typedef typename point_type<Box>::type point_type;
0035 typedef typename coordinate_type<point_type>::type bound_type;
0036
0037 bound_type high = bounds<bound_type>::highest();
0038 bound_type low = bounds<bound_type>::lowest();
0039
0040 return (geometry::get<0, 0>(box) == high) &&
0041 (geometry::get<0, 1>(box) == high) &&
0042 (geometry::get<1, 0>(box) == low) &&
0043 (geometry::get<1, 1>(box) == low);
0044 }
0045
0046 }}
0047
0048 #endif