Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70710 - in trunk/boost/geometry: algorithms extensions/algorithms/buffer extensions/iterators extensions/strategies iterators strategies
From: barend.gehrels_at_[hidden]
Date: 2011-03-29 17:17:44


Author: barendgehrels
Date: 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
New Revision: 70710
URL: http://svn.boost.org/trac/boost/changeset/70710

Log:
Moved some non-finished code to extensions
Documented centroid,clear,within
Added:
   trunk/boost/geometry/extensions/iterators/segment_returning_iterator.hpp
      - copied, changed from r70600, /trunk/boost/geometry/iterators/segment_returning_iterator.hpp
   trunk/boost/geometry/extensions/strategies/
   trunk/boost/geometry/extensions/strategies/buffer.hpp
      - copied, changed from r70600, /trunk/boost/geometry/strategies/buffer.hpp
   trunk/boost/geometry/extensions/strategies/buffer_join_round.hpp
      - copied, changed from r70600, /trunk/boost/geometry/strategies/buffer_join_round.hpp
   trunk/boost/geometry/extensions/strategies/buffer_side.hpp
      - copied, changed from r70600, /trunk/boost/geometry/strategies/buffer_side.hpp
   trunk/boost/geometry/extensions/strategies/parse.hpp
      - copied, changed from r70600, /trunk/boost/geometry/strategies/parse.hpp
Removed:
   trunk/boost/geometry/iterators/segment_returning_iterator.hpp
   trunk/boost/geometry/strategies/buffer.hpp
   trunk/boost/geometry/strategies/buffer_join_round.hpp
   trunk/boost/geometry/strategies/buffer_side.hpp
   trunk/boost/geometry/strategies/parse.hpp
Text files modified:
   trunk/boost/geometry/algorithms/centroid.hpp | 22 ++++++++++------------
   trunk/boost/geometry/algorithms/clear.hpp | 5 ++++-
   trunk/boost/geometry/algorithms/within.hpp | 15 +++++++++++++++
   trunk/boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp | 2 +-
   trunk/boost/geometry/extensions/algorithms/buffer/polygon_buffer.hpp | 2 +-
   trunk/boost/geometry/extensions/algorithms/buffer/sectionalizing_buffer.hpp | 10 +++++-----
   trunk/boost/geometry/extensions/algorithms/buffer/segmenting_buffer.hpp | 6 +++---
   trunk/boost/geometry/extensions/algorithms/buffer/splitting_buffer.hpp | 12 ++++++------
   trunk/boost/geometry/extensions/algorithms/buffer/traversing_buffer.hpp | 4 ++--
   trunk/boost/geometry/extensions/iterators/segment_returning_iterator.hpp | 6 +++---
   trunk/boost/geometry/extensions/strategies/buffer.hpp | 8 ++++----
   trunk/boost/geometry/extensions/strategies/buffer_join_round.hpp | 8 ++++----
   trunk/boost/geometry/extensions/strategies/buffer_side.hpp | 6 +++---
   trunk/boost/geometry/extensions/strategies/parse.hpp | 6 +++---
   trunk/boost/geometry/strategies/strategies.hpp | 1 -
   15 files changed, 64 insertions(+), 49 deletions(-)

Modified: trunk/boost/geometry/algorithms/centroid.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/centroid.hpp (original)
+++ trunk/boost/geometry/algorithms/centroid.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -347,10 +347,7 @@
 
 \qbk{distinguish,with strategy}
 \qbk{[include reference/algorithms/centroid.qbk]}
-
-\qbk{
-[heading Available Strategies]
-\* [link geometry.reference.strategies.strategy_centroid_bashein_detmer Bashein Detmer (cartesian)]
+\qbk{[include reference/algorithms/centroid_strategies.qbk]}
 }
 
 */
@@ -379,13 +376,18 @@
 /*!
 \brief \brief_calc{centroid}
 \ingroup centroid
-\details \details_calc{centroid,geometric center (or: center of mass)}
+\details \details_calc{centroid,geometric center (or: center of mass)}. \details_default_strategy
 \tparam Geometry \tparam_geometry
 \tparam Point \tparam_point
 \param geometry \param_geometry
-\param c the calculated centroid will be assigned to this point reference
+\param c The calculated centroid will be assigned to this point reference
 
 \qbk{[include reference/algorithms/centroid.qbk]}
+\qbk{
+[heading Example]
+[centroid]
+[centroid_output]
+}
  */
 template<typename Geometry, typename Point>
 inline void centroid(Geometry const& geometry, Point& c)
@@ -419,6 +421,7 @@
 \tparam Geometry \tparam_geometry
 \param geometry \param_geometry
 \return \return_calc{centroid}
+
 \qbk{[include reference/algorithms/centroid.qbk]}
  */
 template<typename Point, typename Geometry>
@@ -444,12 +447,7 @@
 
 \qbk{distinguish,with strategy}
 \qbk{[include reference/algorithms/centroid.qbk]}
-
-\qbk{
-[heading Available Strategies]
-\* [link geometry.reference.strategies.strategy_centroid_bashein_detmer Bashein Detmer (cartesian)]
-}
-
+\qbk{[include reference/algorithms/centroid_strategies.qbk]}
  */
 template<typename Point, typename Geometry, typename Strategy>
 inline Point make_centroid(Geometry const& geometry, Strategy const& strategy)

Modified: trunk/boost/geometry/algorithms/clear.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/clear.hpp (original)
+++ trunk/boost/geometry/algorithms/clear.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -129,7 +129,10 @@
 
 /*!
 \brief Clears a linestring, linear ring or polygon (exterior+interiors) or multi*
-\details Generic function to clear a geometry
+\details Generic function to clear a geometry. All points will be removed from the collection or collections
+ making up the geometry. In most cases this is equivalent to the .clear() method of a std::vector<...>. In
+ the case of a polygon, this clear functionality is automatically called for the exterior ring, and for the
+ interior ring collection. In the case of a point, boxes and segments, nothing will happen.
 \ingroup clear
 \note points and boxes cannot be cleared, instead they can be set to zero by "assign_zero"
 */

Modified: trunk/boost/geometry/algorithms/within.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/within.hpp (original)
+++ trunk/boost/geometry/algorithms/within.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -343,6 +343,15 @@
 \return true if geometry1 is completely contained within geometry2,
     else false
 \note The default strategy is used for within detection
+
+
+\qbk{[include reference/algorithms/within.qbk]}
+
+\qbk{
+[heading Example]
+[within]
+[within_output]
+}
  */
 template<typename Geometry1, typename Geometry2>
 inline bool within(Geometry1 const& geometry1, Geometry2 const& geometry2)
@@ -388,11 +397,17 @@
     else false
 
 \qbk{distinguish,with strategy}
+\qbk{[include reference/algorithms/within.qbk]}
 \qbk{
 [heading Available Strategies]
 \* [link geometry.reference.strategies.strategy_within_winding Winding (coordinate system agnostic)]
 \* [link geometry.reference.strategies.strategy_within_franklin Franklin (cartesian)]
 \* [link geometry.reference.strategies.strategy_within_crossings_multiply Crossings Multiply (cartesian)]
+
+[heading Example]
+[within_strategy]
+[within_strategy_output]
+
 }
 */
 template<typename Geometry1, typename Geometry2, typename Strategy>

Modified: trunk/boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp (original)
+++ trunk/boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -17,7 +17,7 @@
 
 #include <boost/geometry/core/point_type.hpp>
 
-#include <boost/geometry/strategies/buffer_side.hpp>
+#include <boost/geometry/extensions/strategies/buffer_side.hpp>
 
 #include <boost/geometry/extensions/algorithms/buffer/line_line_intersection.hpp>
 #include <boost/geometry/extensions/algorithms/buffer/intersecting_inserter.hpp>

Modified: trunk/boost/geometry/extensions/algorithms/buffer/polygon_buffer.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algorithms/buffer/polygon_buffer.hpp (original)
+++ trunk/boost/geometry/extensions/algorithms/buffer/polygon_buffer.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -18,7 +18,7 @@
 
 #include <boost/geometry/core/point_type.hpp>
 
-#include <boost/geometry/strategies/buffer_side.hpp>
+#include <boost/geometry/extensions/strategies/buffer_side.hpp>
 #include <boost/geometry/extensions/algorithms/buffer/line_line_intersection.hpp>
 
 

Modified: trunk/boost/geometry/extensions/algorithms/buffer/sectionalizing_buffer.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algorithms/buffer/sectionalizing_buffer.hpp (original)
+++ trunk/boost/geometry/extensions/algorithms/buffer/sectionalizing_buffer.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -19,15 +19,15 @@
 
 #include <boost/geometry/core/point_type.hpp>
 
-#include <boost/geometry/strategies/buffer_side.hpp>
-#include <boost/geometry/algorithms/detail/buffer/intersecting_inserter.hpp>
-#include <boost/geometry/algorithms/detail/buffer/linestring_buffer.hpp>
-#include <boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp>
+#include <boost/geometry/extensions/strategies/buffer_side.hpp>
+#include <boost/geometry/extensions/algorithms/detail/buffer/intersecting_inserter.hpp>
+#include <boost/geometry/extensions/algorithms/detail/buffer/linestring_buffer.hpp>
+#include <boost/geometry/extensions/algorithms/detail/buffer/line_line_intersection.hpp>
 
 #include <boost/geometry/algorithms/detail/sections/range_by_section.hpp>
 #include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
 
-#include <boost/geometry/algorithms/dissolve.hpp>
+#include <boost/geometry/extensions/algorithms/dissolve.hpp>
 
 
 

Modified: trunk/boost/geometry/extensions/algorithms/buffer/segmenting_buffer.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algorithms/buffer/segmenting_buffer.hpp (original)
+++ trunk/boost/geometry/extensions/algorithms/buffer/segmenting_buffer.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -21,14 +21,14 @@
 #include <boost/geometry/core/point_type.hpp>
 #include <boost/geometry/core/ring_type.hpp>
 
-#include <boost/geometry/strategies/buffer_side.hpp>
-#include <boost/geometry/strategies/buffer_join_round.hpp>
+#include <boost/geometry/extensions/strategies/buffer_side.hpp>
+#include <boost/geometry/extensions/strategies/buffer_join_round.hpp>
 #include <boost/geometry/util/math.hpp>
 
 #include <boost/geometry/algorithms/detail/disjoint.hpp>
 
 
-#include <boost/geometry/algorithms/dissolve.hpp>
+#include <boost/geometry/extensions/algorithms/dissolve.hpp>
 
 
 // TEMPORARY do not use yet.

Modified: trunk/boost/geometry/extensions/algorithms/buffer/splitting_buffer.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algorithms/buffer/splitting_buffer.hpp (original)
+++ trunk/boost/geometry/extensions/algorithms/buffer/splitting_buffer.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -19,14 +19,14 @@
 
 #include <boost/geometry/core/point_type.hpp>
 
-#include <boost/geometry/strategies/buffer_side.hpp>
-#include <boost/geometry/algorithms/detail/buffer/intersecting_inserter.hpp>
-#include <boost/geometry/algorithms/detail/buffer/linestring_buffer.hpp>
-#include <boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp>
+#include <boost/geometry/extensions/strategies/buffer_side.hpp>
+#include <boost/geometry/extensions/algorithms/detail/buffer/intersecting_inserter.hpp>
+#include <boost/geometry/extensions/algorithms/detail/buffer/linestring_buffer.hpp>
+#include <boost/geometry/extensions/algorithms/detail/buffer/line_line_intersection.hpp>
 
 
-#include <boost/geometry/algorithms/detail/overlay/dissolver.hpp>
-#include <boost/geometry/algorithms/detail/overlay/split_rings.hpp>
+#include <boost/geometry/extensions/algorithms/detail/overlay/dissolver.hpp>
+#include <boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp>
 
 
 

Modified: trunk/boost/geometry/extensions/algorithms/buffer/traversing_buffer.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algorithms/buffer/traversing_buffer.hpp (original)
+++ trunk/boost/geometry/extensions/algorithms/buffer/traversing_buffer.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -19,13 +19,13 @@
 
 #include <boost/geometry/core/point_type.hpp>
 
-#include <boost/geometry/strategies/buffer_side.hpp>
+#include <boost/geometry/extensions/strategies/buffer_side.hpp>
 #include <boost/geometry/extensions/algorithms/buffer/intersecting_inserter.hpp>
 #include <boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp>
 #include <boost/geometry/extensions/algorithms/buffer/line_line_intersection.hpp>
 
 
-#include <boost/geometry/algorithms/dissolve.hpp>
+#include <boost/geometry/extensions/algorithms/dissolve.hpp>
 
 
 

Copied: trunk/boost/geometry/extensions/iterators/segment_returning_iterator.hpp (from r70600, /trunk/boost/geometry/iterators/segment_returning_iterator.hpp)
==============================================================================
--- /trunk/boost/geometry/iterators/segment_returning_iterator.hpp (original)
+++ trunk/boost/geometry/extensions/iterators/segment_returning_iterator.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -7,8 +7,8 @@
 // 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_SEGMENT_RETURNING_ITERATOR_HPP
-#define BOOST_GEOMETRY_ITERATORS_SEGMENT_RETURNING_ITERATOR_HPP
+#ifndef BOOST_GEOMETRY_EXTENSIONS_ITERATORS_SEGMENT_RETURNING_ITERATOR_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_ITERATORS_SEGMENT_RETURNING_ITERATOR_HPP
 
 // TODO: This is very experimental version of input iterator
 // reading collection of points as segments - proof of concept.
@@ -134,4 +134,4 @@
 
 }} // namespace boost::geometry
 
-#endif // BOOST_GEOMETRY_ITERATORS_SEGMENT_RETURNING_ITERATOR_HPP
+#endif // BOOST_GEOMETRY_EXTENSIONS_ITERATORS_SEGMENT_RETURNING_ITERATOR_HPP

Copied: trunk/boost/geometry/extensions/strategies/buffer.hpp (from r70600, /trunk/boost/geometry/strategies/buffer.hpp)
==============================================================================
--- /trunk/boost/geometry/strategies/buffer.hpp (original)
+++ trunk/boost/geometry/extensions/strategies/buffer.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -11,8 +11,8 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_GEOMETRY_STRATEGIES_BUFFER_HPP
-#define BOOST_GEOMETRY_STRATEGIES_BUFFER_HPP
+#ifndef BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_BUFFER_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_BUFFER_HPP
 
 
 // Buffer strategies
@@ -22,7 +22,7 @@
 #include <boost/geometry/strategies/side.hpp>
 #include <boost/geometry/util/math.hpp>
 
-#include <boost/geometry/strategies/buffer_side.hpp>
+#include <boost/geometry/extensions/strategies/buffer_side.hpp>
 
 
 #define BOOST_GEOMETRY_BUFFER_NO_HELPER_POINTS
@@ -393,4 +393,4 @@
 
 }} // namespace boost::geometry
 
-#endif // BOOST_GEOMETRY_STRATEGIES_BUFFER_HPP
+#endif // BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_BUFFER_HPP

Copied: trunk/boost/geometry/extensions/strategies/buffer_join_round.hpp (from r70600, /trunk/boost/geometry/strategies/buffer_join_round.hpp)
==============================================================================
--- /trunk/boost/geometry/strategies/buffer_join_round.hpp (original)
+++ trunk/boost/geometry/extensions/strategies/buffer_join_round.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -11,8 +11,8 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_GEOMETRY_STRATEGIES_BUFFER_JOIN_ROUND_HPP
-#define BOOST_GEOMETRY_STRATEGIES_BUFFER_JOIN_ROUND_HPP
+#ifndef BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_BUFFER_JOIN_ROUND_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_BUFFER_JOIN_ROUND_HPP
 
 
 
@@ -24,7 +24,7 @@
 #include <boost/geometry/strategies/side.hpp>
 #include <boost/geometry/util/math.hpp>
 
-#include <boost/geometry/strategies/buffer_side.hpp>
+#include <boost/geometry/extensions/strategies/buffer_side.hpp>
 
 
 #define BOOST_GEOMETRY_BUFFER_NO_HELPER_POINTS
@@ -173,4 +173,4 @@
 
 }} // namespace boost::geometry
 
-#endif // BOOST_GEOMETRY_STRATEGIES_BUFFER_JOIN_ROUND_HPP
+#endif // BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_BUFFER_JOIN_ROUND_HPP

Copied: trunk/boost/geometry/extensions/strategies/buffer_side.hpp (from r70600, /trunk/boost/geometry/strategies/buffer_side.hpp)
==============================================================================
--- /trunk/boost/geometry/strategies/buffer_side.hpp (original)
+++ trunk/boost/geometry/extensions/strategies/buffer_side.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -11,8 +11,8 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_GEOMETRY_STRATEGIES_BUFFER_SIDE_HPP
-#define BOOST_GEOMETRY_STRATEGIES_BUFFER_SIDE_HPP
+#ifndef BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_BUFFER_SIDE_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_BUFFER_SIDE_HPP
 
 
 
@@ -28,4 +28,4 @@
 
 }} // namespace boost::geometry
 
-#endif // BOOST_GEOMETRY_STRATEGIES_BUFFER_SIDE_HPP
+#endif // BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_BUFFER_SIDE_HPP

Copied: trunk/boost/geometry/extensions/strategies/parse.hpp (from r70600, /trunk/boost/geometry/strategies/parse.hpp)
==============================================================================
--- /trunk/boost/geometry/strategies/parse.hpp (original)
+++ trunk/boost/geometry/extensions/strategies/parse.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -11,8 +11,8 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#ifndef BOOST_GEOMETRY_STRATEGIES_PARSE_HPP
-#define BOOST_GEOMETRY_STRATEGIES_PARSE_HPP
+#ifndef BOOST_GEOMETRY_STRATEGIES_EXTENSIONS_PARSE_HPP
+#define BOOST_GEOMETRY_STRATEGIES_EXTENSIONS_PARSE_HPP
 
 #include <boost/geometry/strategies/tags.hpp>
 
@@ -38,4 +38,4 @@
 
 }} // namespace boost::geometry
 
-#endif // BOOST_GEOMETRY_STRATEGIES_PARSE_HPP
+#endif // BOOST_GEOMETRY_STRATEGIES_EXTENSIONS_PARSE_HPP

Deleted: trunk/boost/geometry/iterators/segment_returning_iterator.hpp
==============================================================================
--- trunk/boost/geometry/iterators/segment_returning_iterator.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
+++ (empty file)
@@ -1,137 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-// Copyright (c) 2009-2011 Barend Gehrels, 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_SEGMENT_RETURNING_ITERATOR_HPP
-#define BOOST_GEOMETRY_ITERATORS_SEGMENT_RETURNING_ITERATOR_HPP
-
-// TODO: This is very experimental version of input iterator
-// reading collection of points as segments - proof of concept.
-// --mloskot
-
-// TODO: Move to boost::iterator_adaptor
-
-#include <iterator>
-
-#include <boost/assert.hpp>
-#include <boost/iterator.hpp>
-#include <boost/iterator/iterator_adaptor.hpp>
-#include <boost/iterator/iterator_categories.hpp>
-
-#include <boost/geometry/algorithms/equals.hpp>
-#include <boost/geometry/geometries/segment.hpp>
-
-namespace boost { namespace geometry
-{
-
-template <typename Base, typename Point>
-struct segment_returning_iterator
-{
- typedef Base base_type;
- typedef Point point_type;
- typedef typename model::referring_segment<Point> segment_type;
-
- typedef std::input_iterator_tag iterator_category;
- typedef typename std::iterator_traits<Base>::difference_type difference_type;
- typedef segment_type value_type;
- typedef segment_type* pointer;
- typedef segment_type& reference;
-
- explicit segment_returning_iterator(Base const& end)
- : m_segment(p1 , p2)
- , m_prev(end)
- , m_it(end)
- , m_end(end)
- {
- }
-
- segment_returning_iterator(Base const& it, Base const& end)
- : m_segment(p1 , p2)
- , m_prev(it)
- , m_it(it)
- , m_end(end)
- {
- if (m_it != m_end)
- {
- BOOST_ASSERT(m_prev != m_end);
- ++m_it;
- }
- }
-
- reference operator*()
- {
- BOOST_ASSERT(m_it != m_end && m_prev != m_end);
-
- p1 = *m_prev;
- p2 = *m_it;
-
- return m_segment;
- }
-
- pointer operator->()
- {
- return &(operator*());
- }
-
- segment_returning_iterator& operator++()
- {
- ++m_prev;
- ++m_it;
- return *this;
- }
-
- segment_returning_iterator operator++(int)
- {
- segment_returning_iterator it(*this);
- ++(*this);
- return it;
- }
-
- Base const& base() const { return m_it; }
-
-private:
-
- point_type p1;
- point_type p2;
- segment_type m_segment;
-
- Base m_prev;
- Base m_it;
- Base m_end;
-};
-
-template <typename Base, typename Point>
-bool operator==(segment_returning_iterator<Base, Point> const& lhs,
- segment_returning_iterator<Base, Point> const& rhs)
-{
- return (lhs.base() == rhs.base());
-}
-
-template <typename Base, typename Point>
-bool operator!=(segment_returning_iterator<Base, Point> const& lhs,
- segment_returning_iterator<Base, Point> const& rhs)
-{
- return (lhs.base() != rhs.base());
-}
-
-template <typename C>
-inline segment_returning_iterator
-<
- typename C::iterator,
- typename C::value_type
->
-make_segment_returning_iterator(C& c)
-{
- typedef typename C::iterator base_iterator;
- typedef typename C::value_type point_type;
- return segment_returning_iterator<base_iterator, point_type>(c.begin(), c.end());
-}
-
-}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_ITERATORS_SEGMENT_RETURNING_ITERATOR_HPP

Deleted: trunk/boost/geometry/strategies/buffer.hpp
==============================================================================
--- trunk/boost/geometry/strategies/buffer.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
+++ (empty file)
@@ -1,396 +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_STRATEGIES_BUFFER_HPP
-#define BOOST_GEOMETRY_STRATEGIES_BUFFER_HPP
-
-
-// Buffer strategies
-
-#include <boost/geometry/core/cs.hpp>
-#include <boost/geometry/strategies/tags.hpp>
-#include <boost/geometry/strategies/side.hpp>
-#include <boost/geometry/util/math.hpp>
-
-#include <boost/geometry/strategies/buffer_side.hpp>
-
-
-#define BOOST_GEOMETRY_BUFFER_NO_HELPER_POINTS
-
-
-namespace boost { namespace geometry
-{
-
-
-
-
-namespace strategy { namespace buffer
-{
-
-
-
-/*
-
- A Buffer-join strategy gets 4 input points.
- On the two consecutive segments s1 and s2 (joining at vertex v):
-
- The lines from parallel at s1, s2 (at buffer-distance) end/start
- in two points perpendicular to the segments: p1 and p2.
- These parallel lines interesct in point ip
-
- (s2)
- |
- |
- ^
- |
- (p2) |(v)
- * +----<--- (s1)
-
- x(ip) *(p1)
-
-
- So, in clockwise order:
- v : vertex point
- p1: perpendicular on left side of segment1<1> (perp1)
- ip: intersection point
- p2: perpendicular on left side of segment2<0> (perp2)
-*/
-
-
-#ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
-template
-<
- typename PointIn, typename Mapper
->
-struct join_mapper
-{
- Mapper const& m_mapper;
- join_mapper(Mapper const& mapper)
- : m_mapper(mapper)
- {}
-
- template <typename Ring>
- inline void map(PointIn const& ip, PointIn const& vertex,
- PointIn const& perp1, PointIn const& perp2) const
- {
- Ring corner;
- corner.push_back(vertex);
- corner.push_back(perp1);
- corner.push_back(ip);
- corner.push_back(perp2);
- corner.push_back(vertex);
-
- const_cast<Mapper&>(m_mapper).map(corner,
- "opacity:0.4;fill:rgb(255,0,0);stroke:rgb(0,0,0);stroke-width:1");
- }
-};
-#endif
-
-
-
-#ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
-// Forget this, it will go
-template<typename PointIn, typename PointOut, typename Mapper>
-struct join_miter : public join_mapper<PointIn, Mapper>
-{
- join_miter(Mapper const& mapper) : join_mapper(mapper) {}
-#else
-
-
-template
-<
- typename PointIn,
- typename PointOut
->
-struct join_miter
-{
-
-#endif
- typedef typename strategy_side<typename cs_tag<PointIn>::type>::type side;
- typedef typename coordinate_type<PointIn>::type coordinate_type;
-
-
- template <typename Ring>
- inline void apply(PointIn const& ip, PointIn const& vertex,
- PointIn const& perp1, PointIn const& perp2,
- coordinate_type const& buffer_distance,
- Ring& buffered) const
- {
- coordinate_type zero = 0;
- int signum = buffer_distance > zero
- ? 1
- : buffer_distance < zero
- ? -1
- : 0;
-
- if (side::apply(perp1, ip, perp2) == signum)
- {
-
-#ifdef BOOST_GEOMETRY_BUFFER_NO_HELPER_POINTS
- // Because perp1 crosses perp2 at IP, it is not necessary to
- // include IP
- buffered.push_back(ip);
-#else
- // If it is concave (corner to left), add helperline
- // The helper-line IS essential for buffering holes. Without,
- // holes might be generated, while they should NOT be there.
- // DOES NOT WORK ALWAYS buffered.push_back(ip);
- // We might consider to make it optional (because more efficient)
- buffered.push_back(perp1);
- buffered.push_back(perp2);
-#endif
- }
- else
- {
- PointIn p = ip;
-
- // Normalize it and give it X*dist.
- coordinate_type dx = get<0>(ip) - get<0>(vertex);
- coordinate_type dy = get<1>(ip) - get<1>(vertex);
-
- coordinate_type length = sqrt(dx * dx + dy * dy);
-
- // TODO: make max-mitre-limit flexible
- coordinate_type ten = 10.0;
- coordinate_type zero_seven = 0.7;
-
- coordinate_type max = ten * geometry::math::abs(buffer_distance);
-
- if (length > max)
- {
-
- coordinate_type prop = zero_seven * buffer_distance;
- prop /= length;
- set<0>(p, get<0>(vertex) + dx * prop);
- set<1>(p, get<1>(vertex) + dy * prop);
-
-#ifdef BOOST_GEOMETRY_DEBUG_BUFFER
- std::cout << length << std::endl;
-#endif
- }
-
- buffered.push_back(p);
-
-#ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
- map<Ring>(ip, vertex, perp1, perp2);
-#endif
- }
-
-
- }
-};
-
-
-#ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
-// Forget this, it will go
-template<typename PointIn, typename PointOut, typename Mapper>
-struct join_bevel : public join_mapper<PointIn, Mapper>
-{
- join_bevel(Mapper const& mapper) : join_mapper(mapper) {}
-#else
-
-
-template
-<
- typename PointIn,
- typename PointOut
->
-struct join_bevel
-{
-#endif
-
-
- typedef typename coordinate_type<PointIn>::type coordinate_type;
-
- template <typename Ring>
- inline void apply(PointIn const& ip, PointIn const& vertex,
- PointIn const& perp1, PointIn const& perp2,
- coordinate_type const& buffer_distance,
- Ring& buffered) const
- {
- buffered.push_back(perp1);
- buffered.push_back(perp2);
-
-#ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
- map<Ring>(ip, vertex, perp1, perp2);
-#endif
- }
-};
-
-
-#ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
-// Forget this, it will go
-template<typename PointIn, typename PointOut, typename Mapper>
-struct join_round : public join_mapper<PointIn, Mapper>
-{
- join_round(Mapper const& mapper, int max_level = 4)
- : join_mapper(mapper)
- , m_max_level(max_level)
- {}
-#else
-
-
-template
-<
- typename PointIn,
- typename PointOut
->
-struct join_round
-{
- inline join_round(int max_level = 4)
- : m_max_level(max_level)
- {}
-#endif
-
- typedef typename strategy_side<typename cs_tag<PointIn>::type>::type side;
- typedef typename coordinate_type<PointOut>::type coordinate_type;
- int m_max_level;
-
-
- template <typename Ring>
- inline void mid_points(PointIn const& vertex,
- PointIn const& p1, PointIn const& p2,
- coordinate_type const& buffer_distance,
- Ring& buffered,
- int level = 1) const
- {
- // Generate 'vectors'
- coordinate_type vp1_x = get<0>(p1) - get<0>(vertex);
- coordinate_type vp1_y = get<1>(p1) - get<1>(vertex);
-
- coordinate_type vp2_x = (get<0>(p2) - get<0>(vertex));
- coordinate_type vp2_y = (get<1>(p2) - get<1>(vertex));
-
- // Average them to generate vector in between
- coordinate_type two = 2;
- coordinate_type v_x = (vp1_x + vp2_x) / two;
- coordinate_type v_y = (vp1_y + vp2_y) / two;
-
- coordinate_type length2 = sqrt(v_x * v_x + v_y * v_y);
-
- coordinate_type prop = buffer_distance / length2;
-
- PointIn mid_point;
- set<0>(mid_point, get<0>(vertex) + v_x * prop);
- set<1>(mid_point, get<1>(vertex) + v_y * prop);
-
- if (level < m_max_level)
- {
- mid_points(vertex, p1, mid_point, buffer_distance, buffered, level + 1);
- }
- buffered.push_back(mid_point);
- if (level < m_max_level)
- {
- mid_points(vertex, mid_point, p2, buffer_distance, buffered, level + 1);
- }
-
- }
-
-
- template <typename Ring>
- inline void apply(PointIn const& ip, PointIn const& vertex,
- PointIn const& perp1, PointIn const& perp2,
- coordinate_type const& buffer_distance,
- Ring& buffered) const
- {
- coordinate_type zero = 0;
- int signum = buffer_distance > zero
- ? 1
- : buffer_distance < zero
- ? -1
- : 0;
-
- if (side::apply(perp1, ip, perp2) == signum)
- {
-#ifdef BOOST_GEOMETRY_BUFFER_NO_HELPER_POINTS
- buffered.push_back(ip);
-#else
- // If it is concave (corner to left), add helperline
- buffered.push_back(perp1);
- buffered.push_back(perp2);
-#endif
- }
- else
- {
- // Generate 'vectors'
- coordinate_type vix = (get<0>(ip) - get<0>(vertex));
- coordinate_type viy = (get<1>(ip) - get<1>(vertex));
-
- coordinate_type length_i = sqrt(vix * vix + viy * viy);
-
-
- coordinate_type const bd = geometry::math::abs(buffer_distance);
- coordinate_type prop = bd / length_i;
-
- PointIn bp;
- set<0>(bp, get<0>(vertex) + vix * prop);
- set<1>(bp, get<1>(vertex) + viy * prop);
-
- if (m_max_level <= 1)
- {
- buffered.push_back(perp1);
- if (m_max_level == 1)
- {
- buffered.push_back(bp);
- }
- buffered.push_back(perp2);
- }
- else
- {
- buffered.push_back(perp1);
- mid_points(vertex, perp1, bp, bd, buffered);
- mid_points(vertex, bp, perp2, bd, buffered);
- buffered.push_back(perp2);
- }
-
-#ifdef BOOST_GEOMETRY_DEBUG_WITH_MAPPER
- map<Ring>(bp, vertex, perp1, perp2);
-#endif
- }
- }
-};
-
-
-
-template
-<
- typename CoordinateType
->
-class distance_assymetric
-{
-public :
- distance_assymetric(CoordinateType const& left,
- CoordinateType const& right)
- : m_left(left)
- , m_right(right)
- {}
-
- template <typename Point>
- inline CoordinateType apply(Point const& , Point const& ,
- buffer_side_selector side) const
- {
- return side == buffer_side_left ? m_left : m_right;
- }
-
-private :
- CoordinateType m_left;
- CoordinateType m_right;
-};
-
-
-}} // namespace strategy::buffer
-
-
-}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_STRATEGIES_BUFFER_HPP

Deleted: trunk/boost/geometry/strategies/buffer_join_round.hpp
==============================================================================
--- trunk/boost/geometry/strategies/buffer_join_round.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
+++ (empty file)
@@ -1,176 +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_STRATEGIES_BUFFER_JOIN_ROUND_HPP
-#define BOOST_GEOMETRY_STRATEGIES_BUFFER_JOIN_ROUND_HPP
-
-
-
-#include <boost/geometry/algorithms/convert.hpp>
-#include <boost/geometry/arithmetic/arithmetic.hpp>
-#include <boost/geometry/arithmetic/dot_product.hpp>
-#include <boost/geometry/core/cs.hpp>
-#include <boost/geometry/strategies/tags.hpp>
-#include <boost/geometry/strategies/side.hpp>
-#include <boost/geometry/util/math.hpp>
-
-#include <boost/geometry/strategies/buffer_side.hpp>
-
-
-#define BOOST_GEOMETRY_BUFFER_NO_HELPER_POINTS
-
-
-namespace boost { namespace geometry
-{
-
-
-
-
-namespace strategy { namespace buffer
-{
-
-
-
-
-template<typename PointOut>
-struct join_round2
-{
- typedef PointOut vector_type;
-
- template <typename Vector, typename Point1, typename Point2>
- static inline Vector create_vector(Point1 const& p1, Point2 const& p2)
- {
- Vector v;
- geometry::convert(p1, v);
- subtract_point(v, p2);
- return v;
- }
-
- inline join_round2(int max_level = 4)
- : m_max_level(max_level)
- {}
-
- typedef typename coordinate_type<PointOut>::type coordinate_type;
- int m_max_level;
-
-
- template <typename OutputIterator, typename Point, typename PointP, typename Point1, typename Point2>
- inline void mid_points(Point const& vertex, PointP const& perpendicular,
- Point1 const& p1, Point2 const& p2,
- coordinate_type const& buffer_distance,
- coordinate_type const& max_distance,
- OutputIterator out,
- int level = 1) const
- {
- // Generate 'vectors'
- coordinate_type vp1_x = get<0>(p1) - get<0>(vertex);
- coordinate_type vp1_y = get<1>(p1) - get<1>(vertex);
-
- coordinate_type vp2_x = (get<0>(p2) - get<0>(vertex));
- coordinate_type vp2_y = (get<1>(p2) - get<1>(vertex));
-
- // Average them to generate vector in between
- coordinate_type two = 2;
- coordinate_type v_x = (vp1_x + vp2_x) / two;
- coordinate_type v_y = (vp1_y + vp2_y) / two;
-
- coordinate_type between_length = sqrt(v_x * v_x + v_y * v_y);
-
- coordinate_type const positive_buffer_distance = geometry::math::abs(buffer_distance);
- coordinate_type prop = positive_buffer_distance / between_length;
-
- PointOut mid_point;
- set<0>(mid_point, get<0>(vertex) + v_x * prop);
- set<1>(mid_point, get<1>(vertex) + v_y * prop);
-
- if (buffer_distance > max_distance)
- {
- // Calculate point projected on original perpendicular segment,
- // using vector maths
- vector_type v = create_vector<vector_type>(perpendicular, vertex);
- vector_type w = create_vector<vector_type>(mid_point, vertex);
-
- coordinate_type c1 = dot_product(w, v);
- if (c1 > 0)
- {
- coordinate_type c2 = dot_product(v, v);
- if (c2 > c1)
- {
- coordinate_type b = c1 / c2;
-
- PointOut projected_point;
-
- multiply_value(v, b);
- geometry::convert(vertex, projected_point);
- add_point(projected_point, v);
-
- coordinate_type projected_distance = geometry::distance(projected_point, mid_point);
-
- if (projected_distance > max_distance)
- {
- // Do not generate from here on.
- return;
- }
- }
- }
- }
-
- if (level < m_max_level)
- {
- mid_points(vertex, perpendicular, p1, mid_point, positive_buffer_distance, max_distance, out, level + 1);
- }
- *out++ = mid_point;
- if (level < m_max_level)
- {
- mid_points(vertex, perpendicular, mid_point, p2, positive_buffer_distance, max_distance, out, level + 1);
- }
- }
-
-
- template <typename OutputIterator, typename Point, typename Point2>
- inline OutputIterator apply(Point const& vertex,
- Point2 const& perpendicular,
- Point2 const& p1, Point2 const& p2,
- coordinate_type const& buffer_distance,
- coordinate_type const& max_distance,
- OutputIterator out) const
- {
- mid_points(vertex, perpendicular, p1, p2, buffer_distance, max_distance, out);
- return out;
- }
-};
-
-
-template<typename PointOut>
-struct join_none
-{
- template <typename OutputIterator, typename Point, typename Point2,
- typename DistanceType>
- inline OutputIterator apply(Point const& ,
- Point2 const& ,
- Point2 const& , Point2 const& ,
- DistanceType const& ,
- DistanceType const& ,
- OutputIterator out) const
- {
- return out;
- }
-};
-
-
-}} // namespace strategy::buffer
-
-
-}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_STRATEGIES_BUFFER_JOIN_ROUND_HPP

Deleted: trunk/boost/geometry/strategies/buffer_side.hpp
==============================================================================
--- trunk/boost/geometry/strategies/buffer_side.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
+++ (empty file)
@@ -1,31 +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_STRATEGIES_BUFFER_SIDE_HPP
-#define BOOST_GEOMETRY_STRATEGIES_BUFFER_SIDE_HPP
-
-
-
-namespace boost { namespace geometry
-{
-
-
-// TODO: consider if this enum can be placed in another headerfile
-// or probably there will be more enum's or constants for the buffer
-enum buffer_side_selector { buffer_side_left, buffer_side_right };
-
-
-
-}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_STRATEGIES_BUFFER_SIDE_HPP

Deleted: trunk/boost/geometry/strategies/parse.hpp
==============================================================================
--- trunk/boost/geometry/strategies/parse.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
+++ (empty file)
@@ -1,41 +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_STRATEGIES_PARSE_HPP
-#define BOOST_GEOMETRY_STRATEGIES_PARSE_HPP
-
-#include <boost/geometry/strategies/tags.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-
-
-/*!
- \brief Tagraits class binding a parsing strategy to a coordinate system
- \ingroup parse
- \tparam Tag tag of coordinate system of point-type
- \tparam CoordinateSystem coordinate system
-*/
-template <typename Tag, typename CoordinateSystem>
-struct strategy_parse
-{
- typedef strategy::not_implemented type;
-};
-
-
-
-}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_STRATEGIES_PARSE_HPP

Modified: trunk/boost/geometry/strategies/strategies.hpp
==============================================================================
--- trunk/boost/geometry/strategies/strategies.hpp (original)
+++ trunk/boost/geometry/strategies/strategies.hpp 2011-03-29 17:17:41 EDT (Tue, 29 Mar 2011)
@@ -23,7 +23,6 @@
 #include <boost/geometry/strategies/convex_hull.hpp>
 #include <boost/geometry/strategies/distance.hpp>
 #include <boost/geometry/strategies/intersection.hpp>
-#include <boost/geometry/strategies/parse.hpp>
 #include <boost/geometry/strategies/side.hpp>
 #include <boost/geometry/strategies/transform.hpp>
 #include <boost/geometry/strategies/within.hpp>


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