3 // Copyright (c) 2017-2018, Oracle and/or its affiliates.
4 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
6 // Use, modification and distribution is subject to the Boost Software License,
7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP
11 #define BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP
16 #include <boost/geometry/core/access.hpp>
19 namespace boost { namespace geometry { namespace projections
22 // Originally in pj_transform()
23 template <typename Point>
24 inline void set_invalid_point(Point & point)
26 geometry::set<0>(point, HUGE_VAL);
27 geometry::set<1>(point, HUGE_VAL);
30 template <typename Point>
31 inline bool is_invalid_point(Point const& point)
33 return geometry::get<0>(point) == HUGE_VAL;
36 }}} // namespace boost::geometry::projections
38 #endif // BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP