Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76991 - in branches/release: boost/geometry boost/geometry/algorithms boost/geometry/algorithms/detail boost/geometry/algorithms/detail/overlay boost/geometry/arithmetic boost/geometry/core boost/geometry/geometries boost/geometry/io boost/geometry/io/dsv boost/geometry/io/wkt boost/geometry/iterators boost/geometry/multi boost/geometry/multi/algorithms boost/geometry/policies boost/geometry/strategies boost/geometry/util boost/geometry/views libs/geometry/doc libs/geometry/doc/concept libs/geometry/doc/doxy libs/geometry/doc/doxy/doxygen_input/groups libs/geometry/doc/generated libs/geometry/doc/html libs/geometry/doc/reference libs/geometry/doc/reference/algorithms libs/geometry/doc/src libs/geometry/example libs/geometry/example/with_external_libs libs/geometry/example/with_external_libs/contrib/gd-2.0.35 libs/geometry/example/with_external_libs/contrib/soci-3.0.0 libs/geometry/example/with_external_libs/contrib/soci-3.1.0 libs/geometry/test libs/geometry/test/algorithms libs/geometry/test/algorithms/overlay libs/geometry/test/multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2012-02-12 08:04:07


Author: barendgehrels
Date: 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
New Revision: 76991
URL: http://svn.boost.org/trac/boost/changeset/76991

Log:
Boost.Geometry merged fixes/doc updates to release branch
Added:
   branches/release/boost/geometry/io/wkt/stream.hpp
      - copied unchanged from r76989, /trunk/boost/geometry/io/wkt/stream.hpp
   branches/release/libs/geometry/doc/reference/algorithms/covered_by.qbk
      - copied unchanged from r76989, /trunk/libs/geometry/doc/reference/algorithms/covered_by.qbk
   branches/release/libs/geometry/doc/reference/algorithms/difference_behavior.qbk
      - copied unchanged from r76989, /trunk/libs/geometry/doc/reference/algorithms/difference_behavior.qbk
   branches/release/libs/geometry/doc/reference/algorithms/geometry_rules.qbk
      - copied unchanged from r76989, /trunk/libs/geometry/doc/reference/algorithms/geometry_rules.qbk
   branches/release/libs/geometry/example/with_external_libs/contrib/soci-3.1.0/
      - copied from r76989, /trunk/libs/geometry/example/with_external_libs/contrib/soci-3.1.0/
   branches/release/libs/geometry/example/with_external_libs/contrib/soci-3.1.0/boost_geometry_readme.txt
      - copied unchanged from r76989, /trunk/libs/geometry/example/with_external_libs/contrib/soci-3.1.0/boost_geometry_readme.txt
Removed:
   branches/release/boost/geometry/arithmetic/cross_product.hpp
   branches/release/boost/geometry/io/wkt/iomanip.hpp
   branches/release/libs/geometry/doc/reference/algorithms/overlay_behavior.qbk
   branches/release/libs/geometry/example/with_external_libs/contrib/soci-3.0.0/
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/geometries/ (props changed)
   branches/release/boost/geometry/geometry.hpp (contents, props changed)
   branches/release/boost/geometry/io/ (props changed)
   branches/release/boost/geometry/io/dsv/ (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/strategies/ (props changed)
   branches/release/boost/geometry/util/ (props changed)
   branches/release/boost/geometry/views/ (props changed)
   branches/release/libs/geometry/doc/ (props changed)
   branches/release/libs/geometry/doc/Jamfile.v2 (props changed)
   branches/release/libs/geometry/doc/about_documentation.qbk (props changed)
   branches/release/libs/geometry/doc/acknowledgments.qbk (props changed)
   branches/release/libs/geometry/doc/concept/ (props changed)
   branches/release/libs/geometry/doc/copyright_note_policy.txt (props changed)
   branches/release/libs/geometry/doc/design_rationale.qbk (props changed)
   branches/release/libs/geometry/doc/doxy/ (props changed)
   branches/release/libs/geometry/doc/generated/ (props changed)
   branches/release/libs/geometry/doc/geometry.qbk (contents, props changed)
   branches/release/libs/geometry/doc/html/ (props changed)
   branches/release/libs/geometry/doc/imports.qbk (props changed)
   branches/release/libs/geometry/doc/introduction.qbk (contents, props changed)
   branches/release/libs/geometry/doc/make_qbk.py (contents, props changed)
   branches/release/libs/geometry/doc/matrix.qbk (props changed)
   branches/release/libs/geometry/doc/quickref.xml (contents, props changed)
   branches/release/libs/geometry/doc/quickstart.qbk (props changed)
   branches/release/libs/geometry/doc/readme.txt (contents, props changed)
   branches/release/libs/geometry/doc/reference/ (props changed)
   branches/release/libs/geometry/doc/reference.qbk (contents, props changed)
   branches/release/libs/geometry/doc/release_notes.qbk (props changed)
   branches/release/libs/geometry/doc/src/ (props changed)
   branches/release/libs/geometry/example/ (props changed)
   branches/release/libs/geometry/test/ (props changed)
Text files modified:
   branches/release/boost/geometry/algorithms/area.hpp | 6 +-
   branches/release/boost/geometry/algorithms/covered_by.hpp | 21 ++++----
   branches/release/boost/geometry/algorithms/detail/overlay/follow.hpp | 94 ++++++++++++++++++++++++++++++++-------
   branches/release/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp | 13 +++++
   branches/release/boost/geometry/algorithms/detail/throw_on_empty_input.hpp | 10 ++++
   branches/release/boost/geometry/algorithms/length.hpp | 6 +-
   branches/release/boost/geometry/algorithms/perimeter.hpp | 6 +-
   branches/release/boost/geometry/algorithms/within.hpp | 10 +--
   branches/release/boost/geometry/geometry.hpp | 6 ++
   branches/release/boost/geometry/io/wkt/wkt.hpp | 4
   branches/release/boost/geometry/multi/algorithms/centroid.hpp | 4
   branches/release/boost/geometry/multi/algorithms/intersection.hpp | 1
   branches/release/libs/geometry/doc/concept/multi_polygon.qbk | 13 +++++
   branches/release/libs/geometry/doc/concept/polygon.qbk | 32 +++++++++++++
   branches/release/libs/geometry/doc/concept/ring.qbk | 7 ++
   branches/release/libs/geometry/doc/doxy/doxygen_input/groups/groups.hpp | 1
   branches/release/libs/geometry/doc/geometry.qbk | 2
   branches/release/libs/geometry/doc/html/index.html | 22 +++++----
   branches/release/libs/geometry/doc/introduction.qbk | 38 +++++++++------
   branches/release/libs/geometry/doc/make_qbk.py | 4
   branches/release/libs/geometry/doc/quickref.xml | 1
   branches/release/libs/geometry/doc/readme.txt | 12 +++++
   branches/release/libs/geometry/doc/reference.qbk | 4 +
   branches/release/libs/geometry/doc/reference/algorithms/convert.qbk | 4
   branches/release/libs/geometry/doc/reference/algorithms/difference.qbk | 4 +
   branches/release/libs/geometry/doc/reference/algorithms/difference_inserter.qbk | 4 +
   branches/release/libs/geometry/doc/reference/algorithms/intersection.qbk | 4 +
   branches/release/libs/geometry/doc/reference/algorithms/sym_difference.qbk | 8 --
   branches/release/libs/geometry/doc/reference/algorithms/union.qbk | 3 +
   branches/release/libs/geometry/doc/reference/algorithms/within.qbk | 7 ++
   branches/release/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp | 4 +
   branches/release/libs/geometry/example/with_external_libs/contrib/gd-2.0.35/boost_geometry_readme.txt | 6 +
   branches/release/libs/geometry/example/with_external_libs/soci.vsprops | 4
   branches/release/libs/geometry/example/with_external_libs/x02_gd_example.cpp | 8 +--
   branches/release/libs/geometry/example/with_external_libs/x02_gd_example.vcproj | 4 +
   branches/release/libs/geometry/example/with_external_libs/x03_a_soci_example.cpp | 1
   branches/release/libs/geometry/example/with_external_libs/x03_a_soci_example.vcproj | 20 ++++++++
   branches/release/libs/geometry/example/with_external_libs/x03_b_soci_example.vcproj | 20 ++++++++
   branches/release/libs/geometry/example/with_external_libs/x03_c_soci_example.vcproj | 20 ++++++++
   branches/release/libs/geometry/example/with_external_libs/x03_d_soci_example.cpp | 9 ++-
   branches/release/libs/geometry/example/with_external_libs/x03_d_soci_example.vcproj | 20 ++++++++
   branches/release/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper.cpp | 6 +-
   branches/release/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp | 2
   branches/release/libs/geometry/example/with_external_libs/x06_qt_world_mapper.cpp | 6 +
   branches/release/libs/geometry/test/algorithms/area.cpp | 2
   branches/release/libs/geometry/test/algorithms/difference.cpp | 11 +++-
   branches/release/libs/geometry/test/algorithms/length.cpp | 2
   branches/release/libs/geometry/test/algorithms/overlay/overlay_cases.hpp | 7 ++
   branches/release/libs/geometry/test/algorithms/perimeter.cpp | 2
   branches/release/libs/geometry/test/algorithms/test_difference.hpp | 3
   branches/release/libs/geometry/test/algorithms/union.cpp | 14 +++++
   branches/release/libs/geometry/test/multi/algorithms/multi_difference.cpp | 12 ++++
   52 files changed, 414 insertions(+), 120 deletions(-)

Modified: branches/release/boost/geometry/algorithms/area.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/area.hpp (original)
+++ branches/release/boost/geometry/algorithms/area.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -29,7 +29,7 @@
 
 #include <boost/geometry/algorithms/detail/calculate_null.hpp>
 #include <boost/geometry/algorithms/detail/calculate_sum.hpp>
-#include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp>
+// #include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp>
 
 #include <boost/geometry/strategies/area.hpp>
 #include <boost/geometry/strategies/default_area_result.hpp>
@@ -241,7 +241,7 @@
             point_type
>::type strategy_type;
 
- detail::throw_on_empty_input(geometry);
+ // detail::throw_on_empty_input(geometry);
         
     return dispatch::area
         <
@@ -279,7 +279,7 @@
 {
     concept::check<Geometry const>();
 
- detail::throw_on_empty_input(geometry);
+ // detail::throw_on_empty_input(geometry);
     
     return dispatch::area
         <

Modified: branches/release/boost/geometry/algorithms/covered_by.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/covered_by.hpp (original)
+++ branches/release/boost/geometry/algorithms/covered_by.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -68,7 +68,7 @@
 struct covered_by<Point, Ring, point_tag, ring_tag>
 {
     template <typename Strategy>
- static inline bool apply(Point const& point, Ring const& ring, Strategy const& )
+ static inline bool apply(Point const& point, Ring const& ring, Strategy const& strategy)
     {
         return detail::within::point_in_ring
             <
@@ -77,7 +77,7 @@
                 order_as_direction<geometry::point_order<Ring>::value>::value,
                 geometry::closure<Ring>::value,
                 Strategy
- >::apply(point, ring) >= 0;
+ >::apply(point, ring, strategy) >= 0;
     }
 };
 
@@ -108,14 +108,14 @@
 \details \details_check12{covered_by, is inside or on border}.
 \tparam Geometry1 \tparam_geometry
 \tparam Geometry2 \tparam_geometry
-\param geometry1 \param_geometry
-\param geometry2 \param_geometry
-\param geometry1 geometry which might be covered_by the second geometry
-\param geometry2 geometry which might contain the first geometry
-\return true if geometry1 is completely contained covered_by geometry2,
+\param geometry1 \param_geometry which might be inside or on the border of the second geometry
+\param geometry2 \param_geometry which might cover the first geometry
+\return true if geometry1 is inside of or on the border of geometry2,
     else false
 \note The default strategy is used for covered_by detection
 
+\qbk{[include reference/algorithms/covered_by.qbk]}
+
  */
 template<typename Geometry1, typename Geometry2>
 inline bool covered_by(Geometry1 const& geometry1, Geometry2 const& geometry2)
@@ -158,15 +158,14 @@
 \details \details_check12{covered_by, is inside or on border}, \brief_strategy. \details_strategy_reasons
 \tparam Geometry1 \tparam_geometry
 \tparam Geometry2 \tparam_geometry
-\param geometry1 \param_geometry
-\param geometry2 \param_geometry
-\param geometry1 \param_geometry geometry which might be covered_by the second geometry
-\param geometry2 \param_geometry which might contain the first geometry
+\param geometry1 \param_geometry which might be inside or on the border of the second geometry
+\param geometry2 \param_geometry which might cover the first geometry
 \param strategy strategy to be used
 \return true if geometry1 is inside of or on the border of geometry2,
     else false
 
 \qbk{distinguish,with strategy}
+\qbk{[include reference/algorithms/covered_by.qbk]}
 
 */
 template<typename Geometry1, typename Geometry2, typename Strategy>

Modified: branches/release/boost/geometry/algorithms/detail/overlay/follow.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/follow.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/follow.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -14,11 +14,12 @@
 #include <boost/range.hpp>
 #include <boost/mpl/assert.hpp>
 
+#include <boost/geometry/algorithms/detail/point_on_border.hpp>
 #include <boost/geometry/algorithms/detail/overlay/append_no_duplicates.hpp>
 #include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
 #include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
 
-#include <boost/geometry/algorithms/within.hpp>
+#include <boost/geometry/algorithms/covered_by.hpp>
 
 
 namespace boost { namespace geometry
@@ -50,6 +51,29 @@
     typename LineString,
     typename Polygon
>
+static inline bool last_covered_by(Turn const& turn, Operation const& op,
+ LineString const& linestring, Polygon const& polygon)
+{
+ // Check any point between the this one and the first IP
+ typedef typename geometry::point_type<LineString>::type point_type;
+ point_type point_in_between;
+ detail::point_on_border::midpoint_helper
+ <
+ point_type,
+ 0, dimension<point_type>::value
+ >::apply(point_in_between, linestring[op.seg_id.segment_index], turn.point);
+
+ return geometry::covered_by(point_in_between, polygon);
+}
+
+
+template
+<
+ typename Turn,
+ typename Operation,
+ typename LineString,
+ typename Polygon
+>
 static inline bool is_leaving(Turn const& turn, Operation const& op,
                 bool entered, bool first,
                 LineString const& linestring, Polygon const& polygon)
@@ -58,7 +82,7 @@
     {
         return entered
             || turn.method == method_crosses
- || (first && geometry::within(linestring[0], polygon))
+ || (first && last_covered_by(turn, op, linestring, polygon))
             ;
     }
     return false;
@@ -79,27 +103,31 @@
     if (turn.method == method_crosses)
     {
         // The normal case, this is completely covered with entering/leaving
- // so stay out of this time consuming "within"
+ // so stay out of this time consuming "covered_by"
         return false;
     }
 
     if (is_entering(turn, op))
     {
- return entered || (first && geometry::within(linestring[0], polygon));
+ return entered || (first && last_covered_by(turn, op, linestring, polygon));
     }
 
     return false;
 }
 
-template <typename Turn>
-static inline bool was_entered(Turn const& turn, bool first)
+template
+<
+ typename Turn,
+ typename Operation,
+ typename Linestring,
+ typename Polygon
+>
+static inline bool was_entered(Turn const& turn, Operation const& op, bool first,
+ Linestring const& linestring, Polygon const& polygon)
 {
     if (first && (turn.method == method_collinear || turn.method == method_equal))
     {
- // If it is the very first point, and either equal or collinear, there is only one
- // IP generated (on purpose). So consider this as having entered.
- // Maybe it will leave immediately after that (u/i) but that is checked later.
- return true;
+ return last_covered_by(turn, op, linestring, polygon);
     }
     return false;
 }
@@ -154,11 +182,11 @@
         // and add the output piece
         geometry::copy_segments<false>(linestring, segment_id, index, current_piece);
         detail::overlay::append_no_duplicates(current_piece, point);
- if (! current_piece.empty())
+ if (current_piece.size() > 1)
         {
             *out++ = current_piece;
- current_piece.clear();
         }
+ current_piece.clear();
     }
 
     static inline bool is_entered(bool entered)
@@ -169,7 +197,7 @@
     template <typename Point, typename Geometry>
     static inline bool included(Point const& point, Geometry const& geometry)
     {
- return geometry::within(point, geometry);
+ return geometry::covered_by(point, geometry);
     }
 
 };
@@ -249,14 +277,46 @@
     template<typename Turn>
     struct sort_on_segment
     {
+ // In case of turn point at the same location, we want to have continue/blocked LAST
+ // because that should be followed (intersection) or skipped (difference).
+ // By chance the enumeration is ordered like that but we keep the safe way here.
+ inline int operation_order(Turn const& turn) const
+ {
+ operation_type const& operation = turn.operations[0].operation;
+ switch(operation)
+ {
+ case operation_none : return 0;
+ case operation_union : return 1;
+ case operation_intersection : return 2;
+ case operation_blocked : return 3;
+ case operation_continue : return 4;
+ }
+ return -1;
+ };
+
+ inline bool use_operation(Turn const& left, Turn const& right) const
+ {
+ // If they are the same, OK.
+ return operation_order(left) < operation_order(right);
+ }
+
+ inline bool use_distance(Turn const& left, Turn const& right) const
+ {
+ return geometry::math::equals(left.operations[0].enriched.distance, right.operations[0].enriched.distance)
+ ? use_operation(left, right)
+ : left.operations[0].enriched.distance < right.operations[0].enriched.distance
+ ;
+ }
+
         inline bool operator()(Turn const& left, Turn const& right) const
         {
             segment_identifier const& sl = left.operations[0].seg_id;
             segment_identifier const& sr = right.operations[0].seg_id;
 
             return sl == sr
- ? left.operations[0].enriched.distance < right.operations[0].enriched.distance
- : sl < sr;
+ ? use_distance(left, right)
+ : sl < sr
+ ;
 
         }
     };
@@ -299,7 +359,7 @@
         {
             turn_operation_iterator_type iit = boost::begin(it->operations);
 
- if (following::was_entered(*it, first))
+ if (following::was_entered(*it, *iit, first, linestring, polygon))
             {
                 debug_traverse(*it, *iit, "-> Was entered");
                 entered = true;
@@ -336,7 +396,7 @@
         }
 
         // Output the last one, if applicable
- if (! current_piece.empty())
+ if (current_piece.size() > 1)
         {
             *out++ = current_piece;
         }

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 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -22,6 +22,7 @@
 #include <boost/geometry/core/reverse_dispatch.hpp>
 #include <boost/geometry/geometries/concepts/check.hpp>
 #include <boost/geometry/algorithms/convert.hpp>
+#include <boost/geometry/algorithms/detail/point_on_border.hpp>
 #include <boost/geometry/algorithms/detail/overlay/clip_linestring.hpp>
 #include <boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp>
 #include <boost/geometry/algorithms/detail/overlay/overlay.hpp>
@@ -171,7 +172,17 @@
             // No intersection points, it is either completely
             // inside (interior + borders)
             // or completely outside
- if (follower::included(*boost::begin(linestring), areal))
+
+ // Use border point (on a segment) to check this
+ // (because turn points might skip some cases)
+ point_type border_point;
+ if (! geometry::point_on_border(border_point, linestring, true))
+ {
+ return out;
+ }
+
+
+ if (follower::included(border_point, areal))
             {
                 LineStringOut copy;
                 geometry::convert(linestring, copy);

Modified: branches/release/boost/geometry/algorithms/detail/throw_on_empty_input.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/throw_on_empty_input.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/throw_on_empty_input.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -14,6 +14,16 @@
 #include <boost/geometry/core/exception.hpp>
 #include <boost/geometry/algorithms/num_points.hpp>
 
+// BSG 2012-02-06: we use this currently only for distance.
+// For other scalar results area,length,perimeter it is commented on purpose.
+// Reason is that for distance there is no other choice. distance of two
+// empty geometries (or one empty) should NOT return any value.
+// But for area it is no problem to be 0.
+// Suppose: area(intersection(a,b)). We (probably) don't want a throw there...
+
+// So decided that at least for Boost 1.49 this is commented for
+// scalar results, except distance.
+
 namespace boost { namespace geometry
 {
 

Modified: branches/release/boost/geometry/algorithms/length.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/length.hpp (original)
+++ branches/release/boost/geometry/algorithms/length.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -28,7 +28,7 @@
 
 #include <boost/geometry/algorithms/assign.hpp>
 #include <boost/geometry/algorithms/detail/calculate_null.hpp>
-#include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp>
+// #include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp>
 #include <boost/geometry/views/closeable_view.hpp>
 #include <boost/geometry/strategies/distance.hpp>
 #include <boost/geometry/strategies/default_length_result.hpp>
@@ -152,7 +152,7 @@
 {
     concept::check<Geometry const>();
 
- detail::throw_on_empty_input(geometry);
+ // detail::throw_on_empty_input(geometry);
 
     typedef typename strategy::distance::services::default_strategy
         <
@@ -188,7 +188,7 @@
 {
     concept::check<Geometry const>();
 
- detail::throw_on_empty_input(geometry);
+ // detail::throw_on_empty_input(geometry);
     
     return dispatch::length
         <

Modified: branches/release/boost/geometry/algorithms/perimeter.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/perimeter.hpp (original)
+++ branches/release/boost/geometry/algorithms/perimeter.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -22,7 +22,7 @@
 #include <boost/geometry/algorithms/length.hpp>
 #include <boost/geometry/algorithms/detail/calculate_null.hpp>
 #include <boost/geometry/algorithms/detail/calculate_sum.hpp>
-#include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp>
+// #include <boost/geometry/algorithms/detail/throw_on_empty_input.hpp>
 
 
 namespace boost { namespace geometry
@@ -98,7 +98,7 @@
             point_tag, point_type
>::type strategy_type;
 
- detail::throw_on_empty_input(geometry);
+ // detail::throw_on_empty_input(geometry);
         
     return dispatch::perimeter
         <
@@ -128,7 +128,7 @@
 {
     concept::check<Geometry const>();
 
- detail::throw_on_empty_input(geometry);
+ // detail::throw_on_empty_input(geometry);
     
     return dispatch::perimeter
         <

Modified: branches/release/boost/geometry/algorithms/within.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/within.hpp (original)
+++ branches/release/boost/geometry/algorithms/within.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -241,10 +241,8 @@
 \details \details_check12{within, is completely inside}.
 \tparam Geometry1 \tparam_geometry
 \tparam Geometry2 \tparam_geometry
-\param geometry1 \param_geometry
-\param geometry2 \param_geometry
-\param geometry1 geometry which might be within the second geometry
-\param geometry2 geometry which might contain the first geometry
+\param geometry1 \param_geometry which might be within the second geometry
+\param geometry2 \param_geometry which might contain the first geometry
 \return true if geometry1 is completely contained within geometry2,
     else false
 \note The default strategy is used for within detection
@@ -299,9 +297,7 @@
 \details \details_check12{within, is completely inside}, \brief_strategy. \details_strategy_reasons
 \tparam Geometry1 \tparam_geometry
 \tparam Geometry2 \tparam_geometry
-\param geometry1 \param_geometry
-\param geometry2 \param_geometry
-\param geometry1 \param_geometry geometry which might be within the second geometry
+\param geometry1 \param_geometry which might be within the second geometry
 \param geometry2 \param_geometry which might contain the first geometry
 \param strategy strategy to be used
 \return true if geometry1 is completely contained within geometry2,

Deleted: branches/release/boost/geometry/arithmetic/cross_product.hpp
==============================================================================
--- branches/release/boost/geometry/arithmetic/cross_product.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
+++ (empty file)
@@ -1,110 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-
-// 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_ARITHMETIC_CROSS_PRODUCT_HPP
-#define BOOST_GEOMETRY_ARITHMETIC_CROSS_PRODUCT_HPP
-
-
-#include <cstddef>
-
-#include <boost/geometry/core/access.hpp>
-#include <boost/geometry/geometries/concepts/point_concept.hpp>
-#include <boost/geometry/util/select_coordinate_type.hpp>
-
-namespace boost { namespace geometry
-{
-
-#ifndef DOXYGEN_NO_DETAIL
-namespace detail
-{
-
-template <typename P1, typename P2, std::size_t Dimension>
-struct cross_product
-{
- // We define cross product only for 2d (see Wolfram) and 3d.
- // In Math, it is also well-defined for 7-dimension.
- // Generalisation of cross product to n-dimension is defined as
- // wedge product but it is not direct analogue to binary cross product.
-};
-
-template <typename P1, typename P2>
-struct cross_product<P1, P2, 2>
-{
- typedef P1 return_type;
-
- static inline return_type apply(P1 const& p1, P2 const& p2)
- {
- assert_dimension<P1, 2>();
- assert_dimension<P2, 2>();
-
- // For 2-dimensions, analog of the cross product U(x,y) and V(x,y) is
- // Ux * Vy - Uy * Vx
- // which is returned as 0-component (or X) of 2d vector, 1-component is undefined.
- return_type v;
- set<0>(v, get<0>(p1) * get<1>(p2) - get<1>(p1) * get<0>(p2));
- return v;
- }
-};
-
-template <typename P1, typename P2>
-struct cross_product<P1, P2, 3>
-{
- typedef P1 return_type;
-
- static inline return_type apply(P1 const& p1, P2 const& p2)
- {
- assert_dimension<P1, 3>();
- assert_dimension<P2, 3>();
-
- return_type v;
- set<0>(v, get<1>(p1) * get<2>(p2) - get<2>(p1) * get<1>(p2));
- set<1>(v, get<2>(p1) * get<0>(p2) - get<0>(p1) * get<2>(p2));
- set<2>(v, get<0>(p1) * get<1>(p2) - get<1>(p1) * get<0>(p2));
- return v;
- }
-};
-
-} // namespace detail
-#endif // DOXYGEN_NO_DETAIL
-
-
-// TODO: This is a simple draft. If relevant, it can be extended to:
-// - accept vectors of different coordinate_type, but common coordinate_system
-// - if vectors are of mixed 2d and 3d, lower dimension is used
-// - define result_type that will generate type of vector based on:
-// -- select_coordinate_type
-// -- selection of lower dimension
-
-/*!
-\brief Computes the cross product of two vectors.
-\details Both vectors shall be of the same type.
- This type also determines type of result vector.
-\ingroup arithmetic
-\param p1 first vector
-\param p2 second vector
-\return the cross product vector
- */
-template <typename P1, typename P2>
-inline P1 cross_product(P1 const& p1, P2 const& p2)
-{
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<P1>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<P2>) );
-
- return detail::cross_product
- <
- P1, P2,
- dimension<P1>::type::value
- >::apply(p1, p2);
-}
-
-
-}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_ARITHMETIC_CROSS_PRODUCT_HPP

Modified: branches/release/boost/geometry/geometry.hpp
==============================================================================
--- branches/release/boost/geometry/geometry.hpp (original)
+++ branches/release/boost/geometry/geometry.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -40,13 +40,17 @@
 #include <boost/geometry/algorithms/buffer.hpp>
 #include <boost/geometry/algorithms/centroid.hpp>
 #include <boost/geometry/algorithms/clear.hpp>
+#include <boost/geometry/algorithms/comparable_distance.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
 #include <boost/geometry/algorithms/convex_hull.hpp>
 #include <boost/geometry/algorithms/correct.hpp>
 #include <boost/geometry/algorithms/covered_by.hpp>
-#include <boost/geometry/algorithms/comparable_distance.hpp>
 #include <boost/geometry/algorithms/difference.hpp>
+#include <boost/geometry/algorithms/disjoint.hpp>
 #include <boost/geometry/algorithms/distance.hpp>
 #include <boost/geometry/algorithms/envelope.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/expand.hpp>
 #include <boost/geometry/algorithms/for_each.hpp>
 #include <boost/geometry/algorithms/intersection.hpp>
 #include <boost/geometry/algorithms/intersects.hpp>

Deleted: branches/release/boost/geometry/io/wkt/iomanip.hpp
==============================================================================
--- branches/release/boost/geometry/io/wkt/iomanip.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
+++ (empty file)
@@ -1,40 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 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_IO_WKT_IOMANIP_HPP
-#define BOOST_GEOMETRY_IO_WKT_IOMANIP_HPP
-
-#include <boost/geometry/io/wkt/write.hpp>
-
-// This short file contains only one manipulator, streaming as WKT
-// Don't include this in any standard-included header file.
-
-// Don't use namespace boost::geometry, to enable the library to stream custom geometries which
-// are living outside the namespace boost::geometry
-
-/*!
-\brief Streams a geometry as Well-Known Text
-\ingroup wkt
-*/
-template<typename Char, typename Traits, typename Geometry>
-inline std::basic_ostream<Char, Traits>& operator<<
- (
- std::basic_ostream<Char, Traits> &os,
- Geometry const& geom
- )
-{
- os << boost::geometry::wkt(geom);
- return os;
-}
-
-#endif // BOOST_GEOMETRY_IO_WKT_IOMANIP_HPP

Modified: branches/release/boost/geometry/io/wkt/wkt.hpp
==============================================================================
--- branches/release/boost/geometry/io/wkt/wkt.hpp (original)
+++ branches/release/boost/geometry/io/wkt/wkt.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -18,8 +18,8 @@
 #include <boost/geometry/io/wkt/write.hpp>
 
 // BSG 2011-02-03
-// We don't include iomanip by default. That tries to stream anything not known
+// We don't include stream.hpp by default. That tries to stream anything not known
 // by default (such as ttmath) and reports errors.
-// Users can include iomanip themselves (if they want to)
+// Users can include stream.hpp themselves (if they want to)
 
 #endif // BOOST_GEOMETRY_IO_WKT_WKT_HPP

Modified: branches/release/boost/geometry/multi/algorithms/centroid.hpp
==============================================================================
--- branches/release/boost/geometry/multi/algorithms/centroid.hpp (original)
+++ branches/release/boost/geometry/multi/algorithms/centroid.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -18,9 +18,7 @@
 #include <boost/range.hpp>
 
 #include <boost/geometry/algorithms/centroid.hpp>
-#include <boost/geometry/algorithms/num_points.hpp>
 #include <boost/geometry/multi/core/point_type.hpp>
-#include <boost/geometry/multi/algorithms/detail/multi_sum.hpp>
 #include <boost/geometry/multi/algorithms/num_points.hpp>
 
 
@@ -73,12 +71,14 @@
     static inline void apply(Multi const& multi, Point& centroid,
             Strategy const& strategy)
     {
+#if ! defined(BOOST_GEOMETRY_CENTROID_NO_THROW)
         // If there is nothing in any of the ranges, it is not possible
         // to calculate the centroid
         if (geometry::num_points(multi) == 0)
         {
             throw centroid_exception();
         }
+#endif
 
         typename Strategy::state_type state;
 

Modified: branches/release/boost/geometry/multi/algorithms/intersection.hpp
==============================================================================
--- branches/release/boost/geometry/multi/algorithms/intersection.hpp (original)
+++ branches/release/boost/geometry/multi/algorithms/intersection.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -14,6 +14,7 @@
 #include <boost/geometry/multi/core/geometry_id.hpp>
 #include <boost/geometry/multi/core/is_areal.hpp>
 #include <boost/geometry/multi/core/point_order.hpp>
+#include <boost/geometry/multi/algorithms/covered_by.hpp>
 #include <boost/geometry/multi/algorithms/envelope.hpp>
 #include <boost/geometry/multi/algorithms/num_points.hpp>
 #include <boost/geometry/multi/algorithms/detail/overlay/get_ring.hpp>

Modified: branches/release/libs/geometry/doc/concept/multi_polygon.qbk
==============================================================================
--- branches/release/libs/geometry/doc/concept/multi_polygon.qbk (original)
+++ branches/release/libs/geometry/doc/concept/multi_polygon.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -23,6 +23,19 @@
 * It must behave like a Boost.Range Random Access Range
 * The type defined by the metafunction `range_value<...>::type` must fulfill
         the [link geometry.reference.concepts.concept_polygon Polygon Concept]
+
+[heading Rules]
+
+Besides the Concepts, which are checks on compile-time, there are
+rules that valid MultiPolygons must fulfill. See the
+[link geometry.reference.concepts.concept_polygon Polygon Concept] for more information
+on the rules a polygon (and also a multi polygon) must fulfill.
+
+Additionally:
+
+* Individual polygons making up a multi-polygon may not intersect each other,
+ but tangencies are allowed.
+* One polygon might be located within the interior ring of another polygon.
 
 [heading Available Models]
 * [link geometry.reference.models.model_multi_polygon model::multi_polygon]

Modified: branches/release/libs/geometry/doc/concept/polygon.qbk
==============================================================================
--- branches/release/libs/geometry/doc/concept/polygon.qbk (original)
+++ branches/release/libs/geometry/doc/concept/polygon.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -15,7 +15,7 @@
 [heading Description]
 [concept Polygon..polygon]
 
-A polygon is ['A polygon is a planar surface defined by one exterior boundary and zero or more interior boundaries.]
+A polygon is ['A polygon is a planar surface defined by one exterior boundary and zero or more interior boundaries]
 ([@http://portal.opengeospatial.org/files/?artifact_id=25355 opengeospatial]).
 
 So the definition of a Boost.Geometry polygon differs a bit from e.g. Wiki, where a polygon does not have holes. A
@@ -34,6 +34,36 @@
 * there must be a specialization of `traits::exterior_ring` with two functions named `get`, returning the exterior ring, one being const, the other being non const
 * there must be a specialization of `traits::interior_rings` with two functions named `get`, returning the interior rings, one being const, the other being non const
 
+[heading Rules]
+
+Besides the Concepts, which are checks on compile-time, there are some other
+rules that valid polygons must fulfill. This follows the opengeospatial rules (see link
+above).
+
+* Polygons are simple geometric objects (See also [@http://en.wikipedia.org/wiki/Simple_polygon wiki]
+ but holes are allowed in __boost_geometry__ polygons).
+* If the polygons underlying `ring_type` is defined as clockwise, the exterior
+ ring must have the clockwise orientation, and any interior ring must be
+ counter clockwise. If the `ring_type` is defined counter clockwise, it is
+ vice versa.
+* If the polygons underlying `ring_type` is defined as closed, all rings must be
+ closed: the first point must be spatially equal to the last point.
+* The interior is a connected point set.
+* There should be no self intersections, but self tangencies (between
+ exterior/interior rings) are allowed (as long as the interior is a connected
+ point set.
+* There should be no cut lines, spikes or punctures.
+* The interior rings should be located within the exterior ring. Interior rings
+ may not be located within each other.
+
+The algorithms such as intersection, area, centroid, union, etc. do not check
+validity. There will be an algorithm is_valid which checks for
+validity against these rules, at runtime, and which can be called (by the library
+user) before.
+
+If the input is invalid, the output might be invalid too. For example: if a polygon
+which should be closed is not closed, the area will be incorrect.
+
 [heading Available Models]
 * [link geometry.reference.models.model_polygon polygon]
 * a Boost.Polygon polygon_with_holes_data (requires `#include boost/geometry/geometries/adapted/boost_polygon/polygon.hpp>`)

Modified: branches/release/libs/geometry/doc/concept/ring.qbk
==============================================================================
--- branches/release/libs/geometry/doc/concept/ring.qbk (original)
+++ branches/release/libs/geometry/doc/concept/ring.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -28,6 +28,13 @@
 * there might be a specialization of `traits::point_order` defining the order or orientation of its points, `clockwise` or `counterclockwise`
 * there might be a specialization of `traits::closure` defining the closure, `open` or `closed`
 
+[heading Rules]
+
+Besides the Concepts, which are checks on compile-time, there are
+rules that valid rings must fulfill. See the
+[link geometry.reference.concepts.concept_polygon Polygon Concept] for more information
+on the rules a polygon (and also a ring) must fulfill.
+
 [heading Available Models]
 * [link geometry.reference.models.model_ring ring]
 * a Boost.Polygon polygon_data (requires `#include boost/geometry/geometries/adapted/boost_polygon/ring.hpp>`)

Modified: branches/release/libs/geometry/doc/doxy/doxygen_input/groups/groups.hpp
==============================================================================
--- branches/release/libs/geometry/doc/doxy/doxygen_input/groups/groups.hpp (original)
+++ branches/release/libs/geometry/doc/doxy/doxygen_input/groups/groups.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -23,6 +23,7 @@
 \defgroup convex_hull convex hull: calculate the convex hull of a geometry
 \defgroup core core: meta-functions for geometry types
 \defgroup correct correct: correct geometries
+\defgroup covered_by covered_by: detect if a geometry is inside or on the border of another geometry, a.o. point-in-polygon (border included)
 \defgroup cs coordinate systems
 \defgroup difference difference: difference of two geometries
 \defgroup disjoint disjoint: detect if geometries are not spatially related

Modified: branches/release/libs/geometry/doc/geometry.qbk
==============================================================================
--- branches/release/libs/geometry/doc/geometry.qbk (original)
+++ branches/release/libs/geometry/doc/geometry.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -12,7 +12,7 @@
 
 [library Geometry
     [quickbook 1.5]
- [version 1.0]
+ [version 1.49]
     [authors [Gehrels, Barend], [Lalande, Bruno], [Loskot, Mateusz]]
     [copyright 2009-2012 Barend Gehrels, Bruno Lalande, Mateusz Loskot]
     [purpose Documentation of Boost.Geometry library]

Modified: branches/release/libs/geometry/doc/html/index.html
==============================================================================
--- branches/release/libs/geometry/doc/html/index.html (original)
+++ branches/release/libs/geometry/doc/html/index.html 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -1,10 +1,10 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Chapter&#160;1.&#160;Geometry 1.0</title>
+<title>Chapter&#160;1.&#160;Geometry 1.49</title>
 <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Geometry 1.0">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Geometry 1.49">
 <link rel="next" href="geometry/introduction.html" title="Introduction">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -21,7 +21,7 @@
 <div class="chapter">
 <div class="titlepage"><div>
 <div><h2 class="title">
-<a name="geometry"></a>Chapter&#160;1.&#160;Geometry 1.0</h2></div>
+<a name="geometry"></a>Chapter&#160;1.&#160;Geometry 1.49</h2></div>
 <div><div class="author"><h3 class="author">
 <span class="firstname">Barend</span> <span class="surname">Gehrels</span>
 </h3></div></div>
@@ -31,9 +31,10 @@
 <div><div class="author"><h3 class="author">
 <span class="firstname">Mateusz</span> <span class="surname">Loskot</span>
 </h3></div></div>
-<div><p class="copyright">Copyright &#169; 2012 Barend Gehrels, Bruno Lalande, Mateusz Loskot</p></div>
+<div><p class="copyright">Copyright &#169; 2009-2012 Barend
+ Gehrels, Bruno Lalande, Mateusz Loskot</p></div>
 <div><div class="legalnotice">
-<a name="id666441"></a><p>
+<a name="id625665"></a><p>
         Distributed under 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)
       </p>
@@ -68,6 +69,7 @@
 <dt><span class="section">Strategies</span></dt>
 <dt><span class="section">Views</span></dt>
 </dl></dd>
+<dt><span class="section">Release Notes</span></dt>
 <dt><span class="section">About this documentation</span></dt>
 <dt><span class="section">Acknowledgments</span></dt>
 </dl>
@@ -87,24 +89,24 @@
         Alfredo Correa (adaption of Boost.Array)
       </li>
 <li class="listitem">
- Adam Wulkiewicz (spatial indexes) <sup>[<a name="id697753" href="#ftn.id697753" class="footnote">1</a>]</sup>
+ Adam Wulkiewicz (spatial indexes) <sup>[<a name="id656673" href="#ftn.id656673" class="footnote">1</a>]</sup>
       </li>
 <li class="listitem">
- Federico Fern&#225;ndez (spatial indexes) <sup>[<a name="id697767" href="#ftn.id697767" class="footnote">2</a>]</sup>
+ Federico Fern&#225;ndez (spatial indexes) <sup>[<a name="id656686" href="#ftn.id656686" class="footnote">2</a>]</sup>
       </li>
 </ul></div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id697753" href="#id697753" class="para">1</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id656673" href="#id656673" class="para">1</a>] </sup>
           Currently an extension
         </p></div>
-<div class="footnote"><p><sup>[<a name="ftn.id697767" href="#id697767" class="para">2</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id656686" href="#id656686" class="para">2</a>] </sup>
           Currently an extension
         </p></div>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: January 13, 2012 at 11:52:50 GMT</small></p></td>
+<td align="left"><p><small>Last revised: February 12, 2012 at 12:12:26 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: branches/release/libs/geometry/doc/introduction.qbk
==============================================================================
--- branches/release/libs/geometry/doc/introduction.qbk (original)
+++ branches/release/libs/geometry/doc/introduction.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -37,27 +37,35 @@
 
 * conventions from boost
 * conventions from the std library
-* conventions and names from one of the __ogc__ standards on geometry
-
-The library was released with Boost 1.47.0 and from that point on it is oficially part of the Boost C++ Libraries.
-
-Latest stable version of the source code is included in the [@http://www.boost.org/users/download/ Boost packaged releases].
-It can also be downloaded from the current [@http://svn.boost.org/svn/boost/branches/release Boost release branch]
+* conventions and names from one of the __ogc__ standards on geometry and, more
+ specificly, from the
+ [@http://portal.opengeospatial.org/files/?artifact_id=25355 Simple Feature Specification]
+
+The library was released with Boost 1.47.0 and from that point on it is
+officially part of the Boost C++ Libraries.
+
+Latest stable version of the source code is included in the
+[@http://www.boost.org/users/download/ Boost packaged releases].
+It can also be downloaded from the current
+[@http://svn.boost.org/svn/boost/branches/release Boost release branch]
 in the Boost Subversion repository.
 
-The library development upstream is available from the [@http://svn.boost.org/svn/boost/trunk Boost trunk] in the Boost Subversion repository.
-
-Note that the library [*extensions] are not distributed in the official Boost releases, but only available
-in the [@http://svn.boost.org/svn/boost/trunk/boost/geometry/extensions/ Boost trunk]
+The library development upstream is available from the
+[@http://svn.boost.org/svn/boost/trunk Boost trunk] in the Boost Subversion
+repository.
+
+Note that the library [*extensions] are not distributed in the official Boost
+releases, but only available
+in the [@http://svn.boost.org/svn/boost/trunk/boost/geometry/extensions/ Boost
+trunk]
 and that they are subject to change.
 
 __boost_geometry__ was accepted by Boost at November 28, 2009
 ([@http://permalink.gmane.org/gmane.comp.lib.boost.announce/246 review report]).
 
-There are two mailing lists
-where __boost_geometry__ is discussed: the boost developers list, and also the
-[@http://lists.osgeo.org/mailman/listinfo/ggl GGL mailing list] at osgeo, at which, at the moment of writing, more than 70 people
-are subscribed. The mailing list is also accessible from
-[@http://boost-geometry.203548.n3.nabble.com/ Nabble] as Boost Geometry.
+There is a __boost_geometry__ [@http://lists.boost.org/mailman/listinfo.cgi/geometry
+mailing list]. The mailing list and its messages are also accessible from
+[@http://boost-geometry.203548.n3.nabble.com/ Nabble] as Boost Geometry. Also on
+the Boost Developers list and on the Boost Users list __boost_geometry__ is discussed.
 
 [endsect]

Modified: branches/release/libs/geometry/doc/make_qbk.py
==============================================================================
--- branches/release/libs/geometry/doc/make_qbk.py (original)
+++ branches/release/libs/geometry/doc/make_qbk.py 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -68,7 +68,7 @@
 call_doxygen()
 
 algorithms = ["append", "assign", "make", "clear"
- , "area", "buffer", "centroid", "convert", "correct"
+ , "area", "buffer", "centroid", "convert", "correct", "covered_by"
     , "convex_hull", "difference", "disjoint", "distance"
     , "envelope", "equals", "expand", "for_each", "intersection", "intersects"
     , "length", "num_geometries", "num_interior_rings", "num_points"
@@ -148,4 +148,4 @@
 group_to_quickbook("register")
 group_to_quickbook("enum")
 
-os.system("bjam")
+os.system("../../../b2")

Modified: branches/release/libs/geometry/doc/quickref.xml
==============================================================================
--- branches/release/libs/geometry/doc/quickref.xml (original)
+++ branches/release/libs/geometry/doc/quickref.xml 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -319,6 +319,7 @@
     </simplelist>
     <bridgehead renderas="sect3">Predicates</bridgehead>
     <simplelist type="vert" columns="1">
+ <member><link linkend="geometry.reference.algorithms.covered_by">covered_by</link></member>
      <member><link linkend="geometry.reference.algorithms.disjoint">disjoint</link></member>
      <member><link linkend="geometry.reference.algorithms.equals">equals</link></member>
      <member><link linkend="geometry.reference.algorithms.intersects">intersects</link></member>

Modified: branches/release/libs/geometry/doc/readme.txt
==============================================================================
--- branches/release/libs/geometry/doc/readme.txt (original)
+++ branches/release/libs/geometry/doc/readme.txt 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -30,3 +30,15 @@
         because it is used in the final URL and we want to have "reference" in it]
 src: examples used in documentation and tools (doxygen_xml2qbk)
 
+Per new algorithm (e.g. foo), one should add:
+1) in file boost/geometry/algorithms/foo.hpp, include a "\ingroup foo" in the doxygen comments
+2) in file doc/doxy/doxygen_input/groups/groups.hpp, define the group "foo"
+3) in file doc/make_qbk.py, include the algorithm "foo"
+4) in file doc/reference.qbk, include the foo.qbk ([include generated/foo.qbk])
+5) in file doc/quickref.xml, include a section on foo conform other sections
+6) in file doc/src/docutils/tools/support_status/support_status.cpp include the algorithm (3 places) (optionally)
+7) in file doc/reference/foo.qbk (to be created), include the support status and write other text, and include examples (optionally)
+8) in file doc/imports.qbk, include the example foo.cpp (if any)
+9) create file doc/src/examples/algorithm/foo.cpp (optional)
+
+

Modified: branches/release/libs/geometry/doc/reference.qbk
==============================================================================
--- branches/release/libs/geometry/doc/reference.qbk (original)
+++ branches/release/libs/geometry/doc/reference.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -84,6 +84,10 @@
 [include generated/convex_hull.qbk]
 [include generated/correct.qbk]
 
+[section:covered_by covered_by]
+[include generated/covered_by.qbk]
+[endsect]
+
 [include generated/difference.qbk]
 [include generated/disjoint.qbk]
 

Modified: branches/release/libs/geometry/doc/reference/algorithms/convert.qbk
==============================================================================
--- branches/release/libs/geometry/doc/reference/algorithms/convert.qbk (original)
+++ branches/release/libs/geometry/doc/reference/algorithms/convert.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -10,8 +10,8 @@
   http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================/]
 
-[tip convert is not defined within OGC or ISO]
-[tip convert is modelled as source -> target
+[note convert is not defined within OGC or ISO]
+[note convert is modelled as source -> target
     (where assign is modelled as target := source)]
 
 [include generated/convert_status.qbk]

Modified: branches/release/libs/geometry/doc/reference/algorithms/difference.qbk
==============================================================================
--- branches/release/libs/geometry/doc/reference/algorithms/difference.qbk (original)
+++ branches/release/libs/geometry/doc/reference/algorithms/difference.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -8,7 +8,9 @@
   http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================/]
 
-[include reference/algorithms/overlay_behavior.qbk]
+[include reference/algorithms/difference_behavior.qbk]
+
+[include reference/algorithms/geometry_rules.qbk]
 
 [heading Example]
 [difference] [difference_output]

Modified: branches/release/libs/geometry/doc/reference/algorithms/difference_inserter.qbk
==============================================================================
--- branches/release/libs/geometry/doc/reference/algorithms/difference_inserter.qbk (original)
+++ branches/release/libs/geometry/doc/reference/algorithms/difference_inserter.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -8,7 +8,9 @@
   http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================/]
 
-[include reference/algorithms/overlay_behavior.qbk]
+[include reference/algorithms/difference_behavior.qbk]
+
+[include reference/algorithms/geometry_rules.qbk]
 
 [heading Example]
 [difference_inserter] [difference_inserter_output]

Modified: branches/release/libs/geometry/doc/reference/algorithms/intersection.qbk
==============================================================================
--- branches/release/libs/geometry/doc/reference/algorithms/intersection.qbk (original)
+++ branches/release/libs/geometry/doc/reference/algorithms/intersection.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -15,9 +15,11 @@
 [[Case] [Behavior] ]
 [[[qbk_out __point__]][Calculates intersection points of input geometries]]
 [[[qbk_out __linestring__]][Calculates intersection linestrings of input geometries (NYI)]]
-[[[qbk_out __polygon__]][Calculates intersection polygons input (multi)polygons and/or boxes]]
+[[[qbk_out __polygon__]][Calculates intersection polygons of input (multi)polygons and/or boxes]]
 ]
 
+[include reference/algorithms/geometry_rules.qbk]
+
 [heading Example]
 [intersection]
 [intersection_output]

Deleted: branches/release/libs/geometry/doc/reference/algorithms/overlay_behavior.qbk
==============================================================================
--- branches/release/libs/geometry/doc/reference/algorithms/overlay_behavior.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
+++ (empty file)
@@ -1,19 +0,0 @@
-[/============================================================================
- Boost.Geometry (aka GGL, Generic Geometry Library)
-
- Copyright (c) 2011-2012 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)
-=============================================================================/]
-
-[heading Behavior]
-[table
-[[Case] [Behavior] ]
-[[__2dim__][All combinations of: box, ring, polygon, multi_polygon]]
-[[__other__][__nyiversion__]]
-[[__sph__][__nyiversion__]]
-[[Three dimensional][__nyiversion__]]
-]
-

Modified: branches/release/libs/geometry/doc/reference/algorithms/sym_difference.qbk
==============================================================================
--- branches/release/libs/geometry/doc/reference/algorithms/sym_difference.qbk (original)
+++ branches/release/libs/geometry/doc/reference/algorithms/sym_difference.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -10,13 +10,9 @@
   http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================/]
 
-[heading Behavior]
-[table
-[[Case] [Behavior] ]
-[[__2dim__][All combinations of: box, ring, polygon, multi_polygon]]
-[[__other__][Not supported]]
+[include reference/algorithms/difference_behavior.qbk]
 
-]
+[include reference/algorithms/geometry_rules.qbk]
 
 [heading Example]
 [sym_difference]

Modified: branches/release/libs/geometry/doc/reference/algorithms/union.qbk
==============================================================================
--- branches/release/libs/geometry/doc/reference/algorithms/union.qbk (original)
+++ branches/release/libs/geometry/doc/reference/algorithms/union.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -13,8 +13,11 @@
 [heading Behavior]
 [table
 [[Case] [Behavior] ]
+[[[qbk_out __polygon__]][Calculates union polygons of input (multi)polygons and/or boxes]]
 ]
 
+[include reference/algorithms/geometry_rules.qbk]
+
 [heading Example]
 [union]
 [union_output]

Modified: branches/release/libs/geometry/doc/reference/algorithms/within.qbk
==============================================================================
--- branches/release/libs/geometry/doc/reference/algorithms/within.qbk (original)
+++ branches/release/libs/geometry/doc/reference/algorithms/within.qbk 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -11,7 +11,10 @@
 =============================================================================/]
 
 [include generated/within_status.qbk]
-
+[note In this status matrix above: columns are types of first parameter
+ and rows are types of second parameter. So a point can be checked to be
+ within a polygon, but not vice versa.]
+
 [heading Notes]
 If a point is located exactly on the border of a geometry, the result depends on the strategy.
 The default strategy ([link geometry.reference.strategies.strategy_within_winding Winding (coordinate system agnostic)])
@@ -23,3 +26,5 @@
 [heading Complexity]
 Linear
 
+[heading See also]
+* [link geometry.reference.algorithms.covered_by covered_by]

Modified: branches/release/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp
==============================================================================
--- branches/release/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp (original)
+++ branches/release/libs/geometry/example/05_b_overlay_linestring_polygon_example.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -10,6 +10,10 @@
 //
 // Linestring Polygon Overlay Example
 
+// NOTE: this example is obsolete. Boost.Geometry can now
+// overlay linestrings/polygons.
+// This sample will be removed in next version.
+
 #include <fstream>
 #include <iostream>
 #include <string>

Modified: branches/release/libs/geometry/example/with_external_libs/contrib/gd-2.0.35/boost_geometry_readme.txt
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/contrib/gd-2.0.35/boost_geometry_readme.txt (original)
+++ branches/release/libs/geometry/example/with_external_libs/contrib/gd-2.0.35/boost_geometry_readme.txt 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -8,11 +8,13 @@
 
 
 Download gd from
-http://www.libgd.og/
+http://www.libgd.org/
+(currently from: https://bitbucket.org/pierrejoye/gd-libgd/downloads)
+
 and extract to this folder.
+(currently: extract from ../src/ into this folder)
 
 Nothing has to be installed.
 
 This is used in x02_gd_example.cpp
 
-

Modified: branches/release/libs/geometry/example/with_external_libs/soci.vsprops
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/soci.vsprops (original)
+++ branches/release/libs/geometry/example/with_external_libs/soci.vsprops 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -7,10 +7,10 @@
         <Tool
                 Name="VCCLCompilerTool"
                 AdditionalIncludeDirectories="&quot;$(SOCI_ROOT)/src/core&quot;;&quot;$(SOCI_ROOT)/src/backends/postgresql&quot;"
- PreprocessorDefinitions="SOCI_USE_BOOST"
+ PreprocessorDefinitions="SOCI_USE_BOOST;SOCI_LIB_PREFIX=\&quot;libsoci_\&quot;;SOCI_LIB_SUFFIX=\&quot;.so\&quot;"
         />
         <UserMacro
                 Name="SOCI_ROOT"
- Value="contrib/soci-3.0.0"
+ Value="contrib/soci-3.1.0"
         />
 </VisualStudioPropertySheet>

Modified: branches/release/libs/geometry/example/with_external_libs/x02_gd_example.cpp
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x02_gd_example.cpp (original)
+++ branches/release/libs/geometry/example/with_external_libs/x02_gd_example.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -27,14 +27,12 @@
 
 #include <boost/foreach.hpp>
 
-#include <boost/geometry/geometry.hpp>
-#include <boost/geometry/multi/multi.hpp>
-#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry.hpp>
+#include <boost/geometry/multi/geometries/multi_polygon.hpp>
+
 #include <boost/geometry/extensions/gis/latlong/latlong.hpp>
 #include <boost/geometry/extensions/gis/geographic/strategies/area_huiller_earth.hpp>
 
-#include <boost/geometry/io/wkt/wkt.hpp>
-
 
 #include <gd.h>
 

Modified: branches/release/libs/geometry/example/with_external_libs/x02_gd_example.vcproj
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x02_gd_example.vcproj (original)
+++ branches/release/libs/geometry/example/with_external_libs/x02_gd_example.vcproj 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -182,6 +182,10 @@
>
                         </File>
                         <File
+ RelativePath="$(GD)\gd_color.c"
+ >
+ </File>
+ <File
                                 RelativePath="$(GD)\gd_gd.c"
>
                         </File>

Modified: branches/release/libs/geometry/example/with_external_libs/x03_a_soci_example.cpp
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x03_a_soci_example.cpp (original)
+++ branches/release/libs/geometry/example/with_external_libs/x03_a_soci_example.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -36,7 +36,6 @@
 
 #include <boost/geometry/geometry.hpp>
 #include <boost/geometry/geometries/adapted/boost_tuple.hpp>
-#include <boost/geometry/io/wkt/wkt.hpp>
 
 BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian);
 

Modified: branches/release/libs/geometry/example/with_external_libs/x03_a_soci_example.vcproj
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x03_a_soci_example.vcproj (original)
+++ branches/release/libs/geometry/example/with_external_libs/x03_a_soci_example.vcproj 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -210,6 +210,26 @@
                                 </FileConfiguration>
                         </File>
                         <File
+ RelativePath="$(SOCI_ROOT)\src\backends\postgresql\error.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\pgsql\"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\pgsql\"
+ />
+ </FileConfiguration>
+ </File>
+ <File
                                 RelativePath="$(SOCI_ROOT)\src\backends\postgresql\factory.cpp"
>
                                 <FileConfiguration

Modified: branches/release/libs/geometry/example/with_external_libs/x03_b_soci_example.vcproj
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x03_b_soci_example.vcproj (original)
+++ branches/release/libs/geometry/example/with_external_libs/x03_b_soci_example.vcproj 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -210,6 +210,26 @@
                                 </FileConfiguration>
                         </File>
                         <File
+ RelativePath="$(SOCI_ROOT)\src\backends\postgresql\error.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\pgsql\"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\pgsql\"
+ />
+ </FileConfiguration>
+ </File>
+ <File
                                 RelativePath="$(SOCI_ROOT)\src\backends\postgresql\factory.cpp"
>
                                 <FileConfiguration

Modified: branches/release/libs/geometry/example/with_external_libs/x03_c_soci_example.vcproj
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x03_c_soci_example.vcproj (original)
+++ branches/release/libs/geometry/example/with_external_libs/x03_c_soci_example.vcproj 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -210,6 +210,26 @@
                                 </FileConfiguration>
                         </File>
                         <File
+ RelativePath="$(SOCI_ROOT)\src\backends\postgresql\error.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\pgsql\"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\pgsql\"
+ />
+ </FileConfiguration>
+ </File>
+ <File
                                 RelativePath="$(SOCI_ROOT)\src\backends\postgresql\factory.cpp"
>
                                 <FileConfiguration

Modified: branches/release/libs/geometry/example/with_external_libs/x03_d_soci_example.cpp
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x03_d_soci_example.cpp (original)
+++ branches/release/libs/geometry/example/with_external_libs/x03_d_soci_example.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -28,12 +28,13 @@
 #include <string>
 #include <vector>
 
-#include <boost/geometry/geometry.hpp>
-#include <boost/geometry/algorithms/area.hpp>
+#include <boost/geometry.hpp>
+
 #include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
+
 #include <boost/geometry/extensions/gis/io/wkb/read_wkb.hpp>
 #include <boost/geometry/extensions/gis/io/wkb/utility.hpp>
-#include <boost/geometry/io/wkt/wkt.hpp>
 
 int main()
 {
@@ -65,7 +66,7 @@
             if (!boost::geometry::hex2wkb(*it, std::back_inserter(wkb)))
                 throw std::runtime_error("hex2wkb translation failed");
 
- boost::geometry::model::d2::polygon parcel;
+ boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double> > parcel;
             if (!boost::geometry::read_wkb(wkb.begin(), wkb.end(), parcel))
                 throw std::runtime_error("read_wkb failed");
 

Modified: branches/release/libs/geometry/example/with_external_libs/x03_d_soci_example.vcproj
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x03_d_soci_example.vcproj (original)
+++ branches/release/libs/geometry/example/with_external_libs/x03_d_soci_example.vcproj 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -210,6 +210,26 @@
                                 </FileConfiguration>
                         </File>
                         <File
+ RelativePath="$(SOCI_ROOT)\src\backends\postgresql\error.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\pgsql\"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)\pgsql\"
+ />
+ </FileConfiguration>
+ </File>
+ <File
                                 RelativePath="$(SOCI_ROOT)\src\backends\postgresql\factory.cpp"
>
                                 <FileConfiguration

Modified: branches/release/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper.cpp
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper.cpp (original)
+++ branches/release/libs/geometry/example/with_external_libs/x04_wxwidgets_world_mapper.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -18,13 +18,13 @@
 #include <boost/scoped_array.hpp>
 
 #include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
 #include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/multi/geometries/multi_geometries.hpp>
+
 #include <boost/geometry/geometries/register/point.hpp>
 #include <boost/geometry/geometries/register/ring.hpp>
-#include <boost/geometry/multi/multi.hpp>
 #include <boost/geometry/extensions/algorithms/selected.hpp>
-#include <boost/geometry/io/wkt/read.hpp>
-#include <boost/geometry/multi/io/wkt/read.hpp>
 
 
 // wxWidgets, if these headers are NOT found, adapt include path (and lib path)

Modified: branches/release/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp (original)
+++ branches/release/libs/geometry/example/with_external_libs/x05_shapelib_example.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -20,8 +20,8 @@
 #include "shapefil.h"
 
 #include <boost/geometry/geometry.hpp>
+#include <boost/geometry/geometries/geometries.hpp>
 #include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/io/wkt/iomanip.hpp>
 
 using namespace boost::geometry;
 

Modified: branches/release/libs/geometry/example/with_external_libs/x06_qt_world_mapper.cpp
==============================================================================
--- branches/release/libs/geometry/example/with_external_libs/x06_qt_world_mapper.cpp (original)
+++ branches/release/libs/geometry/example/with_external_libs/x06_qt_world_mapper.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -23,13 +23,15 @@
 #include <boost/foreach.hpp>
 
 #include <boost/geometry/geometry.hpp>
+
+#include <boost/geometry/geometries/geometries.hpp>
+#include <boost/geometry/multi/geometries/multi_geometries.hpp>
 #include <boost/geometry/geometries/point_xy.hpp>
+
 #include <boost/geometry/geometries/register/point.hpp>
 #include <boost/geometry/geometries/register/ring.hpp>
 
-#include <boost/geometry/multi/multi.hpp>
 #include <boost/geometry/extensions/algorithms/selected.hpp>
-#include <boost/geometry/io/wkt/wkt.hpp>
 
 
 

Modified: branches/release/libs/geometry/test/algorithms/area.cpp
==============================================================================
--- branches/release/libs/geometry/test/algorithms/area.cpp (original)
+++ branches/release/libs/geometry/test/algorithms/area.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -242,7 +242,7 @@
 
     test_large_integers();
 
- test_empty_input<bg::model::d2::point_xy<int> >();
+ // test_empty_input<bg::model::d2::point_xy<int> >();
 
     return 0;
 }

Modified: branches/release/libs/geometry/test/algorithms/difference.cpp
==============================================================================
--- branches/release/libs/geometry/test/algorithms/difference.cpp (original)
+++ branches/release/libs/geometry/test/algorithms/difference.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -74,9 +74,6 @@
     test_one_lp<LineString, LineString, Polygon>("case13", "LINESTRING(3 2,4 4,2 3)", poly_9, 0, 0, 0.0);
     test_one_lp<LineString, LineString, Polygon>("case14", "LINESTRING(5 6,4 4,6 5)", poly_9, 1, 3, 2.0 * sqrt(5.0));
 
- //return;
- // The rest compiles but is NOT yet correct
-
     test_one_lp<LineString, LineString, Polygon>("case15", "LINESTRING(0 2,1 2,1 3,0 3)", poly_9, 2, 4, 2.0);
     test_one_lp<LineString, LineString, Polygon>("case16", "LINESTRING(2 2,1 2,1 3,2 3)", poly_9, 0, 0, 0.0);
 
@@ -87,6 +84,14 @@
     test_one_lp<LineString, LineString, Polygon>("case20", "LINESTRING(1 2,1 3,2 3)", poly_9, 0, 0, 0.0);
 
     test_one_lp<LineString, LineString, Polygon>("case21", "LINESTRING(1 2,1 4,4 4,4 1,2 1,2 2)", poly_9, 0, 0, 0.0);
+
+ // More collinear (opposite) cases
+ test_one_lp<LineString, LineString, Polygon>("case22", "LINESTRING(4 1,4 4,7 4)", poly_9, 1, 2, 3.0);
+ test_one_lp<LineString, LineString, Polygon>("case23", "LINESTRING(4 0,4 4,7 4)", poly_9, 2, 4, 4.0);
+ test_one_lp<LineString, LineString, Polygon>("case24", "LINESTRING(4 1,4 5,7 5)", poly_9, 1, 3, 4.0);
+ test_one_lp<LineString, LineString, Polygon>("case25", "LINESTRING(4 0,4 5,7 5)", poly_9, 2, 5, 5.0);
+ test_one_lp<LineString, LineString, Polygon>("case26", "LINESTRING(4 0,4 3,4 5,7 5)", poly_9, 2, 5, 5.0);
+ test_one_lp<LineString, LineString, Polygon>("case27", "LINESTRING(4 4,4 5,5 5)", poly_9, 1, 3, 2.0);
 }
 
 template <typename P>

Modified: branches/release/libs/geometry/test/algorithms/length.cpp
==============================================================================
--- branches/release/libs/geometry/test/algorithms/length.cpp (original)
+++ branches/release/libs/geometry/test/algorithms/length.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -49,7 +49,7 @@
     test_all<bg::model::d2::point_xy<ttmath_big> >();
 #endif
 
- test_empty_input<bg::model::d2::point_xy<int> >();
+ // test_empty_input<bg::model::d2::point_xy<int> >();
 
     return 0;
 }

Modified: branches/release/libs/geometry/test/algorithms/overlay/overlay_cases.hpp
==============================================================================
--- branches/release/libs/geometry/test/algorithms/overlay/overlay_cases.hpp (original)
+++ branches/release/libs/geometry/test/algorithms/overlay/overlay_cases.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -553,4 +553,11 @@
     "POLYGON ((484 290, 558 359, 543 309, 484 290))"
     };
 
+static std::string ticket_5103[2] =
+ {
+ "POLYGON((-92810838 3618230,-94606872 1822196,-94999302 2214626,-93203268 4010660,-92810838 3618230))",
+ "POLYGON((-95269304 222758,-95260668 419862,-95234760 615696,-95192088 808228,-95132906 996442,-95057214 1178814,-94966028 1354074,-94860110 1520444,-94739968 1676908,-94606618 1822450,-94999048 2214880,-95165164 2033778,-95314770 1838706,-95446850 1631442,-95560388 1413510,-95654368 1186434,-95728282 951992,-95781368 711962,-95813626 468376,-95824294 222758,-95269304 222758))"
+ };
+
+
 #endif // BOOST_GEOMETRY_TEST_OVERLAY_CASES_HPP

Modified: branches/release/libs/geometry/test/algorithms/perimeter.cpp
==============================================================================
--- branches/release/libs/geometry/test/algorithms/perimeter.cpp (original)
+++ branches/release/libs/geometry/test/algorithms/perimeter.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -57,7 +57,7 @@
     test_all<bg::model::d2::point_xy<ttmath_big> >();
 #endif
 
- test_empty_input<bg::model::d2::point_xy<int> >();
+ // test_empty_input<bg::model::d2::point_xy<int> >();
 
     return 0;
 }

Modified: branches/release/libs/geometry/test/algorithms/test_difference.hpp
==============================================================================
--- branches/release/libs/geometry/test/algorithms/test_difference.hpp (original)
+++ branches/release/libs/geometry/test/algorithms/test_difference.hpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -294,7 +294,8 @@
 
     BOOST_CHECK_CLOSE(length, expected_length, 0.001);
 
- difference_output(caseid, g1, g2, pieces);
+ std::string lp = "lp_";
+ difference_output(lp + caseid, g1, g2, pieces);
 }
 
 

Modified: branches/release/libs/geometry/test/algorithms/union.cpp
==============================================================================
--- branches/release/libs/geometry/test/algorithms/union.cpp (original)
+++ branches/release/libs/geometry/test/algorithms/union.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -302,6 +302,20 @@
     test_one<polygon, box, polygon>("box_poly8", "box(0 0, 3 3)",
             "POLYGON((2 2, 1 4, 2 4, 3 3, 2 2))",
                 1, 0, 8, 10.25);
+
+ // Ticket 5103 https://svn.boost.org/trac/boost/ticket/5103
+ // This ticket was actually reported for Boost.Polygon
+ // but it is apparently a difficult case so we check it for Boost.Geometry as well.
+ // SQL Server gives: 2515271331437.69
+ // PostGIS gives: 2515271327070.52
+ // Boost.Geometry gives: 2515271327070.5237746891 (ttmath)
+ // 2515271327070.5156 (double)
+ // 2515271320603.0000 (int)
+ // Note the int-test was tested externally - it is in two points 0.37 off (makes sense).
+ // Because of the width of the polygon (400000 meter) this might indeed cause a substantial difference.
+
+ test_one<polygon, polygon, polygon>("ticket_5103", ticket_5103[0], ticket_5103[1],
+ 1, 0, 25, 2515271327070.5);
 }
 
 

Modified: branches/release/libs/geometry/test/multi/algorithms/multi_difference.cpp
==============================================================================
--- branches/release/libs/geometry/test/multi/algorithms/multi_difference.cpp (original)
+++ branches/release/libs/geometry/test/multi/algorithms/multi_difference.cpp 2012-02-12 08:04:01 EST (Sun, 12 Feb 2012)
@@ -151,10 +151,18 @@
     typedef typename bg::point_type<Polygon>::type Point;
     typedef bg::model::ring<Point> Ring;
 
- test_one_lp<LineString, LineString, MultiPolygon>("case_mp_ls_1", "LINESTRING(2 0,2 5)", case_multi_simplex[0], 3, 5, 1.30);
+ test_one_lp<LineString, LineString, MultiPolygon>("case_mp_ls_1", "LINESTRING(2 0,2 5)", case_multi_simplex[0], 2, 4, 1.30);
     test_one_lp<LineString, MultiLineString, Polygon>("case_p_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_single_simplex, 3, 6, 2.5);
- test_one_lp<LineString, MultiLineString, MultiPolygon>("case_mp_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_multi_simplex[0], 6, 11, 3.1666667);
+ test_one_lp<LineString, MultiLineString, MultiPolygon>("case_mp_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_multi_simplex[0], 5, 10, 3.1666667);
     test_one_lp<LineString, MultiLineString, Ring>("case_r_mls_1", "MULTILINESTRING((2 0,2 5),(3 0,3 5))", case_single_simplex, 3, 6, 2.5);
+
+ // Collinear cases, with multiple turn points at the same location
+ test_one_lp<LineString, LineString, MultiPolygon>("case_mp_ls_2a", "LINESTRING(1 0,1 1,2 1,2 0)", "MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)),((1 1,1 2,2 2,2 1,1 1)))", 1, 2, 1.0);
+ test_one_lp<LineString, LineString, MultiPolygon>("case_mp_ls_2b", "LINESTRING(1 0,1 1,2 1,2 0)", "MULTIPOLYGON(((1 1,1 2,2 2,2 1,1 1)),((0 0,0 1,1 1,1 0,0 0)))", 1, 2, 1.0);
+
+ test_one_lp<LineString, LineString, MultiPolygon>("case_mp_ls_3",
+ "LINESTRING(6 6,6 7,7 7,7 6,8 6,8 7,9 7,9 6)",
+ "MULTIPOLYGON(((5 7,5 8,6 8,6 7,5 7)),((6 6,6 7,7 7,7 6,6 6)),((8 8,9 8,9 7,8 7,7 7,7 8,8 8)))", 2, 5, 3.0);
 }
 
 


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