|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71337 - in branches/release/boost/geometry: . algorithms algorithms/detail algorithms/detail/equals algorithms/detail/overlay algorithms/detail/sections arithmetic core domains domains/gis/io/wkt geometries iterators multi policies ranges strategies strategies/cartesian util views
From: barend.gehrels_at_[hidden]
Date: 2011-04-16 19:19:40
Author: barendgehrels
Date: 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
New Revision: 71337
URL: http://svn.boost.org/trac/boost/changeset/71337
Log:
Merged Boost.Geometry from revision 71123 to 71336
Added:
branches/release/boost/geometry/algorithms/convert.hpp
- copied unchanged from r71334, /trunk/boost/geometry/algorithms/convert.hpp
branches/release/boost/geometry/algorithms/detail/assign_values.hpp
- copied unchanged from r71226, /trunk/boost/geometry/algorithms/detail/assign_values.hpp
Removed:
branches/release/boost/geometry/algorithms/detail/convert.hpp
Properties modified:
branches/release/boost/geometry/ (props changed)
branches/release/boost/geometry/algorithms/ (props changed)
branches/release/boost/geometry/arithmetic/ (props changed)
branches/release/boost/geometry/core/ (props changed)
branches/release/boost/geometry/domains/ (props changed)
branches/release/boost/geometry/geometries/ (props changed)
branches/release/boost/geometry/geometry.hpp (contents, props changed)
branches/release/boost/geometry/iterators/ (props changed)
branches/release/boost/geometry/multi/ (props changed)
branches/release/boost/geometry/policies/ (props changed)
branches/release/boost/geometry/ranges/ (props changed)
branches/release/boost/geometry/strategies/ (props changed)
branches/release/boost/geometry/util/ (props changed)
branches/release/boost/geometry/views/ (props changed)
Text files modified:
branches/release/boost/geometry/algorithms/assign.hpp | 494 ++++-----------------------------------
branches/release/boost/geometry/algorithms/centroid.hpp | 6
branches/release/boost/geometry/algorithms/clear.hpp | 4
branches/release/boost/geometry/algorithms/comparable_distance.hpp | 9
branches/release/boost/geometry/algorithms/convex_hull.hpp | 6
branches/release/boost/geometry/algorithms/correct.hpp | 11
branches/release/boost/geometry/algorithms/detail/equals/collect_vectors.hpp | 2
branches/release/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp | 6
branches/release/boost/geometry/algorithms/detail/overlay/convert_ring.hpp | 8
branches/release/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp | 4
branches/release/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp | 4
branches/release/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp | 14
branches/release/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp | 6
branches/release/boost/geometry/algorithms/detail/partition.hpp | 1
branches/release/boost/geometry/algorithms/detail/sections/sectionalize.hpp | 4
branches/release/boost/geometry/algorithms/distance.hpp | 12
branches/release/boost/geometry/algorithms/envelope.hpp | 1
branches/release/boost/geometry/algorithms/equals.hpp | 10
branches/release/boost/geometry/algorithms/expand.hpp | 8
branches/release/boost/geometry/algorithms/length.hpp | 4
branches/release/boost/geometry/algorithms/make.hpp | 64 ++--
branches/release/boost/geometry/algorithms/reverse.hpp | 7
branches/release/boost/geometry/algorithms/simplify.hpp | 4
branches/release/boost/geometry/algorithms/transform.hpp | 21 +
branches/release/boost/geometry/algorithms/unique.hpp | 2
branches/release/boost/geometry/arithmetic/arithmetic.hpp | 82 ++++++
branches/release/boost/geometry/core/closure.hpp | 9
branches/release/boost/geometry/core/coordinate_dimension.hpp | 40 +-
branches/release/boost/geometry/core/coordinate_system.hpp | 13
branches/release/boost/geometry/core/coordinate_type.hpp | 7
branches/release/boost/geometry/core/cs.hpp | 12
branches/release/boost/geometry/core/point_order.hpp | 10
branches/release/boost/geometry/core/point_type.hpp | 7
branches/release/boost/geometry/core/tag.hpp | 8
branches/release/boost/geometry/core/tag_cast.hpp | 24 +
branches/release/boost/geometry/domains/gis/io/wkt/read_wkt.hpp | 8
branches/release/boost/geometry/domains/gis/io/wkt/write_wkt.hpp | 8
branches/release/boost/geometry/geometries/box.hpp | 6
branches/release/boost/geometry/geometry.hpp | 2
branches/release/boost/geometry/iterators/box_iterator.hpp | 4
branches/release/boost/geometry/iterators/segment_range_iterator.hpp | 4
branches/release/boost/geometry/strategies/cartesian/distance_projected_point.hpp | 8
branches/release/boost/geometry/strategies/strategy_transform.hpp | 4
43 files changed, 364 insertions(+), 604 deletions(-)
Modified: branches/release/boost/geometry/algorithms/assign.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/assign.hpp (original)
+++ branches/release/boost/geometry/algorithms/assign.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -25,6 +25,10 @@
#include <boost/numeric/conversion/cast.hpp>
#include <boost/type_traits.hpp>
+#include <boost/geometry/algorithms/detail/assign_values.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
+
+#include <boost/geometry/arithmetic/arithmetic.hpp>
#include <boost/geometry/algorithms/append.hpp>
#include <boost/geometry/algorithms/clear.hpp>
#include <boost/geometry/core/access.hpp>
@@ -40,444 +44,6 @@
namespace boost { namespace geometry
{
-#ifndef DOXYGEN_NO_DETAIL
-namespace detail { namespace assign
-{
-
-template <typename CoordinateType>
-struct assign_operation
-{
- inline assign_operation(CoordinateType const& value)
- : m_value(value)
- {}
-
- template <typename P, std::size_t I>
- inline void apply(P& point) const
- {
- geometry::set<I>(point, m_value);
- }
-
-private:
-
- CoordinateType m_value;
-};
-
-
-/*!
- \brief Assigns all coordinates of a specific point to a value
- \ingroup assign
- \details
- \param p Point
- \param value Value which is assigned to all coordinates of point p
- */
-template <typename Point>
-inline void assign_value(Point& p,
- typename coordinate_type<Point>::type const& value)
-{
- for_each_coordinate(p,
- assign_operation<typename coordinate_type<Point>::type>(value));
-}
-
-
-
-template
-<
- typename Box, std::size_t Index,
- std::size_t Dimension, std::size_t DimensionCount
->
-struct initialize
-{
- typedef typename coordinate_type<Box>::type coordinate_type;
-
- static inline void apply(Box& box, coordinate_type const& value)
- {
- geometry::set<Index, Dimension>(box, value);
- initialize<Box, Index, Dimension + 1, DimensionCount>::apply(box, value);
- }
-};
-
-
-template <typename Box, std::size_t Index, std::size_t DimensionCount>
-struct initialize<Box, Index, DimensionCount, DimensionCount>
-{
- typedef typename coordinate_type<Box>::type coordinate_type;
-
- static inline void apply(Box&, coordinate_type const& )
- {}
-};
-
-
-template <typename Point>
-struct assign_zero_point
-{
- static inline void apply(Point& point)
- {
- typedef typename coordinate_type<Point>::type coordinate_type;
- assign_value(point, 0);
- }
-};
-
-
-template <typename BoxOrSegment>
-struct assign_inverse_box_or_segment
-{
- typedef typename point_type<BoxOrSegment>::type point_type;
-
- static inline void apply(BoxOrSegment& geometry)
- {
- typedef typename coordinate_type<point_type>::type coordinate_type;
-
- typedef typename boost::mpl::if_
- <
- typename boost::is_arithmetic<coordinate_type>::type,
- coordinate_type,
- double
- >::type bound_type;
-
- initialize
- <
- BoxOrSegment, 0, 0, dimension<BoxOrSegment>::type::value
- >::apply(
- geometry, boost::numeric::bounds<bound_type>::highest());
- initialize
- <
- BoxOrSegment, 1, 0, dimension<BoxOrSegment>::type::value
- >::apply(
- geometry, boost::numeric::bounds<bound_type>::lowest());
- }
-};
-
-
-template <typename BoxOrSegment>
-struct assign_zero_box_or_segment
-{
- static inline void apply(BoxOrSegment& geometry)
- {
- typedef typename coordinate_type<BoxOrSegment>::type coordinate_type;
-
- initialize
- <
- BoxOrSegment, 0, 0, dimension<BoxOrSegment>::type::value
- >::apply(geometry, coordinate_type());
- initialize
- <
- BoxOrSegment, 1, 0, dimension<BoxOrSegment>::type::value
- >::apply(geometry, coordinate_type());
- }
-};
-
-
-template
-<
- std::size_t Corner1, std::size_t Corner2,
- typename Box, typename Point
->
-inline void assign_box_2d_corner(Box const& box, Point& point)
-{
- // Be sure both are 2-Dimensional
- assert_dimension<Box, 2>();
- assert_dimension<Point, 2>();
-
- // Copy coordinates
- typedef typename coordinate_type<Point>::type coordinate_type;
-
- geometry::set<0>(point, boost::numeric_cast<coordinate_type>(get<Corner1, 0>(box)));
- geometry::set<1>(point, boost::numeric_cast<coordinate_type>(get<Corner2, 1>(box)));
-}
-
-
-
-template
-<
- typename Geometry, typename Point,
- std::size_t Index,
- std::size_t Dimension, std::size_t DimensionCount
->
-struct assign_point_to_index
-{
-
- static inline void apply(Point const& point, Geometry& geometry)
- {
- geometry::set<Index, Dimension>(geometry, boost::numeric_cast
- <
- typename coordinate_type<Geometry>::type
- >(geometry::get<Dimension>(point)));
-
- assign_point_to_index
- <
- Geometry, Point, Index, Dimension + 1, DimensionCount
- >::apply(point, geometry);
- }
-};
-
-template
-<
- typename Geometry, typename Point,
- std::size_t Index,
- std::size_t DimensionCount
->
-struct assign_point_to_index
- <
- Geometry, Point,
- Index,
- DimensionCount, DimensionCount
- >
-{
- static inline void apply(Point const& , Geometry& )
- {
- }
-};
-
-
-template
-<
- typename Geometry, typename Point,
- std::size_t Index,
- std::size_t Dimension, std::size_t DimensionCount
->
-struct assign_point_from_index
-{
-
- static inline void apply(Geometry const& geometry, Point& point)
- {
- geometry::set<Dimension>( point, boost::numeric_cast
- <
- typename coordinate_type<Geometry>::type
- >(geometry::get<Index, Dimension>(geometry)));
-
- assign_point_from_index
- <
- Geometry, Point, Index, Dimension + 1, DimensionCount
- >::apply(geometry, point);
- }
-};
-
-template
-<
- typename Geometry, typename Point,
- std::size_t Index,
- std::size_t DimensionCount
->
-struct assign_point_from_index
- <
- Geometry, Point,
- Index,
- DimensionCount, DimensionCount
- >
-{
- static inline void apply(Geometry const&, Point&)
- {
- }
-};
-
-
-template <typename Geometry>
-struct assign_2d_box_or_segment
-{
- typedef typename coordinate_type<Geometry>::type coordinate_type;
-
- // Here we assign 4 coordinates to a box of segment
- // -> Most logical is: x1,y1,x2,y2
- // In case the user reverses x1/x2 or y1/y2, for a box, we could reverse them (THAT IS NOT IMPLEMENTED)
-
- template <typename Type>
- static inline void apply(Geometry& geometry,
- Type const& x1, Type const& y1, Type const& x2, Type const& y2)
- {
- geometry::set<0, 0>(geometry, boost::numeric_cast<coordinate_type>(x1));
- geometry::set<0, 1>(geometry, boost::numeric_cast<coordinate_type>(y1));
- geometry::set<1, 0>(geometry, boost::numeric_cast<coordinate_type>(x2));
- geometry::set<1, 1>(geometry, boost::numeric_cast<coordinate_type>(y2));
- }
-};
-
-
-}} // namespace detail::assign
-#endif // DOXYGEN_NO_DETAIL
-
-#ifndef DOXYGEN_NO_DISPATCH
-namespace dispatch
-{
-
-template <typename GeometryTag, typename Geometry, std::size_t DimensionCount>
-struct assign
-{
- BOOST_MPL_ASSERT_MSG
- (
- false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
- , (types<Geometry>)
- );
-};
-
-template <typename Point>
-struct assign<point_tag, Point, 2>
-{
- typedef typename coordinate_type<Point>::type coordinate_type;
-
- template <typename T>
- static inline void apply(Point& point, T const& c1, T const& c2)
- {
- set<0>(point, boost::numeric_cast<coordinate_type>(c1));
- set<1>(point, boost::numeric_cast<coordinate_type>(c2));
- }
-};
-
-template <typename Point>
-struct assign<point_tag, Point, 3>
-{
- typedef typename coordinate_type<Point>::type coordinate_type;
-
- template <typename T>
- static inline void apply(Point& point, T const& c1, T const& c2, T const& c3)
- {
- set<0>(point, boost::numeric_cast<coordinate_type>(c1));
- set<1>(point, boost::numeric_cast<coordinate_type>(c2));
- set<2>(point, boost::numeric_cast<coordinate_type>(c3));
- }
-};
-
-template <typename Box>
-struct assign<box_tag, Box, 2>
- : detail::assign::assign_2d_box_or_segment<Box>
-{};
-
-template <typename Segment>
-struct assign<segment_tag, Segment, 2>
- : detail::assign::assign_2d_box_or_segment<Segment>
-{};
-
-
-
-template <typename GeometryTag, typename Geometry>
-struct assign_zero {};
-
-
-template <typename Point>
-struct assign_zero<point_tag, Point>
- : detail::assign::assign_zero_point<Point>
-{};
-
-template <typename Box>
-struct assign_zero<box_tag, Box>
- : detail::assign::assign_zero_box_or_segment<Box>
-{};
-
-template <typename Segment>
-struct assign_zero<segment_tag, Segment>
- : detail::assign::assign_zero_box_or_segment<Segment>
-{};
-
-
-template <typename GeometryTag, typename Geometry>
-struct assign_inverse {};
-
-template <typename Box>
-struct assign_inverse<box_tag, Box>
- : detail::assign::assign_inverse_box_or_segment<Box>
-{};
-
-template <typename Segment>
-struct assign_inverse<segment_tag, Segment>
- : detail::assign::assign_inverse_box_or_segment<Segment>
-{};
-
-
-} // namespace dispatch
-#endif // DOXYGEN_NO_DISPATCH
-
-
-/*!
-\brief Assign two coordinates to a geometry (usually a 2D point)
-\ingroup assign
-\tparam Geometry \tparam_geometry
-\tparam Type \tparam_numeric to specify the coordinates
-\param geometry \param_geometry
-\param c1 \param_x
-\param c2 \param_y
-
-\qbk{distinguish, 2 coordinate values}
-\qbk{
-[heading Example]
-[assign_2d_point] [assign_2d_point_output]
-
-[heading See also]
-\* [link geometry.reference.algorithms.make.make_2_2_coordinate_values make]
-}
- */
-template <typename Geometry, typename Type>
-inline void assign(Geometry& geometry, Type const& c1, Type const& c2)
-{
- concept::check<Geometry>();
-
- dispatch::assign
- <
- typename tag<Geometry>::type,
- Geometry,
- geometry::dimension<Geometry>::type::value
- >::apply(geometry, c1, c2);
-}
-
-/*!
-\brief Assign three values to a geometry (usually a 3D point)
-\ingroup assign
-\tparam Geometry \tparam_geometry
-\tparam Type \tparam_numeric to specify the coordinates
-\param geometry \param_geometry
-\param c1 \param_x
-\param c2 \param_y
-\param c3 \param_z
-
-\qbk{distinguish, 3 coordinate values}
-\qbk{
-[heading Example]
-[assign_3d_point] [assign_3d_point_output]
-
-[heading See also]
-\* [link geometry.reference.algorithms.make.make_3_3_coordinate_values make]
-}
- */
-template <typename Geometry, typename Type>
-inline void assign(Geometry& geometry,
- Type const& c1, Type const& c2, Type const& c3)
-{
- concept::check<Geometry>();
-
- dispatch::assign
- <
- typename tag<Geometry>::type,
- Geometry,
- geometry::dimension<Geometry>::type::value
- >::apply(geometry, c1, c2, c3);
-}
-
-/*!
-\brief Assign four values to a geometry (usually a box or segment)
-\ingroup assign
-\tparam Geometry \tparam_geometry
-\tparam Type \tparam_numeric to specify the coordinates
-\param geometry \param_geometry
-\param c1 First coordinate (usually x1)
-\param c2 Second coordinate (usually y1)
-\param c3 Third coordinate (usually x2)
-\param c4 Fourth coordinate (usually y2)
-
-\qbk{distinguish, 4 coordinate values}
- */
-template <typename Geometry, typename Type>
-inline void assign(Geometry& geometry,
- Type const& c1, Type const& c2, Type const& c3, Type const& c4)
-{
- concept::check<Geometry>();
-
- dispatch::assign
- <
- typename tag<Geometry>::type,
- Geometry,
- geometry::dimension<Geometry>::type::value
- >::apply(geometry, c1, c2, c3, c4);
-}
-
-
/*!
\brief Assign a range of points to a linestring, ring or polygon
\note The point-type of the range might be different from the point-type of the geometry
@@ -487,20 +53,18 @@
\param geometry \param_geometry
\param range \param_range_point
-\qbk{distinguish, with a range}
\qbk{
[heading Notes]
[note Assign automatically clears the geometry before assigning (use append if you don't want that)]
[heading Example]
-[assign_with_range] [assign_with_range_output]
+[assign_points] [assign_points_output]
[heading See also]
-\* [link geometry.reference.algorithms.make.make_1_with_a_range make]
-\* [link geometry.reference.algorithms.append.append append]
+\* [link geometry.reference.algorithms.append append]
}
*/
template <typename Geometry, typename Range>
-inline void assign(Geometry& geometry, Range const& range)
+inline void assign_points(Geometry& geometry, Range const& range)
{
concept::check<Geometry>();
@@ -559,6 +123,12 @@
}
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail
+{
+// Note: this is moved to namespace detail because the names and parameter orders
+// are not yet 100% clear.
+
/*!
\brief Assign the four points of a 2D box
\ingroup assign
@@ -666,8 +236,46 @@
>::apply(geometry, point);
}
+} // namespace detail
+#endif // DOXYGEN_NO_DETAIL
+
+
+/*!
+\brief Assigns one geometry to another geometry
+\details The assign algorithm assigns one geometry, e.g. a BOX, to another geometry, e.g. a RING. This only
+if it is possible and applicable.
+\ingroup assign
+\tparam Geometry1 \tparam_geometry
+\tparam Geometry2 \tparam_geometry
+\param geometry1 \param_geometry (target)
+\param geometry2 \param_geometry (source)
+
+\qbk{
+[heading Example]
+[assign] [assign_output]
+
+[heading See also]
+\* [link geometry.reference.algorithms.convert convert]
+}
+ */
+template <typename Geometry1, typename Geometry2>
+inline void assign(Geometry1& geometry1, Geometry2 const& geometry2)
+{
+ concept::check_concepts_and_equal_dimensions<Geometry1, Geometry2 const>();
+
+ dispatch::convert
+ <
+ typename tag<Geometry2>::type,
+ typename tag<Geometry1>::type,
+ dimension<Geometry1>::type::value,
+ Geometry2,
+ Geometry1
+ >::apply(geometry2, geometry1);
+}
+
}} // namespace boost::geometry
+
#endif // BOOST_GEOMETRY_ALGORITHMS_ASSIGN_HPP
Modified: branches/release/boost/geometry/algorithms/centroid.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/centroid.hpp (original)
+++ branches/release/boost/geometry/algorithms/centroid.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -28,7 +28,7 @@
#include <boost/geometry/core/interior_rings.hpp>
#include <boost/geometry/core/tag_cast.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/algorithms/distance.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/strategies/centroid.hpp>
@@ -83,7 +83,7 @@
static inline void apply(Point const& point, PointCentroid& centroid,
Strategy const&)
{
- geometry::detail::convert(point, centroid);
+ geometry::convert(point, centroid);
}
};
@@ -163,7 +163,7 @@
else // if (n == 1)
{
// Take over the first point in a "coordinate neutral way"
- geometry::detail::convert(*boost::begin(range), centroid);
+ geometry::convert(*boost::begin(range), centroid);
return false;
}
return true;
Modified: branches/release/boost/geometry/algorithms/clear.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/clear.hpp (original)
+++ branches/release/boost/geometry/algorithms/clear.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -134,7 +134,11 @@
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
+\tparam Geometry \tparam_geometry
+\param geometry \param_geometry which will be cleared
\note points and boxes cannot be cleared, instead they can be set to zero by "assign_zero"
+
+\qbk{[include reference/algorithms/clear.qbk]}
*/
template <typename Geometry>
inline void clear(Geometry& geometry)
Modified: branches/release/boost/geometry/algorithms/comparable_distance.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/comparable_distance.hpp (original)
+++ branches/release/boost/geometry/algorithms/comparable_distance.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -25,13 +25,18 @@
/*!
\brief \brief_calc2{comparable distance measurement}
\ingroup distance
-\details The default strategy is used, belonging to the corresponding coordinate system of the geometries
- and the comparable strategy is used
+\details The free function comparable_distance does not necessarily calculate the distance,
+ but it calculates a distance measure such that two distances are comparable to each other.
+ For example: for the Cartesian coordinate system, Pythagoras is used but the square root
+ is not taken, which makes it faster and the results of two point pairs can still be
+ compared to each other.
\tparam Geometry1 first geometry type
\tparam Geometry2 second geometry type
\param geometry1 \param_geometry
\param geometry2 \param_geometry
\return \return_calc{comparable distance}
+
+\qbk{[include reference/algorithms/comparable_distance.qbk]}
*/
template <typename Geometry1, typename Geometry2>
inline typename default_distance_result<Geometry1, Geometry2>::type comparable_distance(
Modified: branches/release/boost/geometry/algorithms/convex_hull.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/convex_hull.hpp (original)
+++ branches/release/boost/geometry/algorithms/convex_hull.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -152,8 +152,10 @@
\details \details_calc{convex_hull,convex hull}.
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
-\param geometry \param_geometry, used for input
+\param geometry \param_geometry, input geometry
\param hull \param_geometry \param_set{convex hull}
+
+\qbk{[include reference/algorithms/convex_hull.qbk]}
*/
template<typename Geometry1, typename Geometry2>
inline void convex_hull(Geometry1 const& geometry,
@@ -241,8 +243,6 @@
#endif // DOXYGEN_NO_DETAIL
-
-
}} // namespace boost::geometry
Modified: branches/release/boost/geometry/algorithms/correct.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/correct.hpp (original)
+++ branches/release/boost/geometry/algorithms/correct.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -93,7 +93,7 @@
static inline void apply(Box& box)
{
- // Currently only for Cartesian coordinates
+ // Currently only for Cartesian coordinates
// (or spherical without crossing dateline)
// Future version: adapt using strategies
correct_box_loop
@@ -245,10 +245,15 @@
/*!
\brief Corrects a geometry
-\details Corrects a geometry
+\details Corrects a geometry: all rings which are wrongly oriented with respect
+ to their expected orientation are reversed. To all rings which do not have a
+ closing point and are typed as they should have one, the first point is
+ appended. Also boxes can be corrected.
\ingroup correct
\tparam Geometry \tparam_geometry
-\param geometry \param_geometry
+\param geometry \param_geometry which will be corrected if necessary
+
+\qbk{[include reference/algorithms/correct.qbk]}
*/
template <typename Geometry>
inline void correct(Geometry& geometry)
Deleted: branches/release/boost/geometry/algorithms/detail/convert.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/convert.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
+++ (empty file)
@@ -1,274 +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_ALGORITHMS_DETAIL_CONVERT_HPP
-#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_CONVERT_HPP
-
-
-#include <cstddef>
-
-#include <boost/numeric/conversion/cast.hpp>
-#include <boost/range.hpp>
-
-#include <boost/geometry/algorithms/append.hpp>
-#include <boost/geometry/algorithms/assign.hpp>
-#include <boost/geometry/algorithms/for_each.hpp>
-#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
-
-#include <boost/geometry/core/cs.hpp>
-#include <boost/geometry/geometries/concepts/check.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-#ifndef DOXYGEN_NO_DETAIL
-namespace detail { namespace conversion
-{
-
-template
-<
- typename Point,
- typename Box,
- std::size_t Index,
- std::size_t Dimension,
- std::size_t DimensionCount
->
-struct point_to_box
-{
- static inline void apply(Point const& point, Box& box)
- {
- typedef typename coordinate_type<Box>::type coordinate_type;
-
- set<Index, Dimension>(box,
- boost::numeric_cast<coordinate_type>(get<Dimension>(point)));
- point_to_box
- <
- Point, Box,
- Index, Dimension + 1, DimensionCount
- >::apply(point, box);
- }
-};
-
-
-template
-<
- typename Point,
- typename Box,
- std::size_t Index,
- std::size_t DimensionCount
->
-struct point_to_box<Point, Box, Index, DimensionCount, DimensionCount>
-{
- static inline void apply(Point const& , Box& )
- {}
-};
-
-
-}} // namespace detail::conversion
-#endif // DOXYGEN_NO_DETAIL
-
-
-#ifndef DOXYGEN_NO_DISPATCH
-namespace dispatch
-{
-
-template
-<
- typename Tag1, typename Tag2,
- std::size_t DimensionCount,
- typename Geometry1, typename Geometry2
->
-struct convert
-{
-};
-
-
-template
-<
- typename Tag,
- std::size_t DimensionCount,
- typename Geometry1, typename Geometry2
->
-struct convert<Tag, Tag, DimensionCount, Geometry1, Geometry2>
-{
- // Same geometry type -> copy coordinates from G1 to G2
- // Actually: we try now to just copy it
- static inline void apply(Geometry1 const& source, Geometry2& destination)
- {
- destination = source;
- }
-};
-
-
-template
-<
- std::size_t DimensionCount,
- typename Geometry1, typename Geometry2
->
-struct convert<point_tag, point_tag, DimensionCount, Geometry1, Geometry2>
- : detail::conversion::point_to_point<Geometry1, Geometry2, 0, DimensionCount>
-{};
-
-
-template <std::size_t DimensionCount, typename Ring1, typename Ring2>
-struct convert<ring_tag, ring_tag, DimensionCount, Ring1, Ring2>
-{
- static inline void apply(Ring1 const& source, Ring2& destination)
- {
- geometry::clear(destination);
- for (typename boost::range_iterator<Ring1 const>::type it
- = boost::begin(source);
- it != boost::end(source);
- ++it)
- {
- geometry::append(destination, *it);
- }
- }
-};
-
-
-template <typename Box, typename Ring>
-struct convert<box_tag, ring_tag, 2, Box, Ring>
-{
- static inline void apply(Box const& box, Ring& ring)
- {
- // go from box to ring -> add coordinates in correct order
- geometry::clear(ring);
- typename point_type<Box>::type point;
-
- geometry::assign(point, get<min_corner, 0>(box), get<min_corner, 1>(box));
- geometry::append(ring, point);
-
- geometry::assign(point, get<min_corner, 0>(box), get<max_corner, 1>(box));
- geometry::append(ring, point);
-
- geometry::assign(point, get<max_corner, 0>(box), get<max_corner, 1>(box));
- geometry::append(ring, point);
-
- geometry::assign(point, get<max_corner, 0>(box), get<min_corner, 1>(box));
- geometry::append(ring, point);
-
- geometry::assign(point, get<min_corner, 0>(box), get<min_corner, 1>(box));
- geometry::append(ring, point);
- }
-};
-
-
-template <typename Box, typename Polygon>
-struct convert<box_tag, polygon_tag, 2, Box, Polygon>
-{
- static inline void apply(Box const& box, Polygon& polygon)
- {
- typedef typename ring_type<Polygon>::type ring_type;
-
- convert
- <
- box_tag, ring_tag,
- 2, Box, ring_type
- >::apply(box, exterior_ring(polygon));
- }
-};
-
-
-template <typename Point, std::size_t DimensionCount, typename Box>
-struct convert<point_tag, box_tag, DimensionCount, Point, Box>
-{
- static inline void apply(Point const& point, Box& box)
- {
- detail::conversion::point_to_box
- <
- Point, Box, min_corner, 0, DimensionCount
- >::apply(point, box);
- detail::conversion::point_to_box
- <
- Point, Box, max_corner, 0, DimensionCount
- >::apply(point, box);
- }
-};
-
-
-template <typename Ring, std::size_t DimensionCount, typename Polygon>
-struct convert<ring_tag, polygon_tag, DimensionCount, Ring, Polygon>
-{
- static inline void apply(Ring const& ring, Polygon& polygon)
- {
- typedef typename ring_type<Polygon>::type ring_type;
- convert
- <
- ring_tag, ring_tag, DimensionCount,
- Ring, ring_type
- >::apply(ring, exterior_ring(polygon));
- }
-};
-
-
-template <typename Polygon, std::size_t DimensionCount, typename Ring>
-struct convert<polygon_tag, ring_tag, DimensionCount, Polygon, Ring>
-{
- static inline void apply(Polygon const& polygon, Ring& ring)
- {
- typedef typename ring_type<Polygon>::type ring_type;
-
- convert
- <
- ring_tag, ring_tag, DimensionCount,
- ring_type, Ring
- >::apply(exterior_ring(polygon), ring);
- }
-};
-
-
-} // namespace dispatch
-#endif // DOXYGEN_NO_DISPATCH
-
-
-#ifndef DOXYGEN_NO_DETAIL
-namespace detail
-{
-
-/*!
-\brief Converts one geometry to another geometry
-\details The convert algorithm converts one geometry, e.g. a BOX, to another geometry, e.g. a RING. This only
-if it is possible and applicable.
-\ingroup convert
-\tparam Geometry1 \tparam_geometry
-\tparam Geometry2 \tparam_geometry
-\param geometry1 \param_geometry (source)
-\param geometry2 \param_geometry (target)
-\note It is moved to namespace detail because it overlaps functionality
- of assign. So assign will be changed such that it also can convert.
- */
-template <typename Geometry1, typename Geometry2>
-inline void convert(Geometry1 const& geometry1, Geometry2& geometry2)
-{
- concept::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2>();
-
- dispatch::convert
- <
- typename tag<Geometry1>::type,
- typename tag<Geometry2>::type,
- dimension<Geometry1>::type::value,
- Geometry1,
- Geometry2
- >::apply(geometry1, geometry2);
-}
-
-}
-#endif // DOXYGEN_NO_DETAIL
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_CONVERT_HPP
Modified: branches/release/boost/geometry/algorithms/detail/equals/collect_vectors.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/equals/collect_vectors.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/equals/collect_vectors.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -162,7 +162,7 @@
{
typename point_type<Box>::type lower_left, lower_right,
upper_left, upper_right;
- assign_box_corners(box, lower_left, lower_right,
+ geometry::detail::assign_box_corners(box, lower_left, lower_right,
upper_left, upper_right);
typedef typename boost::range_value<Collection>::type item;
Modified: branches/release/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -13,7 +13,7 @@
#include <boost/geometry/algorithms/append.hpp>
#include <boost/geometry/algorithms/clear.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/util/select_coordinate_type.hpp>
#include <boost/geometry/geometries/segment.hpp>
@@ -181,8 +181,8 @@
++previous, ++vertex)
{
point_type p1, p2;
- geometry::detail::convert(*previous, p1);
- geometry::detail::convert(*vertex, p2);
+ geometry::convert(*previous, p1);
+ geometry::convert(*vertex, p2);
// Clip the segment. Five situations:
// 1. Segment is invisible, finish line if any (shouldn't occur)
Modified: branches/release/boost/geometry/algorithms/detail/overlay/convert_ring.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/convert_ring.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/convert_ring.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -19,7 +19,7 @@
#include <boost/geometry/core/interior_rings.hpp>
#include <boost/geometry/algorithms/detail/ring_identifier.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
namespace boost { namespace geometry
@@ -50,7 +50,7 @@
{
if (! append)
{
- geometry::detail::convert(source, destination);
+ geometry::convert(source, destination);
if (reverse)
{
boost::reverse(destination);
@@ -69,7 +69,7 @@
{
if (! append)
{
- geometry::detail::convert(source, exterior_ring(destination));
+ geometry::convert(source, exterior_ring(destination));
if (reverse)
{
boost::reverse(exterior_ring(destination));
@@ -79,7 +79,7 @@
{
interior_rings(destination).resize(
interior_rings(destination).size() + 1);
- geometry::detail::convert(source, interior_rings(destination).back());
+ geometry::convert(source, interior_rings(destination).back());
if (reverse)
{
boost::reverse(interior_rings(destination).back());
Modified: branches/release/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -17,7 +17,7 @@
#include <boost/geometry/core/ring_type.hpp>
#include <boost/geometry/core/exterior_ring.hpp>
#include <boost/geometry/core/interior_rings.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/views/closeable_view.hpp>
#include <boost/geometry/views/reversible_view.hpp>
@@ -71,7 +71,7 @@
rview_type view(cview);
- geometry::detail::convert(*(boost::begin(view) + index), point);
+ geometry::convert(*(boost::begin(view) + index), point);
return true;
}
};
Modified: branches/release/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -12,7 +12,7 @@
#include <cstddef>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
@@ -64,7 +64,7 @@
{
TurnInfo tp;
- geometry::detail::convert(result.template get<0>().intersections[i], tp.point);
+ geometry::convert(result.template get<0>().intersections[i], tp.point);
*out++ = tp;
}
Modified: branches/release/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -14,7 +14,7 @@
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/strategies/intersection.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
@@ -94,7 +94,7 @@
DirInfo const& dir_info)
{
ti.method = method_touch_interior;
- geometry::detail::convert(intersection_info.intersections[0], ti.point);
+ geometry::convert(intersection_info.intersections[0], ti.point);
// Both segments of q touch segment p somewhere in its interior
// 1) We know: if q comes from LEFT or RIGHT
@@ -213,7 +213,7 @@
DirInfo const& dir_info)
{
ti.method = method_touch;
- geometry::detail::convert(intersection_info.intersections[0], ti.point);
+ geometry::convert(intersection_info.intersections[0], ti.point);
int const side_qi_p1 = dir_info.sides.template get<1, 0>();
int const side_qk_p1 = SideStrategy::apply(pi, pj, qk);
@@ -404,7 +404,7 @@
{
ti.method = method_equal;
// Copy the SECOND intersection point
- geometry::detail::convert(intersection_info.intersections[1], ti.point);
+ geometry::convert(intersection_info.intersections[1], ti.point);
int const side_pk_q2 = SideStrategy::apply(qj, qk, pk);
int const side_pk_p = SideStrategy::apply(pi, pj, pk);
@@ -486,7 +486,7 @@
DirInfo const& dir_info)
{
ti.method = method_collinear;
- geometry::detail::convert(intersection_info.intersections[1], ti.point);
+ geometry::convert(intersection_info.intersections[1], ti.point);
int const arrival = dir_info.arrival[0];
// Should not be 0, this is checked before
@@ -585,7 +585,7 @@
// If P arrives within Q, set info on P (which is done above, index=0),
// this turn-info belongs to the second intersection point, index=1
// (see e.g. figure CLO1)
- geometry::detail::convert(intersection_info.intersections[1 - Index], tp.point);
+ geometry::convert(intersection_info.intersections[1 - Index], tp.point);
return true;
}
@@ -661,7 +661,7 @@
DirInfo const& dir_info)
{
ti.method = method_crosses;
- geometry::detail::convert(intersection_info.intersections[0], ti.point);
+ geometry::convert(intersection_info.intersections[0], ti.point);
// In all casees:
// If Q crosses P from left to right
Modified: branches/release/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -21,7 +21,7 @@
#include <boost/geometry/core/point_order.hpp>
#include <boost/geometry/core/reverse_dispatch.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.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>
@@ -65,7 +65,7 @@
for (std::size_t i = 0; i < is.count; i++)
{
PointOut p;
- geometry::detail::convert(is.intersections[i], p);
+ geometry::convert(is.intersections[i], p);
*out++ = p;
}
return out;
@@ -95,7 +95,7 @@
it = boost::begin(turns); it != boost::end(turns); ++it)
{
PointOut p;
- geometry::detail::convert(it->point, p);
+ geometry::convert(it->point, p);
*out++ = p;
}
return out;
Modified: branches/release/boost/geometry/algorithms/detail/partition.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/partition.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/partition.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -10,6 +10,7 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_PARTITION_HPP
#include <vector>
+#include <boost/geometry/algorithms/assign.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/geometry/core/coordinate_type.hpp>
Modified: branches/release/boost/geometry/algorithms/detail/sections/sectionalize.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/detail/sections/sectionalize.hpp (original)
+++ branches/release/boost/geometry/algorithms/detail/sections/sectionalize.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -461,8 +461,10 @@
// (or polygon would be a helper-type).
// Therefore we mimic a linestring/std::vector of 5 points
+ // TODO: might be replaced by assign_box_corners_oriented
+ // or just "convert"
point_type ll, lr, ul, ur;
- assign_box_corners(box, ll, lr, ul, ur);
+ geometry::detail::assign_box_corners(box, ll, lr, ul, ur);
std::vector<point_type> points;
points.push_back(ll);
Modified: branches/release/boost/geometry/algorithms/distance.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/distance.hpp (original)
+++ branches/release/boost/geometry/algorithms/distance.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -78,8 +78,8 @@
>::type segment_strategy;
typename point_type<Segment>::type p[2];
- geometry::assign_point_from_index<0>(segment, p[0]);
- geometry::assign_point_from_index<1>(segment, p[1]);
+ geometry::detail::assign_point_from_index<0>(segment, p[0]);
+ geometry::detail::assign_point_from_index<1>(segment, p[1]);
return segment_strategy.apply(point, p[0], p[1]);
}
};
@@ -419,8 +419,8 @@
{
typename point_type<Segment>::type p[2];
- geometry::assign_point_from_index<0>(segment, p[0]);
- geometry::assign_point_from_index<1>(segment, p[1]);
+ geometry::detail::assign_point_from_index<0>(segment, p[0]);
+ geometry::detail::assign_point_from_index<1>(segment, p[1]);
return strategy.apply(point, p[0], p[1]);
}
};
@@ -523,12 +523,14 @@
/*!
\brief \brief_calc2{distance}
\ingroup distance
-\details The default strategy is used, belonging to the corresponding coordinate system of the geometries
+\details The default strategy is used, corresponding to the coordinate system of the geometries
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
\param geometry1 \param_geometry
\param geometry2 \param_geometry
\return \return_calc{distance}
+
+\qbk{[include reference/algorithms/distance.qbk]}
*/
template <typename Geometry1, typename Geometry2>
inline typename default_distance_result<Geometry1, Geometry2>::type distance(
Modified: branches/release/boost/geometry/algorithms/envelope.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/envelope.hpp (original)
+++ branches/release/boost/geometry/algorithms/envelope.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -19,6 +19,7 @@
#include <boost/numeric/conversion/cast.hpp>
+#include <boost/geometry/algorithms/assign.hpp>
#include <boost/geometry/algorithms/expand.hpp>
#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/core/exterior_ring.hpp>
Modified: branches/release/boost/geometry/algorithms/equals.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/equals.hpp (original)
+++ branches/release/boost/geometry/algorithms/equals.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -271,12 +271,20 @@
/*!
\brief \brief_check{are spatially equal}
+\details \details_check12{equals, is spatially equal}. Spatially equal means
+ that the same point set is included. A box can therefore be spatially equal
+ to a ring or a polygon, or a linestring can be spatially equal to a
+ multi-linestring or a segment. This only theoretically, not all combinations
+ are implemented yet.
\ingroup equals
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
\param geometry1 \param_geometry
\param geometry2 \param_geometry
-\return \return_check2{are spatially disjoint}
+\return \return_check2{are spatially equal}
+
+\qbk{[include reference/algorithms/equals.qbk]}
+
*/
template <typename Geometry1, typename Geometry2>
inline bool equals(Geometry1 const& geometry1, Geometry2 const& geometry2)
Modified: branches/release/boost/geometry/algorithms/expand.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/expand.hpp (original)
+++ branches/release/boost/geometry/algorithms/expand.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -291,12 +291,14 @@
/*!
-\brief Expands a box using the extend (envelope) of another geometry (box, point)
+\brief Expands a box using the bounding box (envelope) of another geometry (box, point)
\ingroup expand
\tparam Box type of the box
\tparam Geometry \tparam_geometry
-\param box box to expand another geometry with, might be changed
-\param geometry \param_geometry
+\param box box to be expanded using another geometry, mutable
+\param geometry \param_geometry geometry which envelope (bounding box) will be added to the box
+
+\qbk{[include reference/algorithms/expand.qbk]}
*/
template <typename Box, typename Geometry>
inline void expand(Box& box, Geometry const& geometry)
Modified: branches/release/boost/geometry/algorithms/length.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/length.hpp (original)
+++ branches/release/boost/geometry/algorithms/length.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -50,8 +50,8 @@
{
typedef typename point_type<Segment>::type point_type;
point_type p1, p2;
- assign_point_from_index<0>(segment, p1);
- assign_point_from_index<1>(segment, p2);
+ geometry::detail::assign_point_from_index<0>(segment, p1);
+ geometry::detail::assign_point_from_index<1>(segment, p2);
return strategy.apply(p1, p2);
}
};
Modified: branches/release/boost/geometry/algorithms/make.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/make.hpp (original)
+++ branches/release/boost/geometry/algorithms/make.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -21,6 +21,40 @@
namespace boost { namespace geometry
{
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail { namespace make
+{
+
+/*!
+\brief Construct a geometry
+\ingroup make
+\tparam Geometry \tparam_geometry
+\tparam Range \tparam_range_point
+\param range \param_range_point
+\return The constructed geometry, here: a linestring or a ring
+
+\qbk{distinguish, with a range}
+\qbk{
+[heading Example]
+[make_with_range] [make_with_range_output]
+
+[heading See also]
+\* [link geometry.reference.algorithms.assign.assign_points assign]
+}
+ */
+template <typename Geometry, typename Range>
+inline Geometry make_points(Range const& range)
+{
+ concept::check<Geometry>();
+
+ Geometry geometry;
+ geometry::append(geometry, range);
+ return geometry;
+}
+
+}} // namespace detail::make
+#endif // DOXYGEN_NO_DETAIL
+
/*!
\brief Construct a geometry
\ingroup make
@@ -38,7 +72,7 @@
[make_2d_point] [make_2d_point_output]
[heading See also]
-\* [link geometry.reference.algorithms.assign.assign_3_2_coordinate_values assign]
+\* [link geometry.reference.algorithms.assign.assign_values_3_2_coordinate_values assign]
}
*/
template <typename Geometry, typename Type>
@@ -72,7 +106,7 @@
[make_3d_point] [make_3d_point_output]
[heading See also]
-\* [link geometry.reference.algorithms.assign.assign_4_3_coordinate_values assign]
+\* [link geometry.reference.algorithms.assign.assign_values_4_3_coordinate_values assign]
}
*/
template <typename Geometry, typename Type>
@@ -107,32 +141,6 @@
-/*!
-\brief Construct a geometry
-\ingroup make
-\tparam Geometry \tparam_geometry
-\tparam Range \tparam_range_point
-\param range \param_range_point
-\return The constructed geometry, here: a linestring or a ring
-
-\qbk{distinguish, with a range}
-\qbk{
-[heading Example]
-[make_with_range] [make_with_range_output]
-
-[heading See also]
-\* [link geometry.reference.algorithms.assign.assign_2_with_a_range assign]
-}
- */
-template <typename Geometry, typename Range>
-inline Geometry make(Range const& range)
-{
- concept::check<Geometry>();
-
- Geometry geometry;
- append(geometry, range);
- return geometry;
-}
/*!
Modified: branches/release/boost/geometry/algorithms/reverse.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/reverse.hpp (original)
+++ branches/release/boost/geometry/algorithms/reverse.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -106,10 +106,15 @@
/*!
-\brief Reverses a geometry
+\brief Reverses the points within a geometry
+\details Generic function to reverse a geometry. It resembles the std::reverse
+ functionality, but it takes the geometry type into account. Only for a ring
+ or for a linestring it is the same as the std::reverse.
\ingroup reverse
\tparam Geometry \tparam_geometry
\param geometry \param_geometry which will be reversed
+
+\qbk{[include reference/algorithms/reverse.qbk]}
*/
template <typename Geometry>
inline void reverse(Geometry& geometry)
Modified: branches/release/boost/geometry/algorithms/simplify.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/simplify.hpp (original)
+++ branches/release/boost/geometry/algorithms/simplify.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -32,7 +32,7 @@
#include <boost/geometry/strategies/concepts/simplify_concept.hpp>
#include <boost/geometry/algorithms/clear.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/algorithms/num_interior_rings.hpp>
@@ -181,7 +181,7 @@
static inline void apply(Point const& point, Point& out,
Distance const& max_distance, Strategy const& strategy)
{
- geometry::detail::convert(point, out);
+ geometry::convert(point, out);
}
};
Modified: branches/release/boost/geometry/algorithms/transform.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/transform.hpp (original)
+++ branches/release/boost/geometry/algorithms/transform.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -101,15 +101,15 @@
typedef typename point_type<Geometry2>::type point_type2;
point_type1 source_point[2];
- assign_point_from_index<0>(source, source_point[0]);
- assign_point_from_index<1>(source, source_point[1]);
+ geometry::detail::assign_point_from_index<0>(source, source_point[0]);
+ geometry::detail::assign_point_from_index<1>(source, source_point[1]);
point_type2 target_point[2];
if (strategy.apply(source_point[0], target_point[0])
&& strategy.apply(source_point[1], target_point[1]))
{
- assign_point_to_index<0>(target_point[0], target);
- assign_point_to_index<1>(target_point[1], target);
+ geometry::detail::assign_point_to_index<0>(target_point[0], target);
+ geometry::detail::assign_point_to_index<1>(target_point[1], target);
return true;
}
return false;
@@ -289,14 +289,19 @@
/*!
-\brief Transforms from one geometry to another geometry using a strategy
+\brief Transforms from one geometry to another geometry \brief_strategy
\ingroup transform
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
\tparam Strategy strategy
\param geometry1 \param_geometry
\param geometry2 \param_geometry
-\param strategy the strategy to be used for transformation
+\param strategy The strategy to be used for transformation
+\return True if the transformation could be done
+
+\qbk{distinguish,with strategy}
+
+\qbk{[include reference/algorithms/transform_with_strategy.qbk]}
*/
template <typename Geometry1, typename Geometry2, typename Strategy>
inline bool transform(Geometry1 const& geometry1, Geometry2& geometry2,
@@ -325,7 +330,9 @@
\tparam Geometry2 \tparam_geometry
\param geometry1 \param_geometry
\param geometry2 \param_geometry
-\return true if the transformation could be done
+\return True if the transformation could be done
+
+\qbk{[include reference/algorithms/transform.qbk]}
*/
template <typename Geometry1, typename Geometry2>
inline bool transform(Geometry1 const& geometry1, Geometry2& geometry2)
Modified: branches/release/boost/geometry/algorithms/unique.hpp
==============================================================================
--- branches/release/boost/geometry/algorithms/unique.hpp (original)
+++ branches/release/boost/geometry/algorithms/unique.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -124,6 +124,8 @@
\details \details_calc{unique,minimal set (where duplicate consecutive points are removed)}.
\tparam Geometry \tparam_geometry
\param geometry \param_geometry which will be made unique
+
+\qbk{[include reference/algorithms/unique.qbk]}
*/
template <typename Geometry>
inline void unique(Geometry& geometry)
Modified: branches/release/boost/geometry/arithmetic/arithmetic.hpp
==============================================================================
--- branches/release/boost/geometry/arithmetic/arithmetic.hpp (original)
+++ branches/release/boost/geometry/arithmetic/arithmetic.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -31,6 +31,7 @@
namespace detail
{
+
template <typename P>
struct param
{
@@ -40,6 +41,7 @@
>::param_type type;
};
+
template <typename C, template <typename> class Function>
struct value_operation
{
@@ -74,11 +76,45 @@
}
};
+
+template <typename C>
+struct value_assignment
+{
+ C m_value;
+
+ inline value_assignment(C const &value)
+ : m_value(value)
+ {}
+
+ template <typename P, int I>
+ inline void apply(P& point) const
+ {
+ set<I>(point, m_value);
+ }
+};
+
+template <typename PointSrc>
+struct point_assignment
+{
+ PointSrc const& m_source_point;
+
+ inline point_assignment(PointSrc const& point)
+ : m_source_point(point)
+ {}
+
+ template <typename PointDst, int I>
+ inline void apply(PointDst& dest_point) const
+ {
+ set<I>(dest_point, get<I>(m_source_point));
+ }
+};
+
+
} // namespace detail
#endif // DOXYGEN_NO_DETAIL
/*!
- \brief Adds a value to each coordinate of a point
+ \brief Adds the same value to each coordinate of a point
\ingroup arithmetic
\details
\param p point
@@ -110,7 +146,7 @@
}
/*!
- \brief Subtracts a value to each coordinate of a point
+ \brief Subtracts the same value to each coordinate of a point
\ingroup arithmetic
\details
\param p point
@@ -142,7 +178,7 @@
}
/*!
- \brief Multiplies each coordinate of a point by a value
+ \brief Multiplies each coordinate of a point by the same value
\ingroup arithmetic
\details
\param p point
@@ -159,7 +195,7 @@
/*!
\brief Multiplies a point by another
\ingroup arithmetic
- \details The coordinates of the second point will be multiplied by those of the first point.
+ \details The coordinates of the first point will be multiplied by those of the second point.
The second point is not modified.
\param p1 first point
\param p2 second point
@@ -175,7 +211,7 @@
}
/*!
- \brief Divides each coordinate of a point by a value
+ \brief Divides each coordinate of the same point by a value
\ingroup arithmetic
\details
\param p point
@@ -192,7 +228,7 @@
/*!
\brief Divides a point by another
\ingroup arithmetic
- \details The coordinates of the second point will be divided by those of the first point.
+ \details The coordinates of the first point will be divided by those of the second point.
The second point is not modified.
\param p1 first point
\param p2 second point
@@ -206,6 +242,40 @@
for_each_coordinate(p1, detail::point_operation<Point2, std::divides>(p2));
}
+/*!
+ \brief Assign each coordinate of a point the same value
+ \ingroup arithmetic
+ \details
+ \param p point
+ \param value value to assign
+ */
+template <typename Point>
+inline void assign_value(Point& p, typename detail::param<Point>::type value)
+{
+ BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+
+ for_each_coordinate(p, detail::value_assignment<typename coordinate_type<Point>::type>(value));
+}
+
+/*!
+ \brief Assign a point with another
+ \ingroup arithmetic
+ \details The coordinates of the first point will be assigned those of the second point.
+ The second point is not modified.
+ \param p1 first point
+ \param p2 second point
+ */
+template <typename Point1, typename Point2>
+inline void assign_point(Point1& p1, const Point2& p2)
+{
+ BOOST_CONCEPT_ASSERT( (concept::Point<Point2>) );
+ BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) );
+
+ for_each_coordinate(p1, detail::point_assignment<Point2>(p2));
+}
+
+
}} // namespace boost::geometry
+
#endif // BOOST_GEOMETRY_ARITHMETIC_ARITHMETIC_HPP
Modified: branches/release/boost/geometry/core/closure.hpp
==============================================================================
--- branches/release/boost/geometry/core/closure.hpp (original)
+++ branches/release/boost/geometry/core/closure.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -149,14 +149,11 @@
/*!
-\brief Meta-function which defines closure of a geometry type
+\brief \brief_meta{value, closure (clockwise\, counterclockwise), \meta_geometry_type}
+\tparam Geometry \tparam_geometry
\ingroup core
-\details
-\qbk{
-[heading See also]
-[link geometry.reference.enumerations.order_selector The order_selector enumeration]
-}
+\qbk{[include reference/core/closure.qbk]}
*/
template <typename Geometry>
struct closure
Modified: branches/release/boost/geometry/core/coordinate_dimension.hpp
==============================================================================
--- branches/release/boost/geometry/core/coordinate_dimension.hpp (original)
+++ branches/release/boost/geometry/core/coordinate_dimension.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -22,7 +22,6 @@
#include <boost/static_assert.hpp>
#include <boost/type_traits/remove_const.hpp>
-#include <boost/geometry/core/coordinate_dimension.hpp>
#include <boost/geometry/core/point_type.hpp>
namespace boost { namespace geometry
@@ -65,53 +64,56 @@
#endif
/*!
- \brief Meta-function which defines coordinate dimensions, i.e. the number of axes of any geometry
- \ingroup core
+\brief \brief_meta{value, number of coordinates (the number of axes of any geometry), \meta_point_type}
+\tparam Geometry \tparam_geometry
+\ingroup core
+
+\qbk{[include reference/core/coordinate_dimension.qbk]}
*/
-template <typename G>
+template <typename Geometry>
struct dimension
: core_dispatch::dimension
<
- typename tag<G>::type,
- typename boost::remove_const<G>::type
+ typename tag<Geometry>::type,
+ typename boost::remove_const<Geometry>::type
>
{};
/*!
- \brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected
- \ingroup utility
+\brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected
+\ingroup utility
*/
-template <typename G, int D>
+template <typename Geometry, int Dimensions>
inline void assert_dimension()
{
BOOST_STATIC_ASSERT((
boost::mpl::equal_to
<
- geometry::dimension<G>,
- boost::mpl::int_<D>
+ geometry::dimension<Geometry>,
+ boost::mpl::int_<Dimensions>
>::type::value
));
}
/*!
- \brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected
- \ingroup utility
+\brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected
+\ingroup utility
*/
-template <typename G, int D>
+template <typename Geometry, int Dimensions>
inline void assert_dimension_less_equal()
{
- BOOST_STATIC_ASSERT(( dimension<G>::type::value <= D ));
+ BOOST_STATIC_ASSERT(( dimension<Geometry>::type::value <= Dimensions ));
}
-template <typename G, int D>
+template <typename Geometry, int Dimensions>
inline void assert_dimension_greater_equal()
{
- BOOST_STATIC_ASSERT(( dimension<G>::type::value >= D ));
+ BOOST_STATIC_ASSERT(( dimension<Geometry>::type::value >= Dimensions ));
}
/*!
- \brief assert_dimension_equal, enables compile-time checking if coordinate dimensions of two geometries are equal
- \ingroup utility
+\brief assert_dimension_equal, enables compile-time checking if coordinate dimensions of two geometries are equal
+\ingroup utility
*/
template <typename G1, typename G2>
inline void assert_dimension_equal()
Modified: branches/release/boost/geometry/core/coordinate_system.hpp
==============================================================================
--- branches/release/boost/geometry/core/coordinate_system.hpp (original)
+++ branches/release/boost/geometry/core/coordinate_system.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -73,16 +73,19 @@
/*!
- \brief Meta-function which defines coordinate system for any geometry
- \ingroup core
+\brief \brief_meta{type, coordinate system (cartesian\, spherical\, etc), \meta_point_type}
+\tparam Geometry \tparam_geometry
+\ingroup core
+
+\qbk{[include reference/core/coordinate_system.qbk]}
*/
-template <typename G>
+template <typename Geometry>
struct coordinate_system
{
- typedef typename boost::remove_const<G>::type ncg;
+ typedef typename boost::remove_const<Geometry>::type ncg;
typedef typename core_dispatch::coordinate_system
<
- typename tag<G>::type,
+ typename tag<Geometry>::type,
ncg
>::type type;
};
Modified: branches/release/boost/geometry/core/coordinate_type.hpp
==============================================================================
--- branches/release/boost/geometry/core/coordinate_type.hpp (original)
+++ branches/release/boost/geometry/core/coordinate_type.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -70,8 +70,11 @@
#endif // DOXYGEN_NO_DISPATCH
/*!
- \brief Meta-function which defines coordinate type (int, float, double, etc) of any geometry
- \ingroup core
+\brief \brief_meta{type, coordinate type (int\, float\, double\, etc), \meta_point_type}
+\tparam Geometry \tparam_geometry
+\ingroup core
+
+\qbk{[include reference/core/coordinate_type.qbk]}
*/
template <typename Geometry>
struct coordinate_type
Modified: branches/release/boost/geometry/core/cs.hpp
==============================================================================
--- branches/release/boost/geometry/core/cs.hpp (original)
+++ branches/release/boost/geometry/core/cs.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -27,16 +27,20 @@
/*!
\brief Unit of plane angle: Degrees
-\ingroup cs
-\note Might be replaced by Boost.Units
+\details Tag defining the unit of plane angle for spherical coordinate systems.
+ This tag specifies that coordinates are defined in degrees (-180 .. 180).
+ It has to be specified for some coordinate systems.
+\qbk{[include reference/core/degree_radian.qbk]}
*/
struct degree {};
/*!
\brief Unit of plane angle: Radians
-\ingroup cs
-\note Might be replaced by Boost.Units
+\details Tag defining the unit of plane angle for spherical coordinate systems.
+ This tag specifies that coordinates are defined in radians (-PI .. PI).
+ It has to be specified for some coordinate systems.
+\qbk{[include reference/core/degree_radian.qbk]}
*/
struct radian {};
Modified: branches/release/boost/geometry/core/point_order.hpp
==============================================================================
--- branches/release/boost/geometry/core/point_order.hpp (original)
+++ branches/release/boost/geometry/core/point_order.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -138,19 +138,15 @@
/*!
-\brief Metafunction which defines point order of a geometry type
+\brief \brief_meta{value, point order (clockwise\, counterclockwise), \meta_geometry_type}
+\tparam Geometry \tparam_geometry
\ingroup core
-\details
-\qbk{
-[heading See also]
-[link geometry.reference.enumerations.closure_selector The closure_selector enumeration]
-}
+\qbk{[include reference/core/point_order.qbk]}
*/
template <typename Geometry>
struct point_order
{
- /// metafunction implementation
static const order_selector value = core_dispatch::point_order
<
typename tag<Geometry>::type,
Modified: branches/release/boost/geometry/core/point_type.hpp
==============================================================================
--- branches/release/boost/geometry/core/point_type.hpp (original)
+++ branches/release/boost/geometry/core/point_type.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -106,8 +106,11 @@
/*!
- \brief Meta-function which defines point type of any geometry
- \ingroup core
+\brief \brief_meta{type, point_type, \meta_geometry_type}
+\tparam Geometry \tparam_geometry
+\ingroup core
+
+\qbk{[include reference/core/point_type.qbk]}
*/
template <typename Geometry>
struct point_type
Modified: branches/release/boost/geometry/core/tag.hpp
==============================================================================
--- branches/release/boost/geometry/core/tag.hpp (original)
+++ branches/release/boost/geometry/core/tag.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -48,11 +48,11 @@
/*!
-\brief Meta-function to get the tag of any geometry type
-\details All geometries tell their geometry type (point, linestring, polygon, etc) by implementing
- a tag traits class. This meta-function uses that traits class to retrieve the tag.
-\tparam Geometry geometry
+\brief \brief_meta{type, tag, \meta_geometry_type}
+\tparam Geometry \tparam_geometry
\ingroup core
+
+\qbk{[include reference/core/tag.qbk]}
*/
template <typename Geometry>
struct tag
Modified: branches/release/boost/geometry/core/tag_cast.hpp
==============================================================================
--- branches/release/boost/geometry/core/tag_cast.hpp (original)
+++ branches/release/boost/geometry/core/tag_cast.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -21,7 +21,25 @@
namespace boost { namespace geometry
{
-/// Generic tag_cast utility
+/*!
+\brief Metafunction defining a type being either the specified tag, or one
+ of the specified basetags if the type inherits from them.
+\details Tags can inherit each other. A multi_point inherits, for example,
+ both the multi_tag and the pointlike tag. Often behaviour can be shared
+ between different geometry types. A tag, found by the metafunction tag,
+ can be casted to a more basic tag, and then dispatched by that tag.
+\ingroup core
+\tparam Tag The tag to be casted to one of the base tags
+\tparam BaseTag First base tag
+\tparam BaseTag2 Optional second base tag
+\tparam BaseTag3 Optional third base tag
+\tparam BaseTag4 Optional fourth base tag
+\tparam BaseTag5 Optional fifth base tag
+\tparam BaseTag6 Optional sixth base tag
+\tparam BaseTag7 Optional seventh base tag
+
+\qbk{[include reference/core/tag_cast.qbk]}
+*/
template
<
typename Tag,
@@ -48,6 +66,8 @@
>::type type;
};
+#ifndef DOXYGEN_NO_SPECIALIZATIONS
+
// Specialization for last one
template <typename Tag>
struct tag_cast<Tag, void, void, void, void, void, void, void>
@@ -56,6 +76,8 @@
typedef Tag type;
};
+#endif // DOXYGEN_NO_SPECIALIZATIONS
+
}} // namespace boost::geometry
Modified: branches/release/boost/geometry/domains/gis/io/wkt/read_wkt.hpp
==============================================================================
--- branches/release/boost/geometry/domains/gis/io/wkt/read_wkt.hpp (original)
+++ branches/release/boost/geometry/domains/gis/io/wkt/read_wkt.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -531,8 +531,8 @@
throw read_wkt_exception("Box should have 2,4 or 5 points", wkt);
}
- assign_point_to_index<min_corner>(points.front(), box);
- assign_point_to_index<max_corner>(points[index], box);
+ geometry::detail::assign_point_to_index<min_corner>(points.front(), box);
+ geometry::detail::assign_point_to_index<max_corner>(points[index], box);
}
};
@@ -570,8 +570,8 @@
if (boost::size(points) == 2)
{
- assign_point_to_index<0>(points.front(), segment);
- assign_point_to_index<1>(points.back(), segment);
+ geometry::detail::assign_point_to_index<0>(points.front(), segment);
+ geometry::detail::assign_point_to_index<1>(points.back(), segment);
}
else
{
Modified: branches/release/boost/geometry/domains/gis/io/wkt/write_wkt.hpp
==============================================================================
--- branches/release/boost/geometry/domains/gis/io/wkt/write_wkt.hpp (original)
+++ branches/release/boost/geometry/domains/gis/io/wkt/write_wkt.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -24,7 +24,7 @@
#include <boost/geometry/algorithms/assign.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/core/exterior_ring.hpp>
#include <boost/geometry/core/interior_rings.hpp>
#include <boost/geometry/core/ring_type.hpp>
@@ -199,7 +199,7 @@
// Convert to ring, then stream
typedef model::ring<point_type> ring_type;
ring_type ring;
- geometry::detail::convert(box, ring);
+ geometry::convert(box, ring);
os << "POLYGON(";
wkt_sequence<ring_type>::apply(os, ring);
os << ")";
@@ -228,8 +228,8 @@
typedef boost::array<point_type, 2> sequence;
sequence points;
- assign_point_from_index<0>(segment, points[0]);
- assign_point_from_index<1>(segment, points[1]);
+ geometry::detail::assign_point_from_index<0>(segment, points[0]);
+ geometry::detail::assign_point_from_index<1>(segment, points[1]);
// In Boost.Geometry a segment is represented
// in WKT-format like (for 2D): LINESTRING(x y,x y)
Modified: branches/release/boost/geometry/geometries/box.hpp
==============================================================================
--- branches/release/boost/geometry/geometries/box.hpp (original)
+++ branches/release/boost/geometry/geometries/box.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -18,7 +18,7 @@
#include <boost/concept/assert.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/geometries/concepts/point_concept.hpp>
@@ -57,8 +57,8 @@
*/
inline box(Point const& min_corner, Point const& max_corner)
{
- geometry::detail::convert(min_corner, m_min_corner);
- geometry::detail::convert(max_corner, m_max_corner);
+ geometry::convert(min_corner, m_min_corner);
+ geometry::convert(max_corner, m_max_corner);
}
inline Point const& min_corner() const { return m_min_corner; }
Modified: branches/release/boost/geometry/geometry.hpp
==============================================================================
--- branches/release/boost/geometry/geometry.hpp (original)
+++ branches/release/boost/geometry/geometry.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -19,6 +19,7 @@
#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/core/tag.hpp>
+#include <boost/geometry/core/tag_cast.hpp>
#include <boost/geometry/core/tags.hpp>
// Core algorithms
@@ -42,6 +43,7 @@
#include <boost/geometry/algorithms/clear.hpp>
#include <boost/geometry/algorithms/convex_hull.hpp>
#include <boost/geometry/algorithms/correct.hpp>
+#include <boost/geometry/algorithms/comparable_distance.hpp>
#include <boost/geometry/algorithms/difference.hpp>
#include <boost/geometry/algorithms/distance.hpp>
#include <boost/geometry/algorithms/envelope.hpp>
Modified: branches/release/boost/geometry/iterators/box_iterator.hpp
==============================================================================
--- branches/release/boost/geometry/iterators/box_iterator.hpp (original)
+++ branches/release/boost/geometry/iterators/box_iterator.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -95,9 +95,7 @@
inline void init(Box const& box)
{
- // asb -> lower_left, lower_right, upper_left, upper_right
- // we want: clockwise
- assign_box_corners(box, m_points[0], m_points[3], m_points[1], m_points[2]);
+ detail::assign_box_corners_oriented<false>(box, m_points);
}
// Copy points here - box might define them otherwise
Modified: branches/release/boost/geometry/iterators/segment_range_iterator.hpp
==============================================================================
--- branches/release/boost/geometry/iterators/segment_range_iterator.hpp (original)
+++ branches/release/boost/geometry/iterators/segment_range_iterator.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -115,8 +115,8 @@
inline void init(Segment const& segment)
{
- assign_point_from_index<0>(segment, m_points[0]);
- assign_point_from_index<1>(segment, m_points[1]);
+ geometry::detail::assign_point_from_index<0>(segment, m_points[0]);
+ geometry::detail::assign_point_from_index<1>(segment, m_points[1]);
}
// We HAVE TO copy the points, because a segment does not need
Modified: branches/release/boost/geometry/strategies/cartesian/distance_projected_point.hpp
==============================================================================
--- branches/release/boost/geometry/strategies/cartesian/distance_projected_point.hpp (original)
+++ branches/release/boost/geometry/strategies/cartesian/distance_projected_point.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -22,7 +22,7 @@
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/point_type.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/arithmetic/arithmetic.hpp>
#include <boost/geometry/arithmetic/dot_product.hpp>
@@ -132,8 +132,8 @@
// For consistency we define w also in FP
fp_vector_type v, w;
- geometry::detail::convert(p2, v);
- geometry::detail::convert(p, w);
+ geometry::convert(p2, v);
+ geometry::convert(p, w);
subtract_point(v, p1);
subtract_point(w, p1);
@@ -163,7 +163,7 @@
>::apply(strategy);
fp_point_type projected;
- geometry::detail::convert(p1, projected);
+ geometry::convert(p1, projected);
multiply_value(v, b);
add_point(projected, v);
Modified: branches/release/boost/geometry/strategies/strategy_transform.hpp
==============================================================================
--- branches/release/boost/geometry/strategies/strategy_transform.hpp (original)
+++ branches/release/boost/geometry/strategies/strategy_transform.hpp 2011-04-16 19:19:36 EDT (Sat, 16 Apr 2011)
@@ -20,7 +20,7 @@
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/geometry/algorithms/detail/convert.hpp>
+#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/arithmetic/arithmetic.hpp>
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/coordinate_dimension.hpp>
@@ -104,7 +104,7 @@
// Defensive check, dimensions are equal, selected by specialization
assert_dimension_equal<P1, P2>();
- geometry::detail::convert(p1, p2);
+ geometry::convert(p1, p2);
return true;
}
};
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