1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2014, Oracle and/or its affiliates.
5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
10 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_POINTLIKE_HPP
11 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_POINTLIKE_HPP
13 #include <boost/range.hpp>
15 #include <boost/geometry/core/tags.hpp>
17 #include <boost/geometry/algorithms/dispatch/is_valid.hpp>
20 namespace boost { namespace geometry
25 #ifndef DOXYGEN_NO_DISPATCH
29 // A point is always simple
30 template <typename Point>
31 struct is_valid<Point, point_tag>
33 static inline bool apply(Point const&)
41 // A MultiPoint is simple if no two Points in the MultiPoint are equal
42 // (have identical coordinate values in X and Y)
44 // Reference: OGC 06-103r4 (6.1.5)
45 template <typename MultiPoint>
46 struct is_valid<MultiPoint, multi_point_tag>
48 static inline bool apply(MultiPoint const& multipoint)
50 return boost::size(multipoint) > 0;
55 } // namespace dispatch
56 #endif // DOXYGEN_NO_DISPATCH
59 }} // namespace boost::geometry
62 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_POINTLIKE_HPP