|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70853 - in trunk/boost/geometry: algorithms algorithms/detail/equals algorithms/detail/overlay algorithms/detail/sections core domains/gis/io/wkt extensions/algorithms extensions/algorithms/detail/overlay extensions/index/rtree geometries multi/algorithms strategies strategies/agnostic strategies/cartesian strategies/spherical
From: barend.gehrels_at_[hidden]
Date: 2011-04-02 09:29:25
Author: barendgehrels
Date: 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
New Revision: 70853
URL: http://svn.boost.org/trac/boost/changeset/70853
Log:
Renamed distance_result to default_distance_result, same for area/length
For within, using tag_cast now like done in centroid
Obsoleted is_linear
Small comment changes
Added:
trunk/boost/geometry/extensions/algorithms/detail/overlay/msm_state.hpp
- copied unchanged from r70836, /trunk/boost/geometry/algorithms/detail/overlay/msm_state.hpp
trunk/boost/geometry/strategies/default_area_result.hpp
- copied, changed from r70836, /trunk/boost/geometry/strategies/area_result.hpp
trunk/boost/geometry/strategies/default_distance_result.hpp
- copied, changed from r70836, /trunk/boost/geometry/strategies/distance_result.hpp
trunk/boost/geometry/strategies/default_length_result.hpp
- copied, changed from r70836, /trunk/boost/geometry/strategies/length_result.hpp
Removed:
trunk/boost/geometry/algorithms/detail/overlay/msm_state.hpp
trunk/boost/geometry/core/is_linear.hpp
trunk/boost/geometry/geometries/linear_ring.hpp
trunk/boost/geometry/strategies/area_result.hpp
trunk/boost/geometry/strategies/distance_result.hpp
trunk/boost/geometry/strategies/length_result.hpp
Text files modified:
trunk/boost/geometry/algorithms/area.hpp | 8 ++++----
trunk/boost/geometry/algorithms/centroid.hpp | 1 +
trunk/boost/geometry/algorithms/clear.hpp | 2 +-
trunk/boost/geometry/algorithms/comparable_distance.hpp | 2 +-
trunk/boost/geometry/algorithms/correct.hpp | 14 ++++++++------
trunk/boost/geometry/algorithms/detail/equals/collect_vectors.hpp | 2 --
trunk/boost/geometry/algorithms/detail/overlay/assign_parents.hpp | 2 +-
trunk/boost/geometry/algorithms/detail/overlay/enrichment_info.hpp | 4 ++--
trunk/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp | 8 +++++++-
trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp | 4 ++--
trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp | 6 +++---
trunk/boost/geometry/algorithms/detail/overlay/ring_properties.hpp | 2 +-
trunk/boost/geometry/algorithms/detail/overlay/segment_identifier.hpp | 1 -
trunk/boost/geometry/algorithms/detail/sections/sectionalize.hpp | 1 -
trunk/boost/geometry/algorithms/distance.hpp | 18 +++++++-----------
trunk/boost/geometry/algorithms/expand.hpp | 1 -
trunk/boost/geometry/algorithms/length.hpp | 12 ++++++------
trunk/boost/geometry/algorithms/make.hpp | 2 +-
trunk/boost/geometry/algorithms/num_points.hpp | 1 -
trunk/boost/geometry/algorithms/perimeter.hpp | 10 +++++-----
trunk/boost/geometry/algorithms/within.hpp | 4 +++-
trunk/boost/geometry/core/is_areal.hpp | 2 +-
trunk/boost/geometry/core/point_type.hpp | 2 +-
trunk/boost/geometry/core/ring_type.hpp | 2 +-
trunk/boost/geometry/domains/gis/io/wkt/write_wkt.hpp | 6 +++---
trunk/boost/geometry/extensions/algorithms/connect.hpp | 6 +++---
trunk/boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp | 2 +-
trunk/boost/geometry/extensions/index/rtree/helpers.hpp | 2 +-
trunk/boost/geometry/multi/algorithms/envelope.hpp | 2 +-
trunk/boost/geometry/multi/algorithms/length.hpp | 2 +-
trunk/boost/geometry/multi/algorithms/perimeter.hpp | 2 +-
trunk/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp | 40 +++-------------------------------------
trunk/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp | 2 +-
trunk/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp | 6 +++---
trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp | 2 +-
trunk/boost/geometry/strategies/cartesian/distance_pythagoras.hpp | 1 -
trunk/boost/geometry/strategies/default_area_result.hpp | 20 ++++++++------------
trunk/boost/geometry/strategies/default_distance_result.hpp | 20 ++++++++------------
trunk/boost/geometry/strategies/default_length_result.hpp | 8 ++++----
trunk/boost/geometry/strategies/spherical/distance_haversine.hpp | 1 -
trunk/boost/geometry/strategies/within.hpp | 7 -------
41 files changed, 95 insertions(+), 145 deletions(-)
Modified: trunk/boost/geometry/algorithms/area.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/area.hpp (original)
+++ trunk/boost/geometry/algorithms/area.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -32,7 +32,7 @@
#include <boost/geometry/algorithms/detail/calculate_sum.hpp>
#include <boost/geometry/strategies/area.hpp>
-#include <boost/geometry/strategies/area_result.hpp>
+#include <boost/geometry/strategies/default_area_result.hpp>
#include <boost/geometry/strategies/concepts/area_concept.hpp>
@@ -89,8 +89,8 @@
// Ignore warning (because using static method sometimes) on strategy
boost::ignore_unused_variable_warning(strategy);
- // An open linear_ring has at least three points,
- // A closed linear_ring has at least four points,
+ // An open ring has at least three points,
+ // A closed ring has at least four points,
// if not, there is no (zero) area
if (boost::size(ring)
< core_detail::closure::minimum_ring_size<Closure>::value)
@@ -223,7 +223,7 @@
\qbk{[area] [area_output]}
*/
template <typename Geometry>
-inline typename area_result<Geometry>::type area(Geometry const& geometry)
+inline typename default_area_result<Geometry>::type area(Geometry const& geometry)
{
concept::check<Geometry const>();
Modified: trunk/boost/geometry/algorithms/centroid.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/centroid.hpp (original)
+++ trunk/boost/geometry/algorithms/centroid.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -26,6 +26,7 @@
#include <boost/geometry/core/exception.hpp>
#include <boost/geometry/core/exterior_ring.hpp>
#include <boost/geometry/core/interior_rings.hpp>
+#include <boost/geometry/core/tag_cast.hpp>
#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/algorithms/distance.hpp>
Modified: trunk/boost/geometry/algorithms/clear.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/clear.hpp (original)
+++ trunk/boost/geometry/algorithms/clear.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -128,7 +128,7 @@
/*!
-\brief Clears a linestring, linear ring or polygon (exterior+interiors) or multi*
+\brief Clears a linestring, ring or polygon (exterior+interiors) or multi*
\details Generic function to clear a geometry. All points will be removed from the collection or collections
making up the geometry. In most cases this is equivalent to the .clear() method of a std::vector<...>. In
the case of a polygon, this clear functionality is automatically called for the exterior ring, and for the
Modified: trunk/boost/geometry/algorithms/comparable_distance.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/comparable_distance.hpp (original)
+++ trunk/boost/geometry/algorithms/comparable_distance.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -34,7 +34,7 @@
\return \return_calc{comparable distance}
*/
template <typename Geometry1, typename Geometry2>
-inline typename distance_result<Geometry1, Geometry2>::type comparable_distance(
+inline typename default_distance_result<Geometry1, Geometry2>::type comparable_distance(
Geometry1 const& geometry1, Geometry2 const& geometry2)
{
concept::check<Geometry1 const>();
Modified: trunk/boost/geometry/algorithms/correct.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/correct.hpp (original)
+++ trunk/boost/geometry/algorithms/correct.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -86,15 +86,16 @@
};
-// correct an box: make min/max are correct
+// Correct a box: make min/max correct
template <typename Box>
struct correct_box
{
static inline void apply(Box& box)
{
- // Currently only for Cartesian coordinates
- // TODO: adapt using strategies
+ // Currently only for Cartesian coordinates
+ // (or spherical without crossing dateline)
+ // Future version: adapt using strategies
correct_box_loop
<
Box, 0, dimension<Box>::type::value
@@ -103,7 +104,7 @@
};
-// close a linear_ring, if not closed
+// Close a ring, if not closed
template <typename Ring, typename Predicate>
struct correct_ring
{
@@ -154,8 +155,8 @@
}
};
-// correct a polygon: normalizes all rings, sets outer linear_ring clockwise, sets all
-// inner rings counter clockwise
+// Correct a polygon: normalizes all rings, sets outer ring clockwise, sets all
+// inner rings counter clockwise (or vice versa depending on orientation)
template <typename Polygon>
struct correct_polygon
{
@@ -187,6 +188,7 @@
}} // namespace detail::correct
#endif // DOXYGEN_NO_DETAIL
+
#ifndef DOXYGEN_NO_DISPATCH
namespace dispatch
{
Modified: trunk/boost/geometry/algorithms/detail/equals/collect_vectors.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/equals/collect_vectors.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/equals/collect_vectors.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -58,8 +58,6 @@
T dx, dy;
T dx_0, dy_0;
- bool collinear;
-
bool operator<(collected_vector<T> const& other) const
{
if (math::equals(x, other.x))
Modified: trunk/boost/geometry/algorithms/detail/overlay/assign_parents.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/assign_parents.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/assign_parents.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -63,7 +63,7 @@
template <typename Point>
struct ring_info_helper
{
- typedef typename geometry::area_result<Point>::type area_type;
+ typedef typename geometry::default_area_result<Point>::type area_type;
ring_identifier id;
area_type real_area;
Modified: trunk/boost/geometry/algorithms/detail/overlay/enrichment_info.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/enrichment_info.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/enrichment_info.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -10,7 +10,7 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_ENRICHMENT_INFO_HPP
-#include <boost/geometry/strategies/distance_result.hpp>
+#include <boost/geometry/strategies/default_distance_result.hpp>
namespace boost { namespace geometry
@@ -31,7 +31,7 @@
template<typename P>
struct enrichment_info
{
- typedef typename distance_result<P, P>::type distance_type;
+ typedef typename default_distance_result<P, P>::type distance_type;
inline enrichment_info()
: travels_to_vertex_index(-1)
Modified: trunk/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -363,8 +363,9 @@
return;
}
+#ifdef BOOST_GEOMETRY_DEBUG_GET_TURNS
// Normally a robustness issue.
- // TODO: solve this!
+ // TODO: more research if still occuring
std::cout << "Not yet handled" << std::endl
<< "pi " << get<0>(pi) << " , " << get<1>(pi)
<< " pj " << get<0>(pj) << " , " << get<1>(pj)
@@ -374,6 +375,8 @@
<< " qj " << get<0>(qj) << " , " << get<1>(qj)
<< " qk " << get<0>(qk) << " , " << get<1>(qk)
<< std::endl;
+#endif
+
}
};
@@ -871,7 +874,10 @@
// degenerate points
break;
default :
+#ifdef BOOST_GEOMETRY_DEBUG_GET_TURNS
std::cout << "get_turns, nyi: " << method << std::endl;
+#endif
+ break;
}
return out;
Modified: trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -533,7 +533,8 @@
*prev, *it, *next,
bp[0], bp[1], bp[2], bp[3],
turns);
- // TODO: call the interrupt policy if applicable
+ // Future performance enhancement:
+ // return if told by the interrupt policy
}
}
}
@@ -572,7 +573,6 @@
// Output
Turns& turns)
{
- // TODO:
// Depending on code some relations can be left out
typedef typename boost::range_value<Turns>::type turn_info;
Modified: trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -176,9 +176,9 @@
}
else
{
-//#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
+#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
std::cout << "ux/ux unhandled" << std::endl;
-//#endif
+#endif
}
//debug_consider(0, left, right, header, false, "-> return ", ret);
@@ -220,7 +220,7 @@
else
{
#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
- // TODO: this still happens in the traverse.cpp test
+ // this still happens in the traverse.cpp test
std::cout << " iu/ux unhandled" << std::endl;
#endif
ret = order == 1;
Deleted: trunk/boost/geometry/algorithms/detail/overlay/msm_state.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/msm_state.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
+++ (empty file)
@@ -1,187 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_MSM_STATE_HPP
-#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_MSM_STATE_HPP
-
-
-
-#ifdef USE_MSM_MINI
-
-# include <boost/msm/back/mini_state_machine.hpp>
-# include <boost/fusion/include/vector.hpp>
-
-#else
-
-# include <boost/msm/back/state_machine.hpp>
-# include <boost/msm/front/state_machine_def.hpp>
-
-#endif
-
-
-
-// Events
-struct starting {};
-struct visit {};
-struct finish {};
-
-
-// Flags
-struct is_init {};
-struct is_visited {};
-
-enum StatesEnum
-{
- STATE_NONE=0,
- STATE_IS_INIT=1,
- STATE_IS_VISITED=2
-};
-
-
-
-#ifndef USE_MSM_MINI
-
-// front-end: define the FSM structure
-struct traverse_state_ : public boost::msm::front::state_machine_def<traverse_state_>
-{
- traverse_state_():m_state(STATE_IS_INIT){}
- // The list of FSM states
- struct Init : public boost::msm::front::state<>
- {
- typedef boost::mpl::vector1<is_init> flag_list;
- //template <class Event,class FSM>
- //void on_entry(Event const&,FSM& fsm) {fsm.m_state=STATE_IS_INIT;}
- };
-
- struct Started : public boost::msm::front::state<>
- {
- //template <class Event,class FSM>
- //void on_entry(Event const&,FSM& fsm) {fsm.m_state=STATE_NONE;}
- };
-
- struct Visited : public boost::msm::front::state<>
- {
- typedef boost::mpl::vector1<is_visited> flag_list;
- //template <class Event,class FSM>
- //void on_entry(Event const&,FSM& fsm) {fsm.m_state=STATE_IS_VISITED;}
- };
-
- struct Finished : public boost::msm::front::state<>
- {
- typedef boost::mpl::vector1<is_visited> flag_list;
- //template <class Event,class FSM>
- //void on_entry(Event const&,FSM& fsm) {fsm.m_state=STATE_IS_VISITED;}
- };
-
-
- // the initial state of the player SM. Must be defined
- typedef Init initial_state;
-
- // transition actions
- void start_traverse(starting const&) {m_state=STATE_NONE;}
- void finish_after_visit(finish const&) {m_state=STATE_IS_VISITED;}
- void do_finish(finish const&) {m_state=STATE_IS_VISITED;}
- void do_visit(visit const&) {m_state=STATE_IS_VISITED;}
- void do_visit2(visit const&) {m_state=STATE_IS_VISITED;}
- void do_nothing(finish const&) {m_state=STATE_IS_VISITED;}
-
-
- typedef traverse_state_ p; // makes transition table cleaner
-
- // Transition table for player
- struct transition_table : mpl::vector
- <
- // Start Event Next Action Guard
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Init , starting , Started , &p::start_traverse >,
- a_row < Init , visit , Visited , &p::do_visit >,
- a_row < Init , finish , Finished , &p::do_nothing >,
- a_row < Started , finish , Finished , &p::do_finish >,
- a_row < Started , visit , Visited , &p::do_visit2 >,
- // +---------+-------------+---------+---------------------+----------------------+
- a_row < Visited , finish , Finished , &p::finish_after_visit >
- // +---------+-------------+---------+---------------------+----------------------+
- > {};
-
- // Replaces the default no-transition response.
- template <class Machine, class Event>
- void no_transition(Event const& e, Machine&, int state)
- {
- //std::cout << "no transition from state " << state << " on event " << typeid(e).name() << std::endl;
- }
-
- typedef int no_exception_thrown;
- typedef int no_message_queue;
- StatesEnum m_state;
-
-};
-
-
-typedef boost::msm::back::state_machine<traverse_state_> traverse_state;
-
-#else
-
-// mini-back-end
-
-
-struct traverse_state : public boost::msm::back::mini::state_machine<traverse_state>
-{
- traverse_state():m_state(STATE_IS_INIT){}
-
- // The list of FSM states
- enum states
- {
- Init, Started, Visited, Finished
- , initial_state = Init
- };
-
- friend class boost::msm::back::mini::state_machine<traverse_state>;
- typedef traverse_state p; // makes transition table cleaner
-
- // transition actions
- void start_traverse(starting const&) {m_state=STATE_NONE;}
- void finish_after_visit(finish const&) {m_state=STATE_IS_VISITED;}
- void do_finish(finish const&) {m_state=STATE_IS_VISITED;}
- void do_visit(visit const&) {m_state=STATE_IS_VISITED;}
- void do_visit2(visit const&) {m_state=STATE_IS_VISITED;}
- void do_nothing(finish const&) {m_state=STATE_IS_VISITED;}
-
- bool flag_none() const { return m_state == STATE_IS_INIT; }
- bool flag_visited() const { return m_state == STATE_IS_VISITED; }
-
-
- // Transition table
- struct transition_table : mpl::vector6<
- // Start Event Next Action
- // +---------+-------------+---------+---------------------+
- row < Init , starting , Started , &p::start_traverse >,
- row < Init , visit , Visited , &p::do_visit >,
- row < Init , finish , Finished, &p::do_nothing >,
- row < Started , finish , Finished, &p::do_finish >,
- row < Started , visit , Visited , &p::do_visit2 >,
- row < Visited , finish , Finished, &p::finish_after_visit>
- // +---------+-------------+---------+---------------------+
- > {};
-
- // Replaces the default no-transition response.
- template <class Event>
- int no_transition(int state, Event const& e)
- {
- std::cout << "no transition from state " << state
- << " on event " << typeid(e).name() << std::endl;
- return state;
- }
- StatesEnum m_state;
-
-};
-
-#endif
-
-
-#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_MSM_STATE_HPP
Modified: trunk/boost/geometry/algorithms/detail/overlay/ring_properties.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/ring_properties.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/ring_properties.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -27,7 +27,7 @@
struct ring_properties
{
typedef Point point_type;
- typedef typename area_result<Point>::type area_type;
+ typedef typename default_area_result<Point>::type area_type;
// Filled by "select_rings"
Point point;
Modified: trunk/boost/geometry/algorithms/detail/overlay/segment_identifier.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/segment_identifier.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/segment_identifier.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -21,7 +21,6 @@
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/coordinate_dimension.hpp>
-#include <boost/geometry/strategies/distance_result.hpp>
namespace boost { namespace geometry
Modified: trunk/boost/geometry/algorithms/detail/sections/sectionalize.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/sections/sectionalize.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/sections/sectionalize.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -58,7 +58,6 @@
{
typedef Box box_type;
- // unique ID used in get_turns to mark section-pairs already handled.
int id; // might be obsolete now, BSG 14-03-2011 TODO decide about this
int directions[DimensionCount];
Modified: trunk/boost/geometry/algorithms/distance.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/distance.hpp (original)
+++ trunk/boost/geometry/algorithms/distance.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -32,7 +32,7 @@
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/strategies/distance.hpp>
-#include <boost/geometry/strategies/distance_result.hpp>
+#include <boost/geometry/strategies/default_distance_result.hpp>
#include <boost/geometry/algorithms/assign.hpp>
#include <boost/geometry/algorithms/within.hpp>
@@ -417,15 +417,11 @@
static inline typename return_type<Strategy>::type apply(Point const& point,
Segment const& segment, Strategy const& strategy)
{
- // TODO: We cannot use .first and .second here.
- // Segment strategy does not operate on segment (anymore), because:
- // all strategies do not operate on segments anymore, because
- // it turned out to be inconvenient (wrapping up things in segments);
- // The SIDE strategy must operate on three different point types,
- // and that might be for distance segment strategy as well
- // (though not very probable).
-
- return strategy.apply(point, segment.first, segment.second);
+
+ 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]);
+ return strategy.apply(point, p[0], p[1]);
}
};
@@ -535,7 +531,7 @@
\return \return_calc{distance}
*/
template <typename Geometry1, typename Geometry2>
-inline typename distance_result<Geometry1, Geometry2>::type distance(
+inline typename default_distance_result<Geometry1, Geometry2>::type distance(
Geometry1 const& geometry1, Geometry2 const& geometry2)
{
concept::check<Geometry1 const>();
Modified: trunk/boost/geometry/algorithms/expand.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/expand.hpp (original)
+++ trunk/boost/geometry/algorithms/expand.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -267,7 +267,6 @@
\param strategy_less
\param strategy_greater
\note Strategy is currently ignored
-\todo Handle strategy
*
template
<
Modified: trunk/boost/geometry/algorithms/length.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/length.hpp (original)
+++ trunk/boost/geometry/algorithms/length.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -30,7 +30,7 @@
#include <boost/geometry/algorithms/detail/calculate_null.hpp>
#include <boost/geometry/views/closeable_view.hpp>
#include <boost/geometry/strategies/distance.hpp>
-#include <boost/geometry/strategies/length_result.hpp>
+#include <boost/geometry/strategies/default_length_result.hpp>
namespace boost { namespace geometry
@@ -45,7 +45,7 @@
template<typename Segment, typename Strategy>
struct segment_length
{
- static inline typename length_result<Segment>::type apply(
+ static inline typename default_length_result<Segment>::type apply(
Segment const& segment, Strategy const& strategy)
{
typedef typename point_type<Segment>::type point_type;
@@ -65,7 +65,7 @@
template<typename Range, typename Strategy, closure_selector Closure>
struct range_length
{
- typedef typename length_result<Range>::type return_type;
+ typedef typename default_length_result<Range>::type return_type;
static inline return_type apply(
Range const& range, Strategy const& strategy)
@@ -108,7 +108,7 @@
template <typename Tag, typename Geometry, typename Strategy>
struct length : detail::calculate_null
<
- typename length_result<Geometry>::type,
+ typename default_length_result<Geometry>::type,
Geometry,
Strategy
>
@@ -146,7 +146,7 @@
\qbk{[length] [length_output]}
*/
template<typename Geometry>
-inline typename length_result<Geometry>::type length(
+inline typename default_length_result<Geometry>::type length(
Geometry const& geometry)
{
concept::check<Geometry const>();
@@ -180,7 +180,7 @@
\qbk{[length_with_strategy] [length_with_strategy_output]}
*/
template<typename Geometry, typename Strategy>
-inline typename length_result<Geometry>::type length(
+inline typename default_length_result<Geometry>::type length(
Geometry const& geometry, Strategy const& strategy)
{
concept::check<Geometry const>();
Modified: trunk/boost/geometry/algorithms/make.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/make.hpp (original)
+++ trunk/boost/geometry/algorithms/make.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -113,7 +113,7 @@
\tparam Geometry \tparam_geometry
\tparam Range \tparam_range_point
\param range \param_range_point
-\return The constructed geometry, here: a linestring or a linear ring
+\return The constructed geometry, here: a linestring or a ring
\qbk{distinguish, with a range}
\qbk{
Modified: trunk/boost/geometry/algorithms/num_points.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/num_points.hpp (original)
+++ trunk/boost/geometry/algorithms/num_points.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -21,7 +21,6 @@
#include <boost/typeof/typeof.hpp>
#include <boost/geometry/core/closure.hpp>
-#include <boost/geometry/core/is_linear.hpp>
#include <boost/geometry/core/exterior_ring.hpp>
#include <boost/geometry/core/interior_rings.hpp>
#include <boost/geometry/core/ring_type.hpp>
Modified: trunk/boost/geometry/algorithms/perimeter.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/perimeter.hpp (original)
+++ trunk/boost/geometry/algorithms/perimeter.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -18,7 +18,7 @@
#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/core/closure.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
-#include <boost/geometry/strategies/length_result.hpp>
+#include <boost/geometry/strategies/default_length_result.hpp>
#include <boost/geometry/algorithms/length.hpp>
#include <boost/geometry/algorithms/detail/calculate_null.hpp>
#include <boost/geometry/algorithms/detail/calculate_sum.hpp>
@@ -35,7 +35,7 @@
template <typename Tag, typename Geometry, typename Strategy>
struct perimeter : detail::calculate_null
<
- typename length_result<Geometry>::type,
+ typename default_length_result<Geometry>::type,
Geometry,
Strategy
>
@@ -55,7 +55,7 @@
struct perimeter<polygon_tag, Polygon, Strategy>
: detail::calculate_polygon_sum
<
- typename length_result<Polygon>::type,
+ typename default_length_result<Polygon>::type,
Polygon,
Strategy,
detail::length::range_length
@@ -86,7 +86,7 @@
\qbk{[include reference/algorithms/perimeter.qbk]}
*/
template<typename Geometry>
-inline typename length_result<Geometry>::type perimeter(
+inline typename default_length_result<Geometry>::type perimeter(
Geometry const& geometry)
{
concept::check<Geometry const>();
@@ -120,7 +120,7 @@
\qbk{[include reference/algorithms/perimeter.qbk]}
*/
template<typename Geometry, typename Strategy>
-inline typename length_result<Geometry>::type perimeter(
+inline typename default_length_result<Geometry>::type perimeter(
Geometry const& geometry, Strategy const& strategy)
{
concept::check<Geometry const>();
Modified: trunk/boost/geometry/algorithms/within.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/within.hpp (original)
+++ trunk/boost/geometry/algorithms/within.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -30,6 +30,8 @@
#include <boost/geometry/core/interior_rings.hpp>
#include <boost/geometry/core/point_order.hpp>
#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/core/interior_rings.hpp>
+
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/strategies/within.hpp>
#include <boost/geometry/strategies/concepts/within_concept.hpp>
@@ -365,7 +367,7 @@
typedef typename strategy::within::services::default_strategy
<
typename tag<Geometry1>::type,
- typename tag<Geometry2>::type,
+ typename tag_cast<typename tag<Geometry2>::type, areal_tag>::type,
typename cs_tag<point_type1>::type,
typename cs_tag<point_type2>::type,
point_type1,
Modified: trunk/boost/geometry/core/is_areal.hpp
==============================================================================
--- trunk/boost/geometry/core/is_areal.hpp (original)
+++ trunk/boost/geometry/core/is_areal.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -46,7 +46,7 @@
/*!
\brief Meta-function defining "true" for areal types (box, (multi)polygon, ring),
\note Used for tag dispatching and meta-function finetuning
- \note Even though linear_ring is called linear, it has areal properties.
+ \note Also a "ring" has areal properties within Boost.Geometry
\ingroup core
*/
template <typename Geometry>
Deleted: trunk/boost/geometry/core/is_linear.hpp
==============================================================================
--- trunk/boost/geometry/core/is_linear.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
+++ (empty file)
@@ -1,65 +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_CORE_IS_LINEAR_HPP
-#define BOOST_GEOMETRY_CORE_IS_LINEAR_HPP
-
-
-#include <boost/type_traits.hpp>
-
-
-#include <boost/geometry/core/tag.hpp>
-#include <boost/geometry/core/tags.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-
-#ifndef DOXYGEN_NO_DISPATCH
-namespace core_dispatch
-{
-
-template <typename GeometryTag>
-struct is_linear : boost::false_type {};
-
-
-template <>
-struct is_linear<linestring_tag> : boost::true_type {};
-
-
-template <>
-struct is_linear<ring_tag> : boost::true_type {};
-
-
-} // namespace core_dispatch
-#endif
-
-
-
-/*!
- \brief Meta-function defining "true" for linear types (linestring,ring),
- "false" for non-linear typse
- \note Used for tag dispatching and meta-function finetuning
- \ingroup core
-*/
-template <typename Geometry>
-struct is_linear : core_dispatch::is_linear<typename tag<Geometry>::type>
-{};
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_CORE_IS_LINEAR_HPP
Modified: trunk/boost/geometry/core/point_type.hpp
==============================================================================
--- trunk/boost/geometry/core/point_type.hpp (original)
+++ trunk/boost/geometry/core/point_type.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -74,7 +74,7 @@
};
-// Specializations for linestring/linear ring, via boost::range
+// Specializations for linestring/ring, via boost::range
template <typename Linestring>
struct point_type<linestring_tag, Linestring>
{
Modified: trunk/boost/geometry/core/ring_type.hpp
==============================================================================
--- trunk/boost/geometry/core/ring_type.hpp (original)
+++ trunk/boost/geometry/core/ring_type.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -38,7 +38,7 @@
\par Geometries:
- polygon
\par Specializations should provide:
- - typedef XXX type ( e.g. linear_ring<P> )
+ - typedef XXX type ( e.g. ring<P> )
\tparam Geometry geometry
*/
template <typename Geometry>
Modified: trunk/boost/geometry/domains/gis/io/wkt/write_wkt.hpp
==============================================================================
--- trunk/boost/geometry/domains/gis/io/wkt/write_wkt.hpp (original)
+++ trunk/boost/geometry/domains/gis/io/wkt/write_wkt.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -196,7 +196,7 @@
static inline void apply(std::basic_ostream<Char, Traits>& os,
Box const& box)
{
- // Convert to linear ring, then stream
+ // Convert to ring, then stream
typedef model::ring<point_type> ring_type;
ring_type ring;
geometry::convert(box, ring);
@@ -301,8 +301,8 @@
/*!
\brief Specialization to stream a ring as WKT
-\details A "linear_ring" does not exist in WKT.
-A linear ring is equivalent to a polygon without inner rings
+\details A ring or "linear_ring" does not exist in WKT.
+A ring is equivalent to a polygon without inner rings
It is therefore streamed as a polygon
*/
template <typename Ring>
Modified: trunk/boost/geometry/extensions/algorithms/connect.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algorithms/connect.hpp (original)
+++ trunk/boost/geometry/extensions/algorithms/connect.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -18,7 +18,7 @@
#include <boost/geometry/algorithms/distance.hpp>
#include <boost/geometry/algorithms/comparable_distance.hpp>
#include <boost/geometry/multi/core/tags.hpp>
-#include <boost/geometry/strategies/distance_result.hpp>
+#include <boost/geometry/strategies/default_distance_result.hpp>
#include <boost/geometry/policies/compare.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
@@ -77,7 +77,7 @@
typedef typename std::vector<node<Point> >::const_iterator vector_iterator_type;
typedef Point point_type;
- typedef typename distance_result<Point>::type distance_result_type;
+ typedef typename default_distance_result<Point>::type distance_result_type;
map_type map;
@@ -200,7 +200,7 @@
typedef typename std::vector<node<Point> >::const_iterator vector_iterator_type;
typedef Point point_type;
- typedef typename distance_result<Point>::type distance_result_type;
+ typedef typename default_distance_result<Point>::type distance_result_type;
map_type map;
Modified: trunk/boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp (original)
+++ trunk/boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -236,7 +236,7 @@
, distance(geometry::return_distance_result<distance_type>(0))
{}
- typedef typename distance_result<P, P>::type distance_type;
+ typedef typename default_distance_result<P, P>::type distance_type;
distance_type distance; // distance-measurement from segment.first to IP
};
Modified: trunk/boost/geometry/extensions/index/rtree/helpers.hpp
==============================================================================
--- trunk/boost/geometry/extensions/index/rtree/helpers.hpp (original)
+++ trunk/boost/geometry/extensions/index/rtree/helpers.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -47,7 +47,7 @@
* \brief Compute the area of the union of b1 and b2
*/
template <typename Box>
-inline typename area_result<Box>::type compute_union_area(Box const& b1, Box const& b2)
+inline typename default_area_result<Box>::type compute_union_area(Box const& b1, Box const& b2)
{
Box enlarged_box = enlarge_box(b1, b2);
return geometry::area(enlarged_box);
Deleted: trunk/boost/geometry/geometries/linear_ring.hpp
==============================================================================
--- trunk/boost/geometry/geometries/linear_ring.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
+++ (empty file)
@@ -1,150 +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_GEOMETRIES_LINEAR_RING_HPP
-#define BOOST_GEOMETRY_GEOMETRIES_LINEAR_RING_HPP
-
-#include <boost/config.hpp>
-
-#if defined(BOOST_MSVC_FULL_VER)
-#pragma message ("linear_ring is renamed to 'ring', so deprecated. Prefer using ring")
-#else
-#warning "linear_ring is renamed to 'ring', so deprecated. Prefer using ring"
-#endif
-
-#include <memory>
-#include <vector>
-
-#include <boost/concept/assert.hpp>
-
-#include <boost/geometry/core/closure.hpp>
-#include <boost/geometry/core/point_order.hpp>
-#include <boost/geometry/core/tag.hpp>
-#include <boost/geometry/core/tags.hpp>
-
-#include <boost/geometry/geometries/concepts/point_concept.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-namespace model
-{
-/*!
- \brief A linear_ring (linear linear_ring) is a closed line which should not be selfintersecting
- \ingroup geometries
- \tparam Point point type
- \tparam Container container type, for example std::vector, std::deque
- \tparam Allocator container-allocator-type
-*/
-template
-<
- typename Point,
- bool ClockWise = true, bool Closed = true,
- template<typename, typename> class Container = std::vector,
- template<typename> class Allocator = std::allocator
->
-class linear_ring : public Container<Point, Allocator<Point> >
-{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
-
- typedef Container<Point, Allocator<Point> > base_type;
-
-public :
- inline linear_ring()
- : base_type()
- {}
-
- template <typename Iterator>
- inline linear_ring(Iterator begin, Iterator end)
- : base_type(begin, end)
- {}
-};
-
-} // namespace model
-
-
-#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
-namespace traits
-{
-
-template
-<
- typename Point,
- bool ClockWise, bool Closed,
- template<typename, typename> class Container,
- template<typename> class Allocator
->
-struct tag<model::linear_ring<Point, ClockWise, Closed, Container, Allocator> >
-{
- typedef ring_tag type;
-};
-
-
-template
-<
- typename Point,
- bool Closed,
- template<typename, typename> class Container,
- template<typename> class Allocator
->
-struct point_order<model::linear_ring<Point, false, Closed, Container, Allocator> >
-{
- static const order_selector value = counterclockwise;
-};
-
-
-template
-<
- typename Point,
- bool Closed,
- template<typename, typename> class Container,
- template<typename> class Allocator
->
-struct point_order<model::linear_ring<Point, true, Closed, Container, Allocator> >
-{
- static const order_selector value = clockwise;
-};
-
-template
-<
- typename Point,
- bool PointOrder,
- template<typename, typename> class Container,
- template<typename> class Allocator
->
-struct closure<model::linear_ring<Point, PointOrder, true, Container, Allocator> >
-{
- static const closure_selector value = closed;
-};
-
-template
-<
- typename Point,
- bool PointOrder,
- template<typename, typename> class Container,
- template<typename> class Allocator
->
-struct closure<model::linear_ring<Point, PointOrder, false, Container, Allocator> >
-{
- static const closure_selector value = open;
-};
-
-
-} // namespace traits
-#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
-
-
-}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_GEOMETRIES_LINEAR_RING_HPP
Modified: trunk/boost/geometry/multi/algorithms/envelope.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/envelope.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/envelope.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -51,7 +51,7 @@
};
-// version for multi_polygon: outer linear_ring's of all polygons
+// version for multi_polygon: outer ring's of all polygons
template<typename MultiPolygon, typename Box>
struct envelope_multi_polygon
{
Modified: trunk/boost/geometry/multi/algorithms/length.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/length.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/length.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -33,7 +33,7 @@
struct length<multi_linestring_tag, MultiLinestring, Strategy>
: detail::multi_sum
<
- typename length_result<MultiLinestring>::type,
+ typename default_length_result<MultiLinestring>::type,
MultiLinestring,
Strategy,
detail::length::range_length
Modified: trunk/boost/geometry/multi/algorithms/perimeter.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/perimeter.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/perimeter.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -33,7 +33,7 @@
struct perimeter<multi_polygon_tag, MultiPolygon, Strategy>
: detail::multi_sum
<
- typename length_result<MultiPolygon>::type,
+ typename default_length_result<MultiPolygon>::type,
MultiPolygon,
Strategy,
perimeter
Modified: trunk/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp
==============================================================================
--- trunk/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp (original)
+++ trunk/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -19,8 +19,6 @@
#include <boost/geometry/strategies/side.hpp>
#include <boost/geometry/strategies/within.hpp>
-// TEMP!
-#include <boost/geometry/multi/core/tags.hpp>
namespace boost { namespace geometry
{
@@ -182,47 +180,15 @@
namespace services
{
+// Register using "areal_tag" for ring, polygon, multi-polygon
template <typename Point, typename PointOfSegment>
-struct default_strategy<point_tag, polygon_tag, cartesian_tag, cartesian_tag, Point, PointOfSegment>
+struct default_strategy<point_tag, areal_tag, cartesian_tag, cartesian_tag, Point, PointOfSegment>
{
typedef winding<Point, PointOfSegment> type;
};
template <typename Point, typename PointOfSegment>
-struct default_strategy<point_tag, ring_tag, cartesian_tag, cartesian_tag, Point, PointOfSegment>
-{
- typedef winding<Point, PointOfSegment> type;
-};
-
-template <typename Point, typename PointOfSegment>
-struct default_strategy<point_tag, polygon_tag, spherical_tag, spherical_tag, Point, PointOfSegment>
-{
- typedef winding<Point, PointOfSegment> type;
-};
-
-// TEMP!
-// register it even for the multi here, and for the box
-// future: use tag inheritance, see elsewhere
-template <typename Point, typename PointOfSegment>
-struct default_strategy<point_tag, multi_polygon_tag, cartesian_tag, cartesian_tag, Point, PointOfSegment>
-{
- typedef winding<Point, PointOfSegment> type;
-};
-
-template <typename Point, typename PointOfSegment>
-struct default_strategy<point_tag, multi_polygon_tag, spherical_tag, spherical_tag, Point, PointOfSegment>
-{
- typedef winding<Point, PointOfSegment> type;
-};
-
-template <typename Point, typename PointOfSegment>
-struct default_strategy<point_tag, box_tag, cartesian_tag, cartesian_tag, Point, PointOfSegment>
-{
- typedef winding<Point, PointOfSegment> type;
-};
-
-template <typename Point, typename PointOfSegment>
-struct default_strategy<point_tag, box_tag, spherical_tag, spherical_tag, Point, PointOfSegment>
+struct default_strategy<point_tag, areal_tag, spherical_tag, spherical_tag, Point, PointOfSegment>
{
typedef winding<Point, PointOfSegment> type;
};
Modified: trunk/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp
==============================================================================
--- trunk/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp (original)
+++ trunk/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -21,7 +21,7 @@
#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/algorithms/convert.hpp>
-#include <boost/geometry/strategies/distance_result.hpp>
+#include <boost/geometry/strategies/distance.hpp>
Deleted: trunk/boost/geometry/strategies/area_result.hpp
==============================================================================
--- trunk/boost/geometry/strategies/area_result.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
+++ (empty file)
@@ -1,55 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_STRATEGIES_AREA_RESULT_HPP
-#define BOOST_GEOMETRY_STRATEGIES_AREA_RESULT_HPP
-
-
-#include <boost/geometry/core/cs.hpp>
-#include <boost/geometry/core/coordinate_type.hpp>
-#include <boost/geometry/strategies/area.hpp>
-#include <boost/geometry/util/select_most_precise.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-/*!
- \brief Meta-function defining return type of area function
- \ingroup area
- \note The strategy defines the return-type (so this situation is different
- from length, where distance is sqr/sqrt, but length always squared)
-
- */
-
-// TODO: rename to "default_area_result" or services::default_result
-
-
-template <typename Geometry>
-struct area_result
-{
- typedef typename point_type<Geometry>::type point_type;
- typedef typename strategy::area::services::default_strategy
- <
- typename cs_tag<point_type>::type,
- point_type
- >::type strategy_type;
-
- typedef typename strategy_type::return_type type;
-};
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_STRATEGIES_AREA_RESULT_HPP
Modified: trunk/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -19,7 +19,7 @@
#include <boost/geometry/algorithms/distance.hpp>
#include <boost/geometry/util/select_most_precise.hpp>
#include <boost/geometry/strategies/centroid.hpp>
-#include <boost/geometry/strategies/distance_result.hpp>
+#include <boost/geometry/strategies/default_distance_result.hpp>
namespace boost { namespace geometry
@@ -61,8 +61,8 @@
private :
typedef typename select_most_precise
<
- typename distance_result<Point>::type,
- typename distance_result<PointOfSegment>::type
+ typename default_distance_result<Point>::type,
+ typename default_distance_result<PointOfSegment>::type
>::type distance_type;
public :
Modified: trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/distance_projected_point.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -28,7 +28,7 @@
#include <boost/geometry/strategies/tags.hpp>
#include <boost/geometry/strategies/distance.hpp>
-#include <boost/geometry/strategies/distance_result.hpp>
+#include <boost/geometry/strategies/default_distance_result.hpp>
#include <boost/geometry/strategies/cartesian/distance_pythagoras.hpp>
#include <boost/geometry/util/select_coordinate_type.hpp>
Modified: trunk/boost/geometry/strategies/cartesian/distance_pythagoras.hpp
==============================================================================
--- trunk/boost/geometry/strategies/cartesian/distance_pythagoras.hpp (original)
+++ trunk/boost/geometry/strategies/cartesian/distance_pythagoras.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -21,7 +21,6 @@
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/strategies/distance.hpp>
-#include <boost/geometry/strategies/distance_result.hpp>
#include <boost/geometry/util/select_calculation_type.hpp>
#include <boost/geometry/util/promote_floating_point.hpp>
Copied: trunk/boost/geometry/strategies/default_area_result.hpp (from r70836, /trunk/boost/geometry/strategies/area_result.hpp)
==============================================================================
--- /trunk/boost/geometry/strategies/area_result.hpp (original)
+++ trunk/boost/geometry/strategies/default_area_result.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -11,8 +11,8 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_GEOMETRY_STRATEGIES_AREA_RESULT_HPP
-#define BOOST_GEOMETRY_STRATEGIES_AREA_RESULT_HPP
+#ifndef BOOST_GEOMETRY_STRATEGIES_DEFAULT_AREA_RESULT_HPP
+#define BOOST_GEOMETRY_STRATEGIES_DEFAULT_AREA_RESULT_HPP
#include <boost/geometry/core/cs.hpp>
@@ -25,18 +25,14 @@
{
/*!
- \brief Meta-function defining return type of area function
- \ingroup area
- \note The strategy defines the return-type (so this situation is different
- from length, where distance is sqr/sqrt, but length always squared)
-
+\brief Meta-function defining return type of area function, using the default strategy
+\ingroup area
+\note The strategy defines the return-type (so this situation is different
+ from length, where distance is sqr/sqrt, but length always squared)
*/
-// TODO: rename to "default_area_result" or services::default_result
-
-
template <typename Geometry>
-struct area_result
+struct default_area_result
{
typedef typename point_type<Geometry>::type point_type;
typedef typename strategy::area::services::default_strategy
@@ -52,4 +48,4 @@
}} // namespace boost::geometry
-#endif // BOOST_GEOMETRY_STRATEGIES_AREA_RESULT_HPP
+#endif // BOOST_GEOMETRY_STRATEGIES_DEFAULT_AREA_RESULT_HPP
Copied: trunk/boost/geometry/strategies/default_distance_result.hpp (from r70836, /trunk/boost/geometry/strategies/distance_result.hpp)
==============================================================================
--- /trunk/boost/geometry/strategies/distance_result.hpp (original)
+++ trunk/boost/geometry/strategies/default_distance_result.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -11,8 +11,8 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_GEOMETRY_STRATEGIES_DISTANCE_RESULT_HPP
-#define BOOST_GEOMETRY_STRATEGIES_DISTANCE_RESULT_HPP
+#ifndef BOOST_GEOMETRY_STRATEGIES_DEFAULT_DISTANCE_RESULT_HPP
+#define BOOST_GEOMETRY_STRATEGIES_DEFAULT_DISTANCE_RESULT_HPP
#include <boost/geometry/core/cs.hpp>
@@ -24,17 +24,13 @@
{
/*!
- \brief Meta-function defining return type of distance function
- \ingroup distance
- \note The strategy defines the return-type (so this situation is different
- from length, where distance is sqr/sqrt, but length always squared)
-
+\brief Meta-function defining return type of distance function
+\ingroup distance
+\note The strategy defines the return-type (so this situation is different
+ from length, where distance is sqr/sqrt, but length always squared)
*/
-
-// TODO: rename to "default_distance_result" or services::default_result
-
template <typename Geometry1, typename Geometry2 = Geometry1>
-struct distance_result
+struct default_distance_result
{
typedef typename strategy::distance::services::return_type
<
@@ -51,4 +47,4 @@
}} // namespace boost::geometry
-#endif // BOOST_GEOMETRY_STRATEGIES_DISTANCE_RESULT_HPP
+#endif // BOOST_GEOMETRY_STRATEGIES_DEFAULT_DISTANCE_RESULT_HPP
Copied: trunk/boost/geometry/strategies/default_length_result.hpp (from r70836, /trunk/boost/geometry/strategies/length_result.hpp)
==============================================================================
--- /trunk/boost/geometry/strategies/length_result.hpp (original)
+++ trunk/boost/geometry/strategies/default_length_result.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -11,8 +11,8 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_GEOMETRY_STRATEGIES_LENGTH_RESULT_HPP
-#define BOOST_GEOMETRY_STRATEGIES_LENGTH_RESULT_HPP
+#ifndef BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP
+#define BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP
#include <boost/geometry/core/coordinate_type.hpp>
@@ -31,7 +31,7 @@
*/
template <typename Geometry>
-struct length_result
+struct default_length_result
{
typedef typename select_most_precise
<
@@ -43,4 +43,4 @@
}} // namespace boost::geometry
-#endif // BOOST_GEOMETRY_STRATEGIES_LENGTH_RESULT_HPP
+#endif // BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP
Deleted: trunk/boost/geometry/strategies/distance_result.hpp
==============================================================================
--- trunk/boost/geometry/strategies/distance_result.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
+++ (empty file)
@@ -1,54 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_STRATEGIES_DISTANCE_RESULT_HPP
-#define BOOST_GEOMETRY_STRATEGIES_DISTANCE_RESULT_HPP
-
-
-#include <boost/geometry/core/cs.hpp>
-#include <boost/geometry/core/point_type.hpp>
-#include <boost/geometry/strategies/distance.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-/*!
- \brief Meta-function defining return type of distance function
- \ingroup distance
- \note The strategy defines the return-type (so this situation is different
- from length, where distance is sqr/sqrt, but length always squared)
-
- */
-
-// TODO: rename to "default_distance_result" or services::default_result
-
-template <typename Geometry1, typename Geometry2 = Geometry1>
-struct distance_result
-{
- typedef typename strategy::distance::services::return_type
- <
- typename strategy::distance::services::default_strategy
- <
- point_tag,
- typename point_type<Geometry1>::type,
- typename point_type<Geometry2>::type
- >::type
- >::type type;
-};
-
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_STRATEGIES_DISTANCE_RESULT_HPP
Deleted: trunk/boost/geometry/strategies/length_result.hpp
==============================================================================
--- trunk/boost/geometry/strategies/length_result.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
+++ (empty file)
@@ -1,46 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2011 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2011 Mateusz Loskot, London, UK.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_STRATEGIES_LENGTH_RESULT_HPP
-#define BOOST_GEOMETRY_STRATEGIES_LENGTH_RESULT_HPP
-
-
-#include <boost/geometry/core/coordinate_type.hpp>
-#include <boost/geometry/util/select_most_precise.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-/*!
- \brief Meta-function defining return type of length function
- \ingroup length
- \note Length of a line of integer coordinates can be double.
- So we take at least a double. If Big Number types are used,
- we take that type.
-
- */
-template <typename Geometry>
-struct length_result
-{
- typedef typename select_most_precise
- <
- typename coordinate_type<Geometry>::type,
- long double
- >::type type;
-};
-
-}} // namespace boost::geometry
-
-
-#endif // BOOST_GEOMETRY_STRATEGIES_LENGTH_RESULT_HPP
Modified: trunk/boost/geometry/strategies/spherical/distance_haversine.hpp
==============================================================================
--- trunk/boost/geometry/strategies/spherical/distance_haversine.hpp (original)
+++ trunk/boost/geometry/strategies/spherical/distance_haversine.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -19,7 +19,6 @@
#include <boost/geometry/strategies/distance.hpp>
-#include <boost/geometry/strategies/distance_result.hpp>
namespace boost { namespace geometry
Modified: trunk/boost/geometry/strategies/within.hpp
==============================================================================
--- trunk/boost/geometry/strategies/within.hpp (original)
+++ trunk/boost/geometry/strategies/within.hpp 2011-04-02 09:29:21 EDT (Sat, 02 Apr 2011)
@@ -47,18 +47,11 @@
>
struct default_strategy
{
- // If we would assert here, we would have to implement
- // default strategies for all combinations, all CS, etc.
- // This explosion is not convenient.
- // Another option is tag inheritance / grouping (so point-in-polygon will apply for point-in-ring, point-in-polygon, point-in-multi-polygon but not for point-in-box...)
- // TODO: decide about this.
-
BOOST_MPL_ASSERT_MSG
(
false, NOT_IMPLEMENTED_FOR_THIS_TYPES
, (types<Point, PointContaining>)
);
-
};
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