diff --git a/include/boost/geometry/iterators/point_iterator.hpp b/include/boost/geometry/iterators/point_iterator.hpp index 0c21127f3..aa01a0eaa 100644 --- a/include/boost/geometry/iterators/point_iterator.hpp +++ b/include/boost/geometry/iterators/point_iterator.hpp @@ -10,6 +10,7 @@ #ifndef BOOST_GEOMETRY_ITERATORS_POINT_ITERATOR_HPP #define BOOST_GEOMETRY_ITERATORS_POINT_ITERATOR_HPP +#include #include #include #include @@ -280,6 +281,30 @@ points_end(Geometry& geometry) } +// MK:: need to add doc here +template +inline typename point_type::type +points_front(Geometry& geometry) +{ + BOOST_ASSERT( dispatch::points_begin::apply(geometry) + != dispatch::points_end::apply(geometry) ); + return *dispatch::points_begin::apply(geometry); +} + + +// MK:: need to add doc here +template +inline typename point_type::type +points_back(Geometry& geometry) +{ + BOOST_ASSERT( dispatch::points_begin::apply(geometry) + != dispatch::points_end::apply(geometry) ); + return *--dispatch::points_end::apply(geometry); +} + + + + }} // namespace boost::geometry #endif // BOOST_GEOMETRY_ITERATORS_POINT_ITERATOR_HPP