Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71813 - in branches/release/boost/geometry: algorithms algorithms/detail algorithms/detail/overlay arithmetic core domains geometries geometries/register iterators multi multi/algorithms multi/algorithms/detail/overlay multi/geometries/register multi/iterators multi/views multi/views/detail policies ranges strategies strategies/agnostic util views views/detail
From: barend.gehrels_at_[hidden]
Date: 2011-05-08 08:15:40


Author: barendgehrels
Date: 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
New Revision: 71813
URL: http://svn.boost.org/trac/boost/changeset/71813

Log:
Merged updates for (small) changes for views/ranges/iterators (r71711 through r71812)
Added:
   branches/release/boost/geometry/algorithms/detail/as_range.hpp
      - copied unchanged from r71812, /trunk/boost/geometry/algorithms/detail/as_range.hpp
   branches/release/boost/geometry/multi/geometries/register/
      - copied from r71812, /trunk/boost/geometry/multi/geometries/register/
   branches/release/boost/geometry/multi/geometries/register/multi_linestring.hpp
      - copied unchanged from r71812, /trunk/boost/geometry/multi/geometries/register/multi_linestring.hpp
   branches/release/boost/geometry/multi/geometries/register/multi_point.hpp
      - copied unchanged from r71812, /trunk/boost/geometry/multi/geometries/register/multi_point.hpp
   branches/release/boost/geometry/multi/geometries/register/multi_polygon.hpp
      - copied unchanged from r71812, /trunk/boost/geometry/multi/geometries/register/multi_polygon.hpp
   branches/release/boost/geometry/multi/views/
      - copied from r71812, /trunk/boost/geometry/multi/views/
   branches/release/boost/geometry/multi/views/detail/
      - copied from r71812, /trunk/boost/geometry/multi/views/detail/
   branches/release/boost/geometry/multi/views/detail/range_type.hpp
      - copied unchanged from r71812, /trunk/boost/geometry/multi/views/detail/range_type.hpp
   branches/release/boost/geometry/views/box_view.hpp
      - copied unchanged from r71812, /trunk/boost/geometry/views/box_view.hpp
   branches/release/boost/geometry/views/detail/
      - copied from r71812, /trunk/boost/geometry/views/detail/
   branches/release/boost/geometry/views/detail/points_view.hpp
      - copied unchanged from r71812, /trunk/boost/geometry/views/detail/points_view.hpp
   branches/release/boost/geometry/views/detail/range_type.hpp
      - copied unchanged from r71812, /trunk/boost/geometry/views/detail/range_type.hpp
   branches/release/boost/geometry/views/segment_view.hpp
      - copied unchanged from r71812, /trunk/boost/geometry/views/segment_view.hpp
Removed:
   branches/release/boost/geometry/iterators/box_iterator.hpp
   branches/release/boost/geometry/iterators/circular_iterator.hpp
   branches/release/boost/geometry/iterators/range_type.hpp
   branches/release/boost/geometry/iterators/segment_range_iterator.hpp
   branches/release/boost/geometry/multi/iterators/range_type.hpp
   branches/release/boost/geometry/ranges/box_range.hpp
   branches/release/boost/geometry/ranges/segment_range.hpp
   branches/release/boost/geometry/util/as_range.hpp
Properties modified:
   branches/release/boost/geometry/algorithms/ (props changed)
   branches/release/boost/geometry/arithmetic/ (props changed)
   branches/release/boost/geometry/core/ (props changed)
   branches/release/boost/geometry/domains/ (props changed)
   branches/release/boost/geometry/geometries/ (props changed)
   branches/release/boost/geometry/iterators/ (props changed)
   branches/release/boost/geometry/multi/ (props changed)
   branches/release/boost/geometry/policies/ (props changed)
   branches/release/boost/geometry/ranges/ (props changed)
   branches/release/boost/geometry/strategies/ (props changed)
   branches/release/boost/geometry/util/ (props changed)
   branches/release/boost/geometry/views/ (props changed)
Text files modified:
   branches/release/boost/geometry/algorithms/append.hpp | 6 +++---
   branches/release/boost/geometry/algorithms/convex_hull.hpp | 18 ++++++++----------
   branches/release/boost/geometry/algorithms/detail/overlay/copy_segments.hpp | 1 -
   branches/release/boost/geometry/algorithms/detail/overlay/get_turns.hpp | 2 +-
   branches/release/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp | 5 ++---
   branches/release/boost/geometry/algorithms/detail/overlay/overlay.hpp | 18 ++++++++----------
   branches/release/boost/geometry/algorithms/within.hpp | 27 +++++++++++++++++++++++++++
   branches/release/boost/geometry/geometries/register/box.hpp | 2 +-
   branches/release/boost/geometry/multi/algorithms/detail/overlay/get_turns.hpp | 2 +-
   branches/release/boost/geometry/multi/algorithms/simplify.hpp | 1 -
   branches/release/boost/geometry/multi/multi.hpp | 3 +--
   branches/release/boost/geometry/strategies/agnostic/hull_graham_andrew.hpp | 4 ++--
   branches/release/boost/geometry/views/closeable_view.hpp | 2 +-
   branches/release/boost/geometry/views/identity_view.hpp | 2 +-
   branches/release/boost/geometry/views/reversible_view.hpp | 4 ++--
   15 files changed, 58 insertions(+), 39 deletions(-)

Modified: branches/release/boost/geometry/algorithms/append.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/append.hpp (original)
+++ branches/release/boost/geometry/algorithms/append.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -79,19 +79,19 @@
 template <typename Polygon, typename Point>
 struct point_to_polygon
 {
- typedef typename ring_type<Polygon>::type range_type;
+ typedef typename ring_type<Polygon>::type ring_type;
 
     static inline void apply(Polygon& polygon, Point const& point,
                 int ring_index, int = 0)
     {
         if (ring_index == -1)
         {
- append_point<range_type, Point>::apply(
+ append_point<ring_type, Point>::apply(
                         exterior_ring(polygon), point);
         }
         else if (ring_index < int(num_interior_rings(polygon)))
         {
- append_point<range_type, Point>::apply(
+ append_point<ring_type, Point>::apply(
                         interior_rings(polygon)[ring_index], point);
         }
     }

Modified: branches/release/boost/geometry/algorithms/convex_hull.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/convex_hull.hpp (original)
+++ branches/release/boost/geometry/algorithms/convex_hull.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -22,12 +22,12 @@
 
 #include <boost/geometry/geometries/concepts/check.hpp>
 
-#include <boost/geometry/iterators/range_type.hpp>
-
 #include <boost/geometry/strategies/convex_hull.hpp>
 #include <boost/geometry/strategies/concepts/convex_hull_concept.hpp>
 
-#include <boost/geometry/util/as_range.hpp>
+#include <boost/geometry/views/detail/range_type.hpp>
+
+#include <boost/geometry/algorithms/detail/as_range.hpp>
 
 
 namespace boost { namespace geometry
@@ -46,8 +46,8 @@
 struct hull_insert
 {
 
- // Member template function, to avoid inconvenient declaration
- // of output-iterator-type, from hull_to_geometry
+ // Member template function (to avoid inconvenient declaration
+ // of output-iterator-type, from hull_to_geometry)
     template <typename OutputIterator>
     static inline OutputIterator apply(Geometry const& geometry,
             OutputIterator out, Strategy const& strategy)
@@ -78,10 +78,10 @@
                 Strategy
>::apply(geometry,
                 std::back_inserter(
- // Handle both ring and polygon the same:
- geometry::as_range
+ // Handle linestring, ring and polygon the same:
+ detail::as_range
                         <
- typename geometry::range_type<OutputGeometry>::type
+ typename range_type<OutputGeometry>::type
>(out)), strategy);
     }
 };
@@ -167,7 +167,6 @@
             Geometry2
>();
 
- //typedef typename range_type<Geometry1>::type range_type;
     typedef typename point_type<Geometry2>::type point_type;
 
     typedef typename strategy_convex_hull
@@ -225,7 +224,6 @@
     concept::check<Geometry const>();
     concept::check<typename point_type<Geometry>::type>();
 
- typedef typename range_type<Geometry>::type range_type;
     typedef typename point_type<Geometry>::type point_type;
 
     typedef typename strategy_convex_hull

Modified: branches/release/boost/geometry/algorithms/detail/overlay/copy_segments.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/copy_segments.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/copy_segments.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -24,7 +24,6 @@
 #include <boost/geometry/core/interior_rings.hpp>
 #include <boost/geometry/geometries/concepts/check.hpp>
 #include <boost/geometry/iterators/ever_circling_iterator.hpp>
-#include <boost/geometry/iterators/range_type.hpp>
 #include <boost/geometry/views/closeable_view.hpp>
 #include <boost/geometry/views/reversible_view.hpp>
 

Modified: branches/release/boost/geometry/algorithms/detail/overlay/get_turns.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/get_turns.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/get_turns.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -33,10 +33,10 @@
 #include <boost/geometry/util/math.hpp>
 #include <boost/geometry/views/closeable_view.hpp>
 #include <boost/geometry/views/reversible_view.hpp>
+#include <boost/geometry/views/detail/range_type.hpp>
 
 #include <boost/geometry/geometries/box.hpp>
 
-#include <boost/geometry/iterators/range_type.hpp>
 #include <boost/geometry/iterators/ever_circling_iterator.hpp>
 
 #include <boost/geometry/strategies/cartesian/cart_intersect.hpp>

Modified: branches/release/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -26,7 +26,7 @@
 #include <boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp>
 #include <boost/geometry/algorithms/detail/overlay/overlay.hpp>
 #include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
-#include <boost/geometry/ranges/segment_range.hpp>
+#include <boost/geometry/views/segment_view.hpp>
 
 
 namespace boost { namespace geometry
@@ -286,8 +286,7 @@
     static inline OutputIterator apply(Segment const& segment,
             Box const& box, OutputIterator out, Strategy const& strategy)
     {
- typedef geometry::segment_range<Segment> range_type;
- range_type range(segment);
+ geometry::segment_view<Segment> range(segment);
 
         typedef typename point_type<GeometryOut>::type point_type;
         strategy::intersection::liang_barsky<Box, point_type> lb_strategy;

Modified: branches/release/boost/geometry/algorithms/detail/overlay/overlay.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/overlay.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/overlay.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -31,8 +31,6 @@
 #include <boost/geometry/algorithms/num_points.hpp>
 #include <boost/geometry/algorithms/reverse.hpp>
 
-#include <boost/geometry/iterators/range_type.hpp>
-
 #include <boost/geometry/algorithms/detail/overlay/add_rings.hpp>
 #include <boost/geometry/algorithms/detail/overlay/assign_parents.hpp>
 #include <boost/geometry/algorithms/detail/overlay/ring_properties.hpp>
@@ -106,8 +104,10 @@
             Geometry2 const& geometry2,
             OutputIterator out)
 {
- typedef typename geometry::range_type<GeometryOut>::type ring_type;
- typedef std::deque<ring_type> ring_container_type;
+ typedef std::deque
+ <
+ typename geometry::ring_type<GeometryOut>::type
+ > ring_container_type;
 
     typedef ring_properties<typename geometry::point_type<Geometry1>::type> properties;
 
@@ -155,12 +155,10 @@
         typedef detail::overlay::traversal_turn_info<point_type> turn_info;
         typedef std::deque<turn_info> container_type;
 
- // "Use" rangetype for ringtype:
- // -> for polygon, it is the type of the exterior ring.
- // -> for ring, it is the ring itself.
- // -> for multi-polygon, it is also the type of the ring.
- typedef typename geometry::range_type<GeometryOut>::type ring_type;
- typedef std::deque<ring_type> ring_container_type;
+ typedef std::deque
+ <
+ typename geometry::ring_type<GeometryOut>::type
+ > ring_container_type;
 
         if (geometry::num_points(geometry1) == 0
             || geometry::num_points(geometry2) == 0)

Modified: branches/release/boost/geometry/algorithms/within.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/within.hpp (original)
+++ branches/release/boost/geometry/algorithms/within.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -332,6 +332,33 @@
 #endif // DOXYGEN_NO_DISPATCH
 
 
+#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
+namespace strategy { namespace within
+{
+
+/// Strategy for box-in-box (not used but has to be present for default strategy)
+struct unused_strategy {};
+
+namespace services
+{
+
+// Specialize for box-in-areal (box-in-box). This is meant to do box-in-box
+// but will be catched by box-in-any-areal, which has to change later
+// (we might introduce another tag which is not "areal", derived by poly/ring/
+// multi_poly, but NOT by box, and use that here. E.g. "polygonal")
+// Using cartesian prevents spherical yet from compiling, which is good.
+template <typename Box1, typename Box2>
+struct default_strategy<box_tag, areal_tag, cartesian_tag, cartesian_tag, Box1, Box2>
+{
+ typedef unused_strategy type;
+};
+
+} // namespace services
+
+}} // namespace strategy::within
+
+#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
+
 /*!
 \brief \brief_check12{is completely inside}
 \ingroup within

Modified: branches/release/boost/geometry/geometries/register/box.hpp
==============================================================================
--- branches/release/boost/geometry/geometries/register/box.hpp (original)
+++ branches/release/boost/geometry/geometries/register/box.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -129,7 +129,7 @@
 \brief \brief_macro{box}
 \ingroup register
 \details \details_macro{BOOST_GEOMETRY_REGISTER_BOX_TEMPLATED, box}
- \details_macro_templated{box}
+ \details_macro_templated{box, point}
 \param Box \param_macro_type{Box}
 \param MinCorner minimum corner (should be public member or method)
 \param MaxCorner maximum corner (should be public member or method)

Deleted: branches/release/boost/geometry/iterators/box_iterator.hpp
==============================================================================
--- branches/release/boost/geometry/iterators/box_iterator.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,126 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_BOX_ITERATOR_HPP
-#define BOOST_GEOMETRY_BOX_ITERATOR_HPP
-
-#include <boost/iterator.hpp>
-#include <boost/iterator/iterator_facade.hpp>
-#include <boost/iterator/iterator_categories.hpp>
-
-#include <boost/geometry/core/point_type.hpp>
-#include <boost/geometry/algorithms/assign.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-/*!
- \brief Iterator which adapts a box (four points + closing) as iterator
- \tparam Box box type on which this iterator is based on
- \note It is always const. We cannot dereference something non-const
- (at least not without doing tricks as returning assignables)
- \ingroup iterators
-*/
-template <typename Box>
-struct box_iterator
- : public boost::iterator_facade
- <
- box_iterator<Box>,
- typename point_type<Box>::type const,
- boost::random_access_traversal_tag
- >
-{
- // Default constructor is required to check concept of Range
- inline box_iterator()
- : m_index(-1)
- , m_box_address(NULL)
- {
- }
-
- explicit inline box_iterator(Box const& box)
- : m_index(0)
- , m_box_address(&box)
- {
- init(box);
- }
-
- // Constructor to indicate the end of a box
- explicit inline box_iterator(Box const& box, bool)
- : m_index(5)
- , m_box_address(&box)
- {
- init(box);
- }
-
- // Operator= is required to check concept of Range
- inline box_iterator<Box>& operator=(box_iterator<Box> const& source)
- {
- m_index = source.m_index;
- m_box_address = source.m_box_address;
- return *this;
- }
-
- typedef std::ptrdiff_t difference_type;
-
-private:
- friend class boost::iterator_core_access;
- typedef typename point_type<Box>::type point_type;
-
- inline point_type const& dereference() const
- {
- if (m_index >= 0 && m_index <= 3)
- {
- return m_points[m_index];
- }
- // If it index is 4, or other, return first point
- return m_points[0];
- }
-
- inline bool equal(box_iterator<Box> const& other) const
- {
- return m_box_address == this->m_box_address
- && other.m_index == this->m_index;
- }
-
- inline void increment()
- {
- m_index++;
- }
-
- inline void decrement()
- {
- m_index--;
- }
-
- inline difference_type distance_to(box_iterator<Box> const& other) const
- {
- return other.m_index - this->m_index;
- }
-
- inline void init(Box const& box)
- {
- detail::assign_box_corners_oriented<false>(box, m_points);
- }
-
- // Copy points here - box might define them otherwise
- point_type m_points[4];
- int m_index;
- Box const* m_box_address;
-};
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_BOX_ITERATOR_HPP

Deleted: branches/release/boost/geometry/iterators/circular_iterator.hpp
==============================================================================
--- branches/release/boost/geometry/iterators/circular_iterator.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,121 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_ITERATORS_CIRCULAR_ITERATOR_HPP
-#define BOOST_GEOMETRY_ITERATORS_CIRCULAR_ITERATOR_HPP
-
-#include <boost/iterator.hpp>
-#include <boost/iterator/iterator_adaptor.hpp>
-#include <boost/iterator/iterator_categories.hpp>
-
-#include <boost/geometry/iterators/base.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-/*!
- \brief Iterator which goes circular through a range, starting at a point, ending at that point
- \tparam Iterator iterator on which this class is based on
- \ingroup iterators
-*/
-template <typename Iterator>
-struct circular_iterator :
- public detail::iterators::iterator_base
- <
- circular_iterator<Iterator>,
- Iterator
- >
-{
- friend class boost::iterator_core_access;
-
- explicit inline circular_iterator(Iterator begin, Iterator end, Iterator start)
- : m_begin(begin)
- , m_end(end)
- , m_start(start)
- {
- this->base_reference() = start;
- }
-
- // Constructor to indicate the end of a range, to enable e.g. std::copy
- explicit inline circular_iterator(Iterator end)
- : m_begin(end)
- , m_end(end)
- , m_start(end)
- {
- this->base_reference() = end;
- }
-
- /// Navigate to a certain position, should be in [start .. end], it at end
- /// it will circle again.
- inline void moveto(Iterator it)
- {
- this->base_reference() = it;
- check_end();
- }
-
-private:
-
- inline void increment()
- {
- if (this->base() != m_end)
- {
- (this->base_reference())++;
- check_end();
- }
- }
- inline void decrement()
- {
- if (this->base() != m_end)
- {
- // If at begin, go back to end (assumed this is possible...)
- if (this->base() == m_begin)
- {
- this->base_reference() = this->m_end;
- }
-
- // Decrement
- (this->base_reference())--;
-
- // If really back at start, go to end == end of iteration
- if (this->base() == m_start)
- {
- this->base_reference() = this->m_end;
- }
- }
- }
-
-
- inline void check_end()
- {
- if (this->base() == this->m_end)
- {
- this->base_reference() = this->m_begin;
- }
-
- if (this->base() == m_start)
- {
- this->base_reference() = this->m_end;
- }
- }
-
- Iterator m_begin;
- Iterator m_end;
- Iterator m_start;
-};
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_ITERATORS_CIRCULAR_ITERATOR_HPP

Deleted: branches/release/boost/geometry/iterators/range_type.hpp
==============================================================================
--- branches/release/boost/geometry/iterators/range_type.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,89 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_ITERATORS_RANGE_TYPE_HPP
-#define BOOST_GEOMETRY_ITERATORS_RANGE_TYPE_HPP
-
-
-#include <boost/type_traits.hpp>
-
-#include <boost/geometry/core/ring_type.hpp>
-#include <boost/geometry/core/tag.hpp>
-#include <boost/geometry/core/tags.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-
-#ifndef DOXYGEN_NO_DISPATCH
-namespace dispatch
-{
-
-
-template <typename GeometryTag, typename Geometry>
-struct range_type
-{
- // Even if it is not recognized, define itself as a type.
- // This enables calling range_type over any range
- // (not necessarily a geometry)
-
- // Furthermore, applicable for ring/linestring
- typedef Geometry type;
-};
-
-
-template <typename Geometry>
-struct range_type<point_tag, Geometry>
-{
- typedef void type;
-};
-
-
-template <typename Geometry>
-struct range_type<polygon_tag, Geometry>
-{
- typedef typename ring_type<Geometry>::type type;
-};
-
-
-} // namespace dispatch
-#endif // DOXYGEN_NO_DISPATCH
-
-
-
-/*!
-\brief Meta-function defining a type which is a boost-range.
-\details
-- For linestrings and rings, it defines the type itself.
-- For polygons it defines the ring type.
-- For multi-points, it defines the type itself
-- For multi-polygons and multi-linestrings, it defines the single-version
- (so in the end the linestring and ring-type-of-multi-polygon)
-\ingroup iterators
-*/
-template <typename Geometry>
-struct range_type
-{
- typedef typename dispatch::range_type
- <
- typename tag<Geometry>::type,
- Geometry
- >::type type;
-};
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_ITERATORS_RANGE_TYPE_HPP

Deleted: branches/release/boost/geometry/iterators/segment_range_iterator.hpp
==============================================================================
--- branches/release/boost/geometry/iterators/segment_range_iterator.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,133 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_SEGMENT_RANGE_ITERATOR_HPP
-#define BOOST_GEOMETRY_SEGMENT_RANGE_ITERATOR_HPP
-
-#include <boost/assert.hpp>
-
-#include <boost/iterator.hpp>
-#include <boost/iterator/iterator_facade.hpp>
-#include <boost/iterator/iterator_categories.hpp>
-
-#include <boost/geometry/core/point_type.hpp>
-#include <boost/geometry/algorithms/assign.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-/*!
- \brief Iterator which adapts a segment (two points) as iterator
- \tparam Segment segment type on which this iterator is based on
- \note It is always const. We cannot dereference something non-const
- (at least not without doing tricks as returning assignables)
- \ingroup iterators
-*/
-template <typename Segment>
-struct segment_range_iterator
- : public boost::iterator_facade
- <
- segment_range_iterator<Segment>,
- typename point_type<Segment>::type const,
- boost::random_access_traversal_tag
- >
-{
- // Default constructor is required to check concept of Range
- // (used in checking linestring/ring concepts)
- inline segment_range_iterator()
- : m_index(-1)
- , m_segment_address(NULL)
- {
- }
-
- explicit inline segment_range_iterator(Segment const& segment)
- : m_index(0)
- , m_segment_address(&segment)
- {
- init(segment);
- }
-
- // Constructor to indicate the end of a segment
- explicit inline segment_range_iterator(Segment const& segment, bool)
- : m_index(2)
- , m_segment_address(&segment)
- {
- init(segment);
- }
-
- // Operator= is required to check concept of Range
- inline segment_range_iterator<Segment>& operator=(segment_range_iterator<Segment> const& source)
- {
- m_index = source.m_index;
- m_segment_address = source.m_segment_address;
- return *this;
- }
-
- typedef std::ptrdiff_t difference_type;
-
-private:
- friend class boost::iterator_core_access;
- typedef typename point_type<Segment>::type point_type;
-
- inline point_type const& dereference() const
- {
- if (m_index >= 0 && m_index <= 1)
- {
- return m_points[m_index];
- }
-
- BOOST_ASSERT(!"Should not occur"); // Probably throw here.
- return m_points[0];
- }
-
- inline bool equal(segment_range_iterator<Segment> const& other) const
- {
- return m_segment_address == this->m_segment_address
- && other.m_index == this->m_index;
- }
-
- inline void increment()
- {
- m_index++;
- }
-
- inline void decrement()
- {
- m_index--;
- }
-
- inline difference_type distance_to(segment_range_iterator<Segment> const& other) const
- {
- return other.m_index - this->m_index;
- }
-
- inline void init(Segment const& segment)
- {
- geometry::detail::assign_point_from_index<0>(segment, m_points[0]);
- geometry::detail::assign_point_from_index<1>(segment, m_points[1]);
- }
-
- // We HAVE TO copy the points, because a segment does not need
- // to consist of two points,
- // and we are expected to return a point here
- point_type m_points[2];
- int m_index;
- Segment const* m_segment_address;
-};
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_SEGMENT_RANGE_ITERATOR_HPP

Modified: branches/release/boost/geometry/multi/algorithms/detail/overlay/get_turns.hpp
==============================================================================
--- branches/release/boost/geometry/multi/algorithms/detail/overlay/get_turns.hpp (original)
+++ branches/release/boost/geometry/multi/algorithms/detail/overlay/get_turns.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -15,7 +15,7 @@
 #include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
 
 #include <boost/geometry/multi/algorithms/distance.hpp>
-#include <boost/geometry/multi/iterators/range_type.hpp>
+#include <boost/geometry/multi/views/detail/range_type.hpp>
 
 #include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
 #include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>

Modified: branches/release/boost/geometry/multi/algorithms/simplify.hpp
==============================================================================
--- branches/release/boost/geometry/multi/algorithms/simplify.hpp (original)
+++ branches/release/boost/geometry/multi/algorithms/simplify.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -19,7 +19,6 @@
 #include <boost/geometry/core/mutable_range.hpp>
 #include <boost/geometry/multi/core/tags.hpp>
 
-#include <boost/geometry/multi/iterators/range_type.hpp>
 
 #include <boost/geometry/multi/algorithms/clear.hpp>
 #include <boost/geometry/algorithms/simplify.hpp>

Deleted: branches/release/boost/geometry/multi/iterators/range_type.hpp
==============================================================================
--- branches/release/boost/geometry/multi/iterators/range_type.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,62 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_MULTI_ITERATORS_RANGE_TYPE_HPP
-#define BOOST_GEOMETRY_MULTI_ITERATORS_RANGE_TYPE_HPP
-
-
-#include <boost/range.hpp>
-
-#include <boost/geometry/iterators/range_type.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-#ifndef DOXYGEN_NO_DISPATCH
-namespace dispatch
-{
-
-// multi-point acts itself as a range
-template <typename Geometry>
-struct range_type<multi_point_tag, Geometry>
-{
- typedef Geometry type;
-};
-
-
-template <typename Geometry>
-struct range_type<multi_linestring_tag, Geometry>
-{
- typedef typename boost::range_value<Geometry>::type type;
-};
-
-
-template <typename Geometry>
-struct range_type<multi_polygon_tag, Geometry>
-{
- // Call its single-version
- typedef typename geometry::ring_type
- <
- typename boost::range_value<Geometry>::type
- >::type type;
-};
-
-
-} // namespace dispatch
-#endif // DOXYGEN_NO_DISPATCH
-
-
-}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_MULTI_ITERATORS_RANGE_TYPE_HPP

Modified: branches/release/boost/geometry/multi/multi.hpp
==============================================================================
--- branches/release/boost/geometry/multi/multi.hpp (original)
+++ branches/release/boost/geometry/multi/multi.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -66,8 +66,7 @@
 #include <boost/geometry/multi/geometries/concepts/multi_linestring_concept.hpp>
 #include <boost/geometry/multi/geometries/concepts/multi_polygon_concept.hpp>
 
-#include <boost/geometry/multi/iterators/range_type.hpp>
-
+#include <boost/geometry/multi/views/detail/range_type.hpp>
 #include <boost/geometry/multi/strategies/cartesian/centroid_average.hpp>
 
 #include <boost/geometry/multi/util/write_dsv.hpp>

Deleted: branches/release/boost/geometry/ranges/box_range.hpp
==============================================================================
--- branches/release/boost/geometry/ranges/box_range.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,75 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_RANGES_BOX_RANGE_HPP
-#define BOOST_GEOMETRY_RANGES_BOX_RANGE_HPP
-
-
-#include <boost/range.hpp>
-
-#include <boost/geometry/iterators/box_iterator.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-
-/*!
-\brief Range, walking over the four points of a box
-\tparam Box box type
-\ingroup ranges
-*/
-template <typename Box>
-class box_range
-{
-public :
- typedef box_iterator<Box const> const_iterator;
- typedef box_iterator<Box const> iterator; // must be defined
-
- explicit box_range(Box const& box)
- : m_begin(const_iterator(box))
- , m_end(const_iterator(box, true))
- {
- }
-
- const_iterator begin() const { return m_begin; }
- const_iterator end() const { return m_end; }
-
- // It may not be used non-const, so comment this:
- //iterator begin() { return m_begin; }
- //iterator end() { return m_end; }
-
-private :
- const_iterator m_begin, m_end;
-};
-
-
-#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
-
-// All box ranges can be handled as rings
-namespace traits
-{
- template<typename Box>
- struct tag<box_range<Box> >
- {
- typedef ring_tag type;
- };
-}
-
-#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_RANGES_BOX_RANGE_HPP

Deleted: branches/release/boost/geometry/ranges/segment_range.hpp
==============================================================================
--- branches/release/boost/geometry/ranges/segment_range.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,76 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_RANGES_SEGMENT_RANGE_HPP
-#define BOOST_GEOMETRY_RANGES_SEGMENT_RANGE_HPP
-
-
-#include <boost/range.hpp>
-
-#include <boost/geometry/iterators/segment_range_iterator.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-
-/*!
-\brief Range, walking over the two points of a segment
-\tparam Segment segment type
-\ingroup ranges
-*/
-template <typename Segment>
-class segment_range
-{
-public :
- typedef segment_range_iterator<Segment const> const_iterator;
- typedef segment_range_iterator<Segment const> iterator; // must be defined
-
- explicit segment_range(Segment const& segment)
- : m_begin(const_iterator(segment))
- , m_end(const_iterator(segment, true))
- {
- }
-
- const_iterator begin() const { return m_begin; }
- const_iterator end() const { return m_end; }
-
- // It may not be used non-const, so comment this:
- //iterator begin() { return m_begin; }
- //iterator end() { return m_end; }
-
-private :
- const_iterator m_begin, m_end;
-};
-
-
-#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
-
-// All segment ranges can be handled as linestrings
-namespace traits
-{
- template<typename Segment>
- struct tag<segment_range<Segment> >
- {
- typedef linestring_tag type;
- };
-}
-
-#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
-
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_RANGES_SEGMENT_RANGE_HPP

Modified: branches/release/boost/geometry/strategies/agnostic/hull_graham_andrew.hpp
==============================================================================
--- branches/release/boost/geometry/strategies/agnostic/hull_graham_andrew.hpp (original)
+++ branches/release/boost/geometry/strategies/agnostic/hull_graham_andrew.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -23,7 +23,7 @@
 #include <boost/geometry/core/point_type.hpp>
 #include <boost/geometry/strategies/convex_hull.hpp>
 
-#include <boost/geometry/iterators/range_type.hpp>
+#include <boost/geometry/views/detail/range_type.hpp>
 
 #include <boost/geometry/policies/compare.hpp>
 
@@ -277,7 +277,7 @@
         // This makes use of the geometry::less/greater predicates with the optional
         // direction template parameter to indicate x direction
 
- typedef typename range_type<InputGeometry>::type range_type;
+ typedef typename geometry::detail::range_type<InputGeometry>::type range_type;
 
         typedef typename boost::range_iterator
             <

Deleted: branches/release/boost/geometry/util/as_range.hpp
==============================================================================
--- branches/release/boost/geometry/util/as_range.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
+++ (empty file)
@@ -1,103 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_UTIL_AS_RANGE_HPP
-#define BOOST_GEOMETRY_UTIL_AS_RANGE_HPP
-
-
-#include <boost/type_traits.hpp>
-
-#include <boost/geometry/core/exterior_ring.hpp>
-#include <boost/geometry/core/tag.hpp>
-#include <boost/geometry/core/tags.hpp>
-
-#include <boost/geometry/util/add_const_if_c.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-
-#ifndef DOXYGEN_NO_DISPATCH
-namespace dispatch
-{
-
-
-template <typename GeometryTag, typename Geometry, typename Range, bool IsConst>
-struct as_range
-{
- static inline typename add_const_if_c<IsConst, Range>::type& get(
- typename add_const_if_c<IsConst, Geometry>::type& input)
- {
- return input;
- }
-};
-
-
-template <typename Geometry, typename Range, bool IsConst>
-struct as_range<polygon_tag, Geometry, Range, IsConst>
-{
- static inline typename add_const_if_c<IsConst, Range>::type& get(
- typename add_const_if_c<IsConst, Geometry>::type& input)
- {
- return exterior_ring(input);
- }
-};
-
-
-} // namespace dispatch
-#endif // DOXYGEN_NO_DISPATCH
-
-
-/*!
-\brief Function getting either the range (ring, linestring) itself
-or the outer ring (polygon)
-\details Utility to handle polygon's outer ring as a range
-\ingroup utility
-*/
-template <typename Range, typename Geometry>
-inline Range& as_range(Geometry& input)
-{
- return dispatch::as_range
- <
- typename tag<Geometry>::type,
- Geometry,
- Range,
- false
- >::get(input);
-}
-
-
-/*!
-\brief Function getting either the range (ring, linestring) itself
-or the outer ring (polygon), const version
-\details Utility to handle polygon's outer ring as a range
-\ingroup utility
-*/
-template <typename Range, typename Geometry>
-inline Range const& as_range(Geometry const& input)
-{
- return dispatch::as_range
- <
- typename tag<Geometry>::type,
- Geometry,
- Range,
- true
- >::get(input);
-}
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_UTIL_AS_RANGE_HPP

Modified: branches/release/boost/geometry/views/closeable_view.hpp
==============================================================================
--- branches/release/boost/geometry/views/closeable_view.hpp (original)
+++ branches/release/boost/geometry/views/closeable_view.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -63,7 +63,7 @@
 \brief View on a range, either closing or not closing
 \tparam Range original range
 \tparam Close specifying if it should be closed or not
-\ingroup ranges
+\ingroup views
 */
 template <typename Range, closure_selector Close>
 struct closeable_view {};

Modified: branches/release/boost/geometry/views/identity_view.hpp
==============================================================================
--- branches/release/boost/geometry/views/identity_view.hpp (original)
+++ branches/release/boost/geometry/views/identity_view.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -25,7 +25,7 @@
 /*!
 \brief View on a range, not modifying anything
 \tparam Range original range
-\ingroup ranges
+\ingroup views
 */
 template <typename Range>
 struct identity_view

Modified: branches/release/boost/geometry/views/reversible_view.hpp
==============================================================================
--- branches/release/boost/geometry/views/reversible_view.hpp (original)
+++ branches/release/boost/geometry/views/reversible_view.hpp 2011-05-08 08:15:38 EDT (Sun, 08 May 2011)
@@ -30,7 +30,7 @@
 
 /*!
 \brief Flag for iterating a reversible_view in forward or reverse direction
-\ingroup ranges
+\ingroup views
 */
 enum iterate_direction { iterate_forward, iterate_reverse };
 
@@ -38,7 +38,7 @@
 \brief View on a range, reversing direction if necessary
 \tparam Range original range
 \tparam Direction direction of iteration
-\ingroup ranges
+\ingroup views
 */
 template <typename Range, iterate_direction Direction>
 struct reversible_view {};


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk