From e15cbf41a4bdf1034bd3f8d98fd00ec95b1d60ee Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Thu, 29 May 2014 14:53:51 +0300 Subject: [PATCH 01/19] [strategies] make default_strategy class commutative with respect to the order of the geometry tags --- .../cartesian/distance_projected_point.hpp | 14 ++++++++++++++ .../cartesian/distance_pythagoras_point_box.hpp | 12 ++++++++++++ .../spherical/distance_cross_track.hpp | 16 ++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp index 25179ba21..5bcad4fee 100644 --- a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp @@ -251,6 +251,20 @@ struct default_strategy > type; }; +template +struct default_strategy + < + segment_tag, point_tag, PointOfSegment, Point, + cartesian_tag, cartesian_tag, Strategy + > +{ + typedef typename default_strategy + < + point_tag, segment_tag, Point, PointOfSegment, + cartesian_tag, cartesian_tag, Strategy + >::type type; +}; + } // namespace services #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS diff --git a/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp b/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp index 6b05ff014..af55415f8 100644 --- a/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp @@ -322,6 +322,18 @@ struct default_strategy typedef pythagoras_point_box<> type; }; +template +struct default_strategy + < + box_tag, point_tag, Box, Point, cartesian_tag, cartesian_tag + > +{ + typedef typename default_strategy + < + point_tag, box_tag, Point, Box, cartesian_tag, cartesian_tag + >::type type; +}; + } // namespace services #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS diff --git a/include/boost/geometry/strategies/spherical/distance_cross_track.hpp b/include/boost/geometry/strategies/spherical/distance_cross_track.hpp index 87fac4811..6ffa4ff7c 100644 --- a/include/boost/geometry/strategies/spherical/distance_cross_track.hpp +++ b/include/boost/geometry/strategies/spherical/distance_cross_track.hpp @@ -306,6 +306,22 @@ struct default_strategy }; +template +struct default_strategy + < + segment_tag, point_tag, PointOfSegment, Point, + spherical_equatorial_tag, spherical_equatorial_tag, + Strategy + > +{ + typedef typename default_strategy + < + point_tag, segment_tag, Point, PointOfSegment, + spherical_equatorial_tag, spherical_equatorial_tag, + Strategy + >::type type; +}; + } // namespace services #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS From 916e9bb4953310ae6d61d3242084d4c05722a9e8 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Thu, 29 May 2014 14:54:25 +0300 Subject: [PATCH 02/19] [test][strategies] add compile time check for the default strategy where the geometry tags are reversed --- test/strategies/cross_track.cpp | 5 +++++ test/strategies/projected_point.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/strategies/cross_track.cpp b/test/strategies/cross_track.cpp index fe665ea1b..2fe639e30 100644 --- a/test/strategies/cross_track.cpp +++ b/test/strategies/cross_track.cpp @@ -68,6 +68,11 @@ void test_distance( < bg::point_tag, bg::segment_tag, Point, Point >::type cross_track_strategy_type; + + typedef typename bg::strategy::distance::services::default_strategy + < + bg::segment_tag, bg::point_tag, Point, Point + >::type reversed_tags_cross_track_strategy_type; } diff --git a/test/strategies/projected_point.cpp b/test/strategies/projected_point.cpp index 62c611495..64e30f934 100644 --- a/test/strategies/projected_point.cpp +++ b/test/strategies/projected_point.cpp @@ -62,6 +62,11 @@ void test_services() < bg::point_tag, bg::segment_tag, P, PS >::type projected_point_strategy_type; + + typedef typename services::default_strategy + < + bg::segment_tag, bg::point_tag, PS, P + >::type reversed_tags_projected_point_strategy_type; } // 1: normal, calculate distance: From d8e46d3f8583f2e8c7209a256e851e2667c9a55d Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 13:45:18 +0200 Subject: [PATCH 03/19] [within] Use normalized_view in point_in_geometry and fix unused typedef warning --- .../detail/within/point_in_geometry.hpp | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp b/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp index efdce0be1..3b460e506 100644 --- a/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp @@ -32,6 +32,8 @@ #include #include +#include + namespace boost { namespace geometry { #ifndef DOXYGEN_NO_DETAIL @@ -190,25 +192,15 @@ struct point_in_geometry template static inline int apply(Point const& point, Ring const& ring, Strategy const& strategy) { - static const iterate_direction direction = order_as_direction::value>::value; - static const closure_selector closure = geometry::closure::value; - - if (boost::size(ring) - < core_detail::closure::minimum_ring_size::value) + if ( boost::size(ring) < core_detail::closure::minimum_ring_size + < + geometry::closure::value + >::value ) { return -1; } - typedef typename reversible_view::type rev_view_type; - typedef typename closeable_view - < - rev_view_type const, closure - >::type cl_view_type; - typedef typename boost::range_iterator::type iterator_type; - - rev_view_type rev_view(ring); - cl_view_type view(rev_view); - + detail::normalized_view view(ring); return detail::within::point_in_range(point, view, strategy); } }; From b670b37643316beb2f0a64fced19377b952f33d9 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 13:52:43 +0200 Subject: [PATCH 04/19] [sectionalize] Fix unused typedef warnings --- .../boost/geometry/algorithms/detail/sections/sectionalize.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp b/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp index ae6bb72dd..e6b4c2607 100644 --- a/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp +++ b/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp @@ -204,7 +204,6 @@ struct check_duplicate_loop template static inline bool apply(Segment const& seg) { - typedef typename coordinate_type::type coordinate_type; if (! geometry::math::equals ( geometry::get<0, Dimension>(seg), @@ -486,7 +485,7 @@ struct sectionalize_polygon ring_identifier ring_id, std::size_t max_count) { typedef typename point_type::type point_type; - typedef typename ring_type::type ring_type; + //typedef typename ring_type::type ring_type; typedef sectionalize_range < closure::value, Reverse, From 9881f4f56d7076ed37972f0728fd469b6449b29b Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 13:53:57 +0200 Subject: [PATCH 05/19] [get_turns] Fix unused typedef warnings --- include/boost/geometry/algorithms/detail/overlay/get_turns.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp index 0047d73a1..14220e87b 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp @@ -558,8 +558,6 @@ struct get_turns_cs InterruptPolicy& interrupt_policy, int multi_index = -1, int ring_index = -1) { - typedef typename boost::range_value::type turn_info; - if ( boost::size(range) <= 1) { return; From 2265430625d21085c11f5edab37942e231f3b157 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 13:55:51 +0200 Subject: [PATCH 06/19] [disjoint] Fix unused typedef warnings --- .../geometry/algorithms/detail/disjoint/areal_areal.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/disjoint/areal_areal.hpp b/include/boost/geometry/algorithms/detail/disjoint/areal_areal.hpp index 75e0ae293..05f264602 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/areal_areal.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/areal_areal.hpp @@ -80,7 +80,7 @@ struct general_areal static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2) { - if ( !disjoint_linear::apply(geometry1, geometry2)) + if ( ! disjoint_linear::apply(geometry1, geometry2) ) { return false; } @@ -91,11 +91,8 @@ struct general_areal // We check that using a point on the surface, and see if that is inside // the other geometry. And vice versa. - typedef typename geometry::point_type::type point_type1; - typedef typename geometry::point_type::type point_type2; - - if (rings_containing(geometry1, geometry2) - || rings_containing(geometry2, geometry1)) + if ( rings_containing(geometry1, geometry2) + || rings_containing(geometry2, geometry1) ) { return false; } From a40a86b5325c39fbb66f97b1a4d61301b1e980be Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 14:04:42 +0200 Subject: [PATCH 07/19] [intersects] Fix unused typedef warning --- .../boost/geometry/algorithms/intersects.hpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/include/boost/geometry/algorithms/intersects.hpp b/include/boost/geometry/algorithms/intersects.hpp index 8aa45d56c..12cf78173 100644 --- a/include/boost/geometry/algorithms/intersects.hpp +++ b/include/boost/geometry/algorithms/intersects.hpp @@ -61,25 +61,16 @@ inline bool intersects(Geometry const& geometry) typedef detail::overlay::get_turn_info < detail::overlay::assign_null_policy - > TurnPolicy; - - typedef typename strategy_intersection - < - typename cs_tag::type, - Geometry, - Geometry, - point_type, - rescale_policy_type - >::segment_intersection_strategy_type segment_intersection_strategy_type; + > turn_policy; rescale_policy_type robust_policy - = geometry::get_rescale_policy(geometry); + = geometry::get_rescale_policy(geometry); detail::disjoint::disjoint_interrupt_policy policy; detail::self_get_turn_points::get_turns - < - TurnPolicy - >::apply(geometry, robust_policy, turns, policy); + < + turn_policy + >::apply(geometry, robust_policy, turns, policy); return policy.has_intersections; } From 779e05c29238d66ac2ec965adf1f4591f777776f Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Fri, 30 May 2014 15:09:20 +0300 Subject: [PATCH 08/19] [strategies][distance] fix names of template parameters to better reflect the corresponding objects --- .../strategies/cartesian/distance_pythagoras_point_box.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp b/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp index 29beb3dc6..95cd48027 100644 --- a/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp @@ -322,15 +322,15 @@ struct default_strategy typedef pythagoras_point_box<> type; }; -template +template struct default_strategy < - box_tag, point_tag, Box, Point, cartesian_tag, cartesian_tag + box_tag, point_tag, BoxPoint, Point, cartesian_tag, cartesian_tag > { typedef typename default_strategy < - point_tag, box_tag, Point, Box, cartesian_tag, cartesian_tag + point_tag, box_tag, Point, BoxPoint, cartesian_tag, cartesian_tag >::type type; }; From 694fbffdeba7d558da46bb6202dc8f10a6d3aab2 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 14:12:14 +0200 Subject: [PATCH 09/19] [relate] Fix unused typedef warnings --- .../boost/geometry/algorithms/detail/relate/areal_areal.hpp | 1 - .../boost/geometry/algorithms/detail/relate/linear_areal.hpp | 1 - .../geometry/algorithms/detail/relate/linear_linear.hpp | 1 - .../boost/geometry/algorithms/detail/relate/point_point.hpp | 1 - include/boost/geometry/algorithms/detail/relate/turns.hpp | 5 ++--- 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp b/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp index fea695e7c..151f94ade 100644 --- a/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp @@ -202,7 +202,6 @@ struct areal_areal // get and analyse turns typedef typename turns::get_turns::turn_info turn_type; - typedef typename std::vector::iterator turn_iterator; std::vector turns; interrupt_policy_areal_areal interrupt_policy(geometry1, geometry2, result); diff --git a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp index 26750de3b..8d9f74e7f 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp @@ -205,7 +205,6 @@ struct linear_areal // get and analyse turns typedef typename turns::get_turns::turn_info turn_type; - typedef typename std::vector::iterator turn_iterator; std::vector turns; interrupt_policy_linear_areal interrupt_policy(geometry2, result); diff --git a/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp b/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp index 3476a4178..3db680db2 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp @@ -120,7 +120,6 @@ struct linear_linear // get and analyse turns typedef typename turns::get_turns::turn_info turn_type; - typedef typename std::vector::iterator turn_iterator; std::vector turns; interrupt_policy_linear_linear interrupt_policy(result); diff --git a/include/boost/geometry/algorithms/detail/relate/point_point.hpp b/include/boost/geometry/algorithms/detail/relate/point_point.hpp index fcbb1d7ee..f1af67cd6 100644 --- a/include/boost/geometry/algorithms/detail/relate/point_point.hpp +++ b/include/boost/geometry/algorithms/detail/relate/point_point.hpp @@ -56,7 +56,6 @@ std::pair point_multipoint_check(Point const& point, MultiPoint cons // point_in_geometry could be used here but why iterate over MultiPoint twice? // we must search for a point in the exterior because all points in MultiPoint can be equal - typedef typename boost::range_value::type point_type; typedef typename boost::range_iterator::type iterator; iterator it = boost::begin(multi_point); iterator last = boost::end(multi_point); diff --git a/include/boost/geometry/algorithms/detail/relate/turns.hpp b/include/boost/geometry/algorithms/detail/relate/turns.hpp index c373e9f63..b8c292bee 100644 --- a/include/boost/geometry/algorithms/detail/relate/turns.hpp +++ b/include/boost/geometry/algorithms/detail/relate/turns.hpp @@ -70,8 +70,6 @@ struct get_turns Geometry2 const& geometry2, InterruptPolicy & interrupt_policy) { - typedef typename geometry::point_type::type point1_type; - static const bool reverse1 = detail::overlay::do_reverse::value>::value; static const bool reverse2 = detail::overlay::do_reverse::value>::value; @@ -84,7 +82,8 @@ struct get_turns reverse1, reverse2, GetTurnPolicy - >::apply(0, geometry1, 1, geometry2, detail::no_rescale_policy(), turns, interrupt_policy); + >::apply(0, geometry1, 1, geometry2, + detail::no_rescale_policy(), turns, interrupt_policy); } }; From 81e0d3fac45a8886dfeac9261f3978a9d5c6fac7 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 14:16:17 +0200 Subject: [PATCH 10/19] [overlay] Fix unused typedef warnings --- .../algorithms/detail/overlay/copy_segments.hpp | 8 +++++--- .../geometry/algorithms/detail/overlay/overlay.hpp | 13 ++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/copy_segments.hpp b/include/boost/geometry/algorithms/detail/overlay/copy_segments.hpp index 05b348a6d..f7fee8bb9 100644 --- a/include/boost/geometry/algorithms/detail/overlay/copy_segments.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/copy_segments.hpp @@ -147,11 +147,12 @@ public: RobustPolicy const& robust_policy, RangeOut& current_output) { - typedef typename boost::range_iterator::type iterator; int const from_index = seg_id.segment_index + 1; // Sanity check - if (from_index > to_index || from_index < 0 || to_index >= int(boost::size(ls))) + if ( from_index > to_index + || from_index < 0 + || to_index >= int(boost::size(ls)) ) { return; } @@ -159,7 +160,8 @@ public: typedef typename boost::range_difference::type size_type; size_type const count = to_index - from_index + 1; - typename boost::range_iterator::type it = boost::begin(ls) + from_index; + typename boost::range_iterator::type + it = boost::begin(ls) + from_index; for (size_type i = 0; i < count; ++i, ++it) { diff --git a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp index c194283f9..29e0dad0c 100644 --- a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp @@ -165,14 +165,14 @@ struct overlay OutputIterator out, Strategy const& ) { - if (geometry::num_points(geometry1) == 0 - && geometry::num_points(geometry2) == 0) + if ( geometry::num_points(geometry1) == 0 + && geometry::num_points(geometry2) == 0 ) { return out; } - if (geometry::num_points(geometry1) == 0 - || geometry::num_points(geometry2) == 0) + if ( geometry::num_points(geometry1) == 0 + || geometry::num_points(geometry2) == 0 ) { return return_if_one_input_is_empty < @@ -180,7 +180,6 @@ struct overlay >(geometry1, geometry2, out); } - typedef typename geometry::coordinate_type::type coordinate_type; typedef typename geometry::point_type::type point_type; typedef detail::overlay::traversal_turn_info < @@ -275,8 +274,8 @@ std::cout << "traverse" << std::endl; ring_identifier id(2, 0, -1); for (typename boost::range_iterator::type it = boost::begin(rings); - it != boost::end(rings); - ++it) + it != boost::end(rings); + ++it) { selected[id] = properties(*it, true); selected[id].reversed = ReverseOut; From f614512cfa4e56e1e17e60a1d3723b7a664e2dd6 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 14:19:16 +0200 Subject: [PATCH 11/19] [reverse] Fix unused typedef warning --- include/boost/geometry/algorithms/reverse.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/boost/geometry/algorithms/reverse.hpp b/include/boost/geometry/algorithms/reverse.hpp index 215cb5b59..d1f927692 100644 --- a/include/boost/geometry/algorithms/reverse.hpp +++ b/include/boost/geometry/algorithms/reverse.hpp @@ -50,13 +50,12 @@ struct polygon_reverse: private range_reverse template static inline void apply(Polygon& polygon) { - typedef typename geometry::ring_type::type ring_type; - range_reverse::apply(exterior_ring(polygon)); - typename interior_return_type::type rings - = interior_rings(polygon); - for (BOOST_AUTO_TPL(it, boost::begin(rings)); it != boost::end(rings); ++it) + typename interior_return_type::type + rings = interior_rings(polygon); + for (BOOST_AUTO_TPL(it, boost::begin(rings)); + it != boost::end(rings); ++it) { range_reverse::apply(*it); } From cda70f4326afeb2bd9ca1efba17e978c2b66c29a Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 14:21:19 +0200 Subject: [PATCH 12/19] [touches] Fix unused typedef warning --- include/boost/geometry/algorithms/touches.hpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/boost/geometry/algorithms/touches.hpp b/include/boost/geometry/algorithms/touches.hpp index 5ffc3eb34..a06071d42 100644 --- a/include/boost/geometry/algorithms/touches.hpp +++ b/include/boost/geometry/algorithms/touches.hpp @@ -248,11 +248,6 @@ struct areal_areal typename segment_ratio_type::type > turn_info; - typedef detail::overlay::get_turn_info - < - detail::overlay::assign_null_policy - > policy_type; - std::deque turns; detail::touches::areal_interrupt_policy policy; rescale_policy_type robust_policy; From 01a34d6b7129c6ee637798ced5238b3300f83dd3 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 14:23:47 +0200 Subject: [PATCH 13/19] [index/varray] Fix unused typedef warnings --- include/boost/geometry/index/detail/varray.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/boost/geometry/index/detail/varray.hpp b/include/boost/geometry/index/detail/varray.hpp index f736a9db9..a795b7c3f 100644 --- a/include/boost/geometry/index/detail/varray.hpp +++ b/include/boost/geometry/index/detail/varray.hpp @@ -1946,7 +1946,6 @@ public: void insert(iterator, Iterator first, Iterator last) { // TODO - add MPL_ASSERT, check if Iterator is really an iterator - typedef typename boost::iterator_traversal::type traversal; errh::check_capacity(*this, std::distance(first, last)); // may throw } @@ -1970,7 +1969,6 @@ public: void assign(Iterator first, Iterator last) { // TODO - add MPL_ASSERT, check if Iterator is really an iterator - typedef typename boost::iterator_traversal::type traversal; errh::check_capacity(*this, std::distance(first, last)); // may throw } From 8d4a61d49675815893a36eca0c176558f906df71 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 14:26:44 +0200 Subject: [PATCH 14/19] [index/rtree] Fix unused typedef warnings --- .../geometry/index/detail/rtree/linear/redistribute_elements.hpp | 1 - .../index/detail/rtree/quadratic/redistribute_elements.hpp | 1 - 2 files changed, 2 deletions(-) diff --git a/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp b/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp index 9842864e3..1f649bbdf 100644 --- a/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp +++ b/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp @@ -329,7 +329,6 @@ struct redistribute_elements::type elements_type; typedef typename elements_type::value_type element_type; typedef typename rtree::element_indexable_type::type indexable_type; - typedef typename coordinate_type::type coordinate_type; typedef typename index::detail::default_content_result::type content_type; elements_type & elements1 = rtree::elements(n); diff --git a/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp b/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp index 2cf4cf051..90d080c54 100644 --- a/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp +++ b/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp @@ -108,7 +108,6 @@ struct redistribute_elements::type elements_type; typedef typename elements_type::value_type element_type; typedef typename rtree::element_indexable_type::type indexable_type; - typedef typename coordinate_type::type coordinate_type; elements_type & elements1 = rtree::elements(n); elements_type & elements2 = rtree::elements(second_node); From c9b975f556b8c907ee028737f3caff36c9764172 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 14:29:11 +0200 Subject: [PATCH 15/19] [overlay] Fix unused typedef warning --- .../detail/overlay/get_intersection_points.hpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp b/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp index d9c423ca4..63011c7d4 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp @@ -115,15 +115,6 @@ inline void get_intersection_points(Geometry1 const& geometry1, typename boost::range_value::type > TurnPolicy; - typedef typename strategy_intersection - < - typename cs_tag::type, - Geometry1, - Geometry2, - typename point_type::type, // TODO from both - RobustPolicy - >::segment_intersection_strategy_type segment_intersection_strategy_type; - detail::get_turns::no_interrupt_policy interrupt_policy; boost::mpl::if_c From 9f814ae1baf7b24c09bbb5305c78b7a9a88ad8a8 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 15:17:46 +0200 Subject: [PATCH 16/19] [simplify] Fix unused typedef warning --- include/boost/geometry/algorithms/simplify.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/boost/geometry/algorithms/simplify.hpp b/include/boost/geometry/algorithms/simplify.hpp index 6dae3c98c..846874cc7 100644 --- a/include/boost/geometry/algorithms/simplify.hpp +++ b/include/boost/geometry/algorithms/simplify.hpp @@ -449,8 +449,6 @@ inline void simplify(Geometry const& geometry, Geometry& out, { concept::check(); - typedef typename point_type::type point_type; - simplify(geometry, out, max_distance, default_strategy()); } From cbb408b7d53251ec41de68e80e4fa495141ffe3c Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 15:19:12 +0200 Subject: [PATCH 17/19] [transform] Fix unused typedef warnings --- include/boost/geometry/algorithms/transform.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/boost/geometry/algorithms/transform.hpp b/include/boost/geometry/algorithms/transform.hpp index 11c417e61..7dc917f93 100644 --- a/include/boost/geometry/algorithms/transform.hpp +++ b/include/boost/geometry/algorithms/transform.hpp @@ -153,8 +153,6 @@ struct transform_polygon static inline bool apply(Polygon1 const& poly1, Polygon2& poly2, Strategy const& strategy) { - typedef typename ring_type::type ring1_type; - typedef typename ring_type::type ring2_type; typedef typename point_type::type point2_type; geometry::clear(poly2); From b48748a3d347124e022ea77587f27d02b78fad90 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 30 May 2014 15:20:36 +0200 Subject: [PATCH 18/19] [remove_spikes] Fix unused typedef warning --- include/boost/geometry/algorithms/remove_spikes.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/boost/geometry/algorithms/remove_spikes.hpp b/include/boost/geometry/algorithms/remove_spikes.hpp index 62845135f..8e1671824 100644 --- a/include/boost/geometry/algorithms/remove_spikes.hpp +++ b/include/boost/geometry/algorithms/remove_spikes.hpp @@ -75,8 +75,6 @@ struct range_remove_spikes return; } - typedef typename boost::range_iterator::type iterator; - std::deque cleaned; for (typename boost::range_iterator::type it = boost::begin(range); it != boost::end(range); ++it) From dfd38081bcedc892efdee63a2db3c0c1b8176209 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Mon, 2 Jun 2014 23:04:29 +0200 Subject: [PATCH 19/19] [extensions][distance] fix default_strategy extra tag --- include/boost/geometry/extensions/algorithms/connect.hpp | 4 ++-- include/boost/geometry/extensions/algorithms/selected.hpp | 2 +- .../geometry/extensions/gis/geographic/strategies/andoyer.hpp | 2 +- .../gis/geographic/strategies/distance_cross_track.hpp | 4 ++-- .../boost/geometry/extensions/nsphere/algorithms/within.hpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/boost/geometry/extensions/algorithms/connect.hpp b/include/boost/geometry/extensions/algorithms/connect.hpp index 292a503e5..f4cc12b29 100644 --- a/include/boost/geometry/extensions/algorithms/connect.hpp +++ b/include/boost/geometry/extensions/algorithms/connect.hpp @@ -60,7 +60,7 @@ struct map_policy { typedef typename strategy::distance::services::default_strategy < - point_tag, Point + point_tag, point_tag, Point >::type strategy_type; // Have a map > such that we can find @@ -181,7 +181,7 @@ struct fuzzy_policy { typedef typename strategy::distance::services::default_strategy < - point_tag, Point + point_tag, point_tag, Point >::type strategy_type; // Have a map > such that we can find diff --git a/include/boost/geometry/extensions/algorithms/selected.hpp b/include/boost/geometry/extensions/algorithms/selected.hpp index 805f8d7fb..8890d6ab0 100644 --- a/include/boost/geometry/extensions/algorithms/selected.hpp +++ b/include/boost/geometry/extensions/algorithms/selected.hpp @@ -145,7 +145,7 @@ struct close_to_segment // Call corresponding strategy typedef typename strategy::distance::services::default_strategy < - segment_tag, P, PS + point_tag, segment_tag, P, PS >::type strategy_type; typedef typename strategy::distance::services::return_type::type return_type; diff --git a/include/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp b/include/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp index b4c016c90..d3a9aff71 100644 --- a/include/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp +++ b/include/boost/geometry/extensions/gis/geographic/strategies/andoyer.hpp @@ -198,7 +198,7 @@ struct result_from_distance, P1, P2> template -struct default_strategy +struct default_strategy { typedef strategy::distance::andoyer::type> type; }; diff --git a/include/boost/geometry/extensions/gis/geographic/strategies/distance_cross_track.hpp b/include/boost/geometry/extensions/gis/geographic/strategies/distance_cross_track.hpp index da1a27256..4e00c4b74 100644 --- a/include/boost/geometry/extensions/gis/geographic/strategies/distance_cross_track.hpp +++ b/include/boost/geometry/extensions/gis/geographic/strategies/distance_cross_track.hpp @@ -31,7 +31,7 @@ namespace services template -struct default_strategy +struct default_strategy { typedef cross_track < @@ -41,7 +41,7 @@ struct default_strategy, typename default_strategy < - point_tag, Point, PointOfSegment, + point_tag, point_tag, Point, PointOfSegment, geographic_tag, geographic_tag >::type, Strategy diff --git a/include/boost/geometry/extensions/nsphere/algorithms/within.hpp b/include/boost/geometry/extensions/nsphere/algorithms/within.hpp index d28ea42ae..19005d354 100644 --- a/include/boost/geometry/extensions/nsphere/algorithms/within.hpp +++ b/include/boost/geometry/extensions/nsphere/algorithms/within.hpp @@ -53,7 +53,7 @@ inline bool point_in_circle(P const& p, C const& c) typedef typename point_type::type point_type; typedef typename services::default_strategy < - point_tag, P, point_type + point_tag, point_tag, P, point_type >::type strategy_type; typedef typename services::return_type::type return_type;