diff --git a/include/boost/geometry/algorithms/area.hpp b/include/boost/geometry/algorithms/area.hpp index 4dc62ac84..28ab0a21d 100644 --- a/include/boost/geometry/algorithms/area.hpp +++ b/include/boost/geometry/algorithms/area.hpp @@ -107,7 +107,7 @@ struct ring_area auto const end = boost::end(view); strategy_type const strategy = strategies.area(ring); - typename strategy_type::template state state; + typename strategy_type::template state state; for (auto previous = it++; it != end; ++previous, ++it) { diff --git a/include/boost/geometry/algorithms/assign.hpp b/include/boost/geometry/algorithms/assign.hpp index 8ab4745d2..fa621d71a 100644 --- a/include/boost/geometry/algorithms/assign.hpp +++ b/include/boost/geometry/algorithms/assign.hpp @@ -231,7 +231,7 @@ struct assign concepts::check(); concepts::check(); concepts::check_concepts_and_equal_dimensions(); - + static bool const same_point_order = point_order::value == point_order::value; BOOST_GEOMETRY_STATIC_ASSERT( @@ -244,23 +244,23 @@ struct assign same_closure, "Assign is not supported for different closures.", Geometry1, Geometry2); - + dispatch::convert::apply(geometry2, geometry1); } }; - - + + template struct assign, Geometry2> { struct visitor: static_visitor { Geometry2 const& m_geometry2; - + visitor(Geometry2 const& geometry2) : m_geometry2(geometry2) {} - + template result_type operator()(Geometry1& geometry1) const { @@ -272,7 +272,7 @@ struct assign, Geometry2> (geometry1, m_geometry2); } }; - + static inline void apply(variant& geometry1, Geometry2 const& geometry2) @@ -280,19 +280,19 @@ struct assign, Geometry2> return boost::apply_visitor(visitor(geometry2), geometry1); } }; - - + + template struct assign > { struct visitor: static_visitor { Geometry1& m_geometry1; - + visitor(Geometry1 const& geometry1) : m_geometry1(geometry1) {} - + template result_type operator()(Geometry2 const& geometry2) const { @@ -304,7 +304,7 @@ struct assign > (m_geometry1, geometry2); } }; - + static inline void apply(Geometry1& geometry1, variant const& geometry2) @@ -312,8 +312,8 @@ struct assign > return boost::apply_visitor(visitor(geometry1), geometry2); } }; - - + + template struct assign, variant > { @@ -332,7 +332,7 @@ struct assign, variant& geometry1, variant const& geometry2) @@ -340,9 +340,9 @@ struct assign, variant(); concepts::check(); - + return resolve_strategy::azimuth < default_strategy diff --git a/include/boost/geometry/algorithms/centroid.hpp b/include/boost/geometry/algorithms/centroid.hpp index 291560d34..2c2165a82 100644 --- a/include/boost/geometry/algorithms/centroid.hpp +++ b/include/boost/geometry/algorithms/centroid.hpp @@ -218,7 +218,7 @@ struct centroid_range { // prepare translation transformer translating_transformer transformer(*boost::begin(range)); - + typename Strategy::template state_type < typename geometry::point_type::type, @@ -226,7 +226,7 @@ struct centroid_range >::type state; centroid_range_state::apply(range, transformer, strategy, state); - + if ( strategy.result(state, centroid) ) { // translate the result back @@ -277,7 +277,7 @@ struct centroid_polygon // prepare translation transformer translating_transformer transformer(*boost::begin(exterior_ring(poly))); - + typename Strategy::template state_type < typename geometry::point_type::type, @@ -285,7 +285,7 @@ struct centroid_polygon >::type state; centroid_polygon_state::apply(poly, transformer, strategy, state); - + if ( strategy.result(state, centroid) ) { // translate the result back @@ -366,7 +366,7 @@ struct centroid_multi transformer.apply_reverse(centroid); return true; } - + return false; } }; diff --git a/include/boost/geometry/algorithms/convert.hpp b/include/boost/geometry/algorithms/convert.hpp index ac9cffa45..e8512ce87 100644 --- a/include/boost/geometry/algorithms/convert.hpp +++ b/include/boost/geometry/algorithms/convert.hpp @@ -152,7 +152,7 @@ struct range_to_range geometry::detail::conversion::convert_point_to_point(point1, point2); } }; - + static inline void apply(Range1 const& source, Range2& destination) { apply(source, destination, default_policy()); diff --git a/include/boost/geometry/algorithms/crosses.hpp b/include/boost/geometry/algorithms/crosses.hpp index d44e75e98..040076d3d 100644 --- a/include/boost/geometry/algorithms/crosses.hpp +++ b/include/boost/geometry/algorithms/crosses.hpp @@ -231,7 +231,7 @@ struct crosses >::apply(geometry1, geometry2, strategy); } }; - + template struct crosses @@ -295,10 +295,10 @@ struct crosses policy(rng_out); @@ -349,7 +349,7 @@ struct densify < Geometry >::type strategies_type; - + dispatch::densify < Geometry, Geometry diff --git a/include/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp b/include/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp index b1930dc0c..93f473e19 100644 --- a/include/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp @@ -32,7 +32,7 @@ namespace detail { namespace buffer { -template +template struct original_get_box { explicit original_get_box(Strategy const& strategy) diff --git a/include/boost/geometry/algorithms/detail/calculate_point_order.hpp b/include/boost/geometry/algorithms/detail/calculate_point_order.hpp index a9362b361..379bbb33f 100644 --- a/include/boost/geometry/algorithms/detail/calculate_point_order.hpp +++ b/include/boost/geometry/algorithms/detail/calculate_point_order.hpp @@ -128,14 +128,14 @@ struct calculate_point_order_by_azimuth { // Add point cleaned.push_back(clean_point_t(it)); - + while (cleaned.size() >= 3) { cleaned_iter_t it0 = cleaned.end() - 3; cleaned_iter_t it1 = cleaned.end() - 2; cleaned_iter_t it2 = cleaned.end() - 1; - calc_t diff; + calc_t diff; if (get_or_calculate_azimuths_difference(*it0, *it1, *it2, diff, strategy) && ! math::equals(math::abs(diff), pi)) { @@ -148,7 +148,7 @@ struct calculate_point_order_by_azimuth // TODO: angles have to be invalidated only if spike is detected // for duplicates it'd be ok to leave them it0->set_azimuth_invalid(); - it0->set_azimuth_difference_invalid(); + it0->set_azimuth_difference_invalid(); it2->set_azimuth_difference_invalid(); cleaned.erase(it1); } @@ -269,7 +269,7 @@ private: razi = p0.reverse_azimuth(); return true; } - + if (strategy.apply(p0.ref(), p1.ref(), azi, razi)) { p0.set_azimuths(azi, razi); diff --git a/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp b/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp index 56a7e3ec9..042891e6e 100644 --- a/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp +++ b/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp @@ -75,7 +75,7 @@ struct translating_transformer { typedef typename geometry::point_type::type point_type; typedef point_type result_type; - + explicit translating_transformer(Geometry const& geom) : m_origin(NULL) { diff --git a/include/boost/geometry/algorithms/detail/closest_feature/geometry_to_range.hpp b/include/boost/geometry/algorithms/detail/closest_feature/geometry_to_range.hpp index 4ac5ac697..c5d331aaf 100644 --- a/include/boost/geometry/algorithms/detail/closest_feature/geometry_to_range.hpp +++ b/include/boost/geometry/algorithms/detail/closest_feature/geometry_to_range.hpp @@ -92,7 +92,7 @@ public: typename RangeIterator, typename Strategy, typename Distance - > + > static inline RangeIterator apply(Geometry const& geometry, RangeIterator first, RangeIterator last, @@ -111,7 +111,7 @@ public: typename Geometry, typename RangeIterator, typename Strategy - > + > static inline RangeIterator apply(Geometry const& geometry, RangeIterator first, RangeIterator last, diff --git a/include/boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp b/include/boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp index 8ca0b3a7b..ed2efd6fc 100644 --- a/include/boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp +++ b/include/boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp @@ -189,7 +189,7 @@ private: it_min1 = it_back; it_min2 = first; } - } + } public: typedef typename std::pair return_type; diff --git a/include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp b/include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp index 52b2495d1..be1729a86 100644 --- a/include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp +++ b/include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp @@ -150,7 +150,7 @@ public: apply(rtree_first, rtree_last, queries_first, queries_last, strategy, rtree_min, qit_min, dist_min); - return std::make_pair(rtree_min, qit_min); + return std::make_pair(rtree_min, qit_min); } diff --git a/include/boost/geometry/algorithms/detail/closest_points/interface.hpp b/include/boost/geometry/algorithms/detail/closest_points/interface.hpp index f2760f972..622c47ba7 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/interface.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/interface.hpp @@ -42,9 +42,9 @@ namespace dispatch template < - typename Geometry1, - typename Geometry2, - typename Tag1, + typename Geometry1, + typename Geometry2, + typename Tag1, typename Tag2 > struct closest_points @@ -62,8 +62,8 @@ struct closest_points < Geometry2, Geometry1, Tag2, Tag1, false >::apply(g2, g1, shortest_seg, strategy); - - detail::closest_points::swap_segment_points::apply(shortest_seg); + + detail::closest_points::swap_segment_points::apply(shortest_seg); } }; diff --git a/include/boost/geometry/algorithms/detail/closest_points/linear_or_areal_to_areal.hpp b/include/boost/geometry/algorithms/detail/closest_points/linear_or_areal_to_areal.hpp index b33b4be3b..6d643e1ac 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/linear_or_areal_to_areal.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/linear_or_areal_to_areal.hpp @@ -44,44 +44,44 @@ struct linear_to_areal >::type; using linestring_type = geometry::model::linestring; - + /* TODO: currently intersection does not support some cases of tupled input * such as linestring - multipolygon * this could be implemented directly with dynamic geometries using polygon_type = geometry::model::polygon; std::tuple < - geometry::model::multi_point, + geometry::model::multi_point, geometry::model::multi_linestring, geometry::model::multi_polygon > tp; bool intersect_tp = geometry::intersection(linear, areal, tp, strategies); */ - + geometry::model::multi_point mp_out; geometry::intersection(linear, areal, mp_out, strategies); - + if (! boost::empty(mp_out)) { - set_segment_from_points::apply(*boost::begin(mp_out), - *boost::begin(mp_out), + set_segment_from_points::apply(*boost::begin(mp_out), + *boost::begin(mp_out), shortest_seg); return; } - - // if there are no intersection points then check if the linear geometry + + // if there are no intersection points then check if the linear geometry // (or part of it) is inside the areal and return any point of this part geometry::model::multi_linestring ln_out; - geometry::intersection(linear, areal, ln_out, strategies); - + geometry::intersection(linear, areal, ln_out, strategies); + if (! boost::empty(ln_out)) { - set_segment_from_points::apply(*boost::begin(*boost::begin(ln_out)), - *boost::begin(*boost::begin(ln_out)), - shortest_seg); + set_segment_from_points::apply(*boost::begin(*boost::begin(ln_out)), + *boost::begin(*boost::begin(ln_out)), + shortest_seg); return; } - + linear_to_linear::apply(linear, areal, shortest_seg, strategies, false); } }; @@ -104,7 +104,7 @@ struct segment_to_areal template static inline void apply(Segment const& segment, Areal const& areal, - OutSegment& shortest_seg, + OutSegment& shortest_seg, Strategies const& strategies, bool = false) { @@ -120,7 +120,7 @@ struct areal_to_segment template static inline void apply(Areal const& areal, Segment const& segment, - OutSegment& shortest_seg, + OutSegment& shortest_seg, Strategies const& strategies, bool = false) { @@ -148,47 +148,47 @@ struct areal_to_areal using linestring_type = geometry::model::linestring; using polygon_type = geometry::model::polygon; - + /* TODO: currently intersection does not support tupled input * this should be implemented directly with dynamic geometries */ - + geometry::model::multi_point mp_out; geometry::intersection(areal1, areal2, mp_out, strategies); - + if (! boost::empty(mp_out)) { - set_segment_from_points::apply(*boost::begin(mp_out), - *boost::begin(mp_out), + set_segment_from_points::apply(*boost::begin(mp_out), + *boost::begin(mp_out), shortest_seg); return; } - + // if there are no intersection points then the linear geometry (or part of it) // is inside the areal; return any point of this part geometry::model::multi_linestring ln_out; - geometry::intersection(areal1, areal2, ln_out, strategies); - + geometry::intersection(areal1, areal2, ln_out, strategies); + if (! boost::empty(ln_out)) { - set_segment_from_points::apply(*boost::begin(*boost::begin(ln_out)), - *boost::begin(*boost::begin(ln_out)), - shortest_seg); + set_segment_from_points::apply(*boost::begin(*boost::begin(ln_out)), + *boost::begin(*boost::begin(ln_out)), + shortest_seg); return; } geometry::model::multi_polygon pl_out; - geometry::intersection(areal1, areal2, pl_out, strategies); - + geometry::intersection(areal1, areal2, pl_out, strategies); + if (! boost::empty(pl_out)) { set_segment_from_points::apply( - *boost::begin(boost::geometry::exterior_ring(*boost::begin(pl_out))), - *boost::begin(boost::geometry::exterior_ring(*boost::begin(pl_out))), - shortest_seg); + *boost::begin(boost::geometry::exterior_ring(*boost::begin(pl_out))), + *boost::begin(boost::geometry::exterior_ring(*boost::begin(pl_out))), + shortest_seg); return; } - + linear_to_linear::apply(areal1, areal2, shortest_seg, strategies, false); } }; @@ -205,7 +205,7 @@ namespace dispatch template struct closest_points < - Linear, Areal, + Linear, Areal, linear_tag, areal_tag, false > @@ -216,7 +216,7 @@ template struct closest_points < Areal, Linear, - areal_tag, linear_tag, + areal_tag, linear_tag, false > : detail::closest_points::areal_to_linear @@ -225,7 +225,7 @@ struct closest_points template struct closest_points < - Segment, Areal, + Segment, Areal, segment_tag, areal_tag, false > @@ -236,7 +236,7 @@ template struct closest_points < Areal, Segment, - areal_tag, segment_tag, + areal_tag, segment_tag, false > : detail::closest_points::areal_to_segment @@ -246,7 +246,7 @@ template struct closest_points < Areal1, Areal2, - areal_tag, areal_tag, + areal_tag, areal_tag, false > : detail::closest_points::areal_to_areal diff --git a/include/boost/geometry/algorithms/detail/closest_points/linear_to_linear.hpp b/include/boost/geometry/algorithms/detail/closest_points/linear_to_linear.hpp index 4b8499536..d2927a6d3 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/linear_to_linear.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/linear_to_linear.hpp @@ -35,7 +35,7 @@ struct linear_to_linear template static inline void apply(Linear1 const& linear1, Linear2 const& linear2, - Segment& shortest_seg, + Segment& shortest_seg, Strategies const& strategies, bool = false) { @@ -86,7 +86,7 @@ struct segment_to_linear template static inline void apply(Segment const& segment, Linear const& linear, - OutSegment& shortest_seg, + OutSegment& shortest_seg, Strategies const& strategies, bool = false) { @@ -103,7 +103,7 @@ struct linear_to_segment template static inline void apply(Linear const& linear, Segment const& segment, - OutSegment& shortest_seg, + OutSegment& shortest_seg, Strategies const& strategies, bool = false) { @@ -124,7 +124,7 @@ template struct closest_points < Linear1, Linear2, - linear_tag, linear_tag, + linear_tag, linear_tag, false > : detail::closest_points::linear_to_linear {}; @@ -132,7 +132,7 @@ struct closest_points template struct closest_points < - Segment, Linear, + Segment, Linear, segment_tag, linear_tag, false > : detail::closest_points::segment_to_linear @@ -141,7 +141,7 @@ struct closest_points template struct closest_points < - Linear, Segment, + Linear, Segment, linear_tag, segment_tag, false > : detail::closest_points::linear_to_segment diff --git a/include/boost/geometry/algorithms/detail/closest_points/multipoint_to_geometry.hpp b/include/boost/geometry/algorithms/detail/closest_points/multipoint_to_geometry.hpp index 3b9b1d9f6..f59c85a9b 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/multipoint_to_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/multipoint_to_geometry.hpp @@ -33,11 +33,11 @@ namespace detail { namespace closest_points struct multipoint_to_multipoint { - template + template < - typename MultiPoint1, - typename MultiPoint2, - typename Segment, + typename MultiPoint1, + typename MultiPoint2, + typename Segment, typename Strategies > static inline void apply(MultiPoint1 const& multipoint1, @@ -67,11 +67,11 @@ struct multipoint_to_multipoint struct multipoint_to_linear { - template + template < - typename MultiPoint, - typename Linear, - typename Segment, + typename MultiPoint, + typename Linear, + typename Segment, typename Strategies > static inline void apply(MultiPoint const& multipoint, @@ -90,11 +90,11 @@ struct multipoint_to_linear struct linear_to_multipoint { - template + template < - typename Linear, - typename MultiPoint, - typename Segment, + typename Linear, + typename MultiPoint, + typename Segment, typename Strategies > static inline void apply(Linear const& linear, @@ -109,11 +109,11 @@ struct linear_to_multipoint struct segment_to_multipoint { - template + template < - typename Segment, - typename MultiPoint, - typename OutSegment, + typename Segment, + typename MultiPoint, + typename OutSegment, typename Strategies > static inline void apply(Segment const& segment, @@ -134,11 +134,11 @@ struct segment_to_multipoint struct multipoint_to_segment { - template + template < - typename MultiPoint, - typename Segment, - typename OutSegment, + typename MultiPoint, + typename Segment, + typename OutSegment, typename Strategies > static inline void apply(MultiPoint const& multipoint, @@ -152,7 +152,7 @@ struct multipoint_to_segment >; linestring_type linestring; convert(segment, linestring); - multipoint_to_linear::apply(multipoint, linestring, shortest_seg, + multipoint_to_linear::apply(multipoint, linestring, shortest_seg, strategies); } }; @@ -182,11 +182,11 @@ private: public: - template + template < - typename MultiPoint, - typename Areal, - typename Segment, + typename MultiPoint, + typename Areal, + typename Segment, typename Strategies > static inline void apply(MultiPoint const& multipoint, @@ -200,11 +200,11 @@ public: boost::begin(multipoint), boost::end(multipoint), predicate); - + if (it != boost::end(multipoint)) { return set_segment_from_points::apply(*it, *it, shortest_seg); - + } point_or_segment_range_to_geometry_rtree::apply( @@ -218,11 +218,11 @@ public: struct areal_to_multipoint { - template + template < - typename Areal, - typename MultiPoint, - typename Segment, + typename Areal, + typename MultiPoint, + typename Segment, typename Strategies > static inline void apply(Areal const& areal, @@ -248,7 +248,7 @@ namespace dispatch template struct closest_points < - MultiPoint1, MultiPoint2, + MultiPoint1, MultiPoint2, multi_point_tag, multi_point_tag, false > : detail::closest_points::multipoint_to_multipoint @@ -258,7 +258,7 @@ struct closest_points template struct closest_points < - MultiPoint, Linear, + MultiPoint, Linear, multi_point_tag, linear_tag, false > : detail::closest_points::multipoint_to_linear @@ -268,7 +268,7 @@ struct closest_points template struct closest_points < - Linear, MultiPoint, + Linear, MultiPoint, linear_tag, multi_point_tag, false > : detail::closest_points::linear_to_multipoint @@ -278,7 +278,7 @@ struct closest_points template struct closest_points < - MultiPoint, Segment, + MultiPoint, Segment, multi_point_tag, segment_tag, false > : detail::closest_points::multipoint_to_segment @@ -288,7 +288,7 @@ struct closest_points template struct closest_points < - Segment, MultiPoint, + Segment, MultiPoint, segment_tag, multi_point_tag, false > : detail::closest_points::segment_to_multipoint @@ -298,7 +298,7 @@ struct closest_points template struct closest_points < - MultiPoint, Areal, + MultiPoint, Areal, multi_point_tag, areal_tag, false > : detail::closest_points::multipoint_to_areal @@ -308,7 +308,7 @@ struct closest_points template struct closest_points < - Areal, MultiPoint, + Areal, MultiPoint, areal_tag, multi_point_tag, false > : detail::closest_points::areal_to_multipoint diff --git a/include/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp b/include/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp index 88fad5247..043f8fcbf 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/point_to_geometry.hpp @@ -53,7 +53,7 @@ namespace detail { namespace closest_points struct point_to_point { template - static inline void apply(P1 const& p1, P2 const& p2, + static inline void apply(P1 const& p1, P2 const& p2, Segment& shortest_seg, Strategies const&) { set_segment_from_points::apply(p1, p2, shortest_seg); @@ -75,7 +75,7 @@ struct point_to_segment auto closest_point = strategies.closest_points(point, segment) .apply(point, p[0], p[1]); - set_segment_from_points::apply(point, closest_point, shortest_seg); + set_segment_from_points::apply(point, closest_point, shortest_seg); } }; @@ -114,22 +114,22 @@ public: } closest_points::creturn_t cd_min; - + auto comparable_distance = strategy::distance::services::get_comparable < decltype(strategies.distance(point, range)) >::apply(strategies.distance(point, range)); - - auto closest_segment = point_to_point_range::apply(point, + + auto closest_segment = point_to_point_range::apply(point, boost::begin(range), - boost::end(range), + boost::end(range), comparable_distance, cd_min); - + auto closest_point = strategies.closest_points(point, range) .apply(point, *closest_segment.first, *closest_segment.second); - set_segment_from_points::apply(point, closest_point, shortest_seg); + set_segment_from_points::apply(point, closest_point, shortest_seg); } }; @@ -145,7 +145,7 @@ struct point_to_ring { if (within::within_point_geometry(point, ring, strategies)) { - set_segment_from_points::apply(point, point, shortest_seg); + set_segment_from_points::apply(point, point, shortest_seg); } else { @@ -154,7 +154,7 @@ struct point_to_ring closure::value >::apply(point, ring, shortest_seg, strategies); } - + } }; @@ -165,11 +165,11 @@ class point_to_polygon template struct distance_to_interior_rings { - template + template < - typename Point, - typename InteriorRingIterator, - typename Segment, + typename Point, + typename InteriorRingIterator, + typename Segment, typename Strategies > static inline void apply(Point const& point, @@ -191,14 +191,14 @@ class point_to_polygon return; } } - set_segment_from_points::apply(point, point, shortest_seg); + set_segment_from_points::apply(point, point, shortest_seg); } - template + template < - typename Point, - typename InteriorRings, - typename Segment, + typename Point, + typename InteriorRings, + typename Segment, typename Strategies > static inline void apply(Point const& point, InteriorRings const& interior_rings, @@ -214,11 +214,11 @@ class point_to_polygon public: - template + template < - typename Point, - typename Polygon, - typename Segment, + typename Point, + typename Polygon, + typename Segment, typename Strategies > static inline void apply(Point const& point, @@ -261,7 +261,7 @@ private: public: - template + template < typename Point, typename Segment, @@ -287,7 +287,7 @@ public: selector_type::end(multigeometry), comparable_distance, cd); - + dispatch::closest_points < Point, @@ -305,7 +305,7 @@ public: template struct point_to_multigeometry { - template + template < typename Point, typename Segment, @@ -318,7 +318,7 @@ struct point_to_multigeometry { if (within::covered_by_point_geometry(point, multipolygon, strategies)) { - set_segment_from_points::apply(point, point, shortest_seg); + set_segment_from_points::apply(point, point, shortest_seg); return; } diff --git a/include/boost/geometry/algorithms/detail/closest_points/range_to_geometry_rtree.hpp b/include/boost/geometry/algorithms/detail/closest_points/range_to_geometry_rtree.hpp index a61bf8564..8fa6b4a93 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/range_to_geometry_rtree.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/range_to_geometry_rtree.hpp @@ -86,7 +86,7 @@ public: cd); dispatch::closest_points < - point_or_segment_type, + point_or_segment_type, typename std::iterator_traits < typename selector_type::iterator_type diff --git a/include/boost/geometry/algorithms/detail/closest_points/segment_to_segment.hpp b/include/boost/geometry/algorithms/detail/closest_points/segment_to_segment.hpp index 0de45ed91..b7b8381a8 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/segment_to_segment.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/segment_to_segment.hpp @@ -44,7 +44,7 @@ namespace detail { namespace closest_points class segment_to_segment { public: - + template static inline void apply(Segment1 const& segment1, Segment2 const& segment2, OutputSegment& shortest_seg, @@ -66,12 +66,12 @@ public: intersection_policy()); if (is.count > 0) { - set_segment_from_points::apply(is.intersections[0], - is.intersections[0], + set_segment_from_points::apply(is.intersections[0], + is.intersections[0], shortest_seg); return; } - + typename point_type::type p[2]; detail::assign_point_from_index<0>(segment1, p[0]); detail::assign_point_from_index<1>(segment1, p[1]); @@ -86,17 +86,17 @@ public: auto cp3 = strategies.closest_points(p[1], segment2).apply(p[1], q[0], q[1]); closest_points::creturn_t d[4]; - + auto const cds = strategies::distance::detail::make_comparable(strategies) .distance(detail::dummy_point(), detail::dummy_point()); - + d[0] = cds.apply(cp0, q[0]); d[1] = cds.apply(cp1, q[1]); d[2] = cds.apply(p[0], cp2); d[3] = cds.apply(p[1], cp3); - std::size_t imin = std::distance(boost::addressof(d[0]), std::min_element(d, d + 4)); - + std::size_t imin = std::distance(boost::addressof(d[0]), std::min_element(d, d + 4)); + switch (imin) { case 0: diff --git a/include/boost/geometry/algorithms/detail/comparable_distance/interface.hpp b/include/boost/geometry/algorithms/detail/comparable_distance/interface.hpp index 14e2940d3..05bac8225 100644 --- a/include/boost/geometry/algorithms/detail/comparable_distance/interface.hpp +++ b/include/boost/geometry/algorithms/detail/comparable_distance/interface.hpp @@ -84,7 +84,7 @@ struct comparable_distance < strategies_type > comparable_strategies_type; - + return dispatch::distance < Geometry1, Geometry2, diff --git a/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp b/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp index 0fa011282..ed10d68de 100644 --- a/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp +++ b/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp @@ -207,7 +207,7 @@ struct convex_hull OutputGeometry& out, Strategy const& strategy) { - detail::convex_hull::input_geometry_proxy in_proxy(geometry); + detail::convex_hull::input_geometry_proxy in_proxy(geometry); detail::convex_hull::graham_andrew < typename point_type::type diff --git a/include/boost/geometry/algorithms/detail/direction_code.hpp b/include/boost/geometry/algorithms/detail/direction_code.hpp index 966efc3f8..12261878e 100644 --- a/include/boost/geometry/algorithms/detail/direction_code.hpp +++ b/include/boost/geometry/algorithms/detail/direction_code.hpp @@ -113,7 +113,7 @@ struct direction_code_impl coord1_t const b1 = geometry::get<1>(segment_b); coord2_t const p0 = geometry::get<0>(p); coord2_t const p1 = geometry::get<1>(p); - + if ( (math::equals(b0, a0) && math::equals(b1, a1)) || (math::equals(b0, p0) && math::equals(b1, p1)) ) { diff --git a/include/boost/geometry/algorithms/detail/disjoint/linear_areal.hpp b/include/boost/geometry/algorithms/detail/disjoint/linear_areal.hpp index 47c1ae028..2ec4d679f 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/linear_areal.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/linear_areal.hpp @@ -142,7 +142,7 @@ struct disjoint_segment_areal template class disjoint_segment_areal { - + template static inline bool check_interior_rings(InteriorRings const& interior_rings, diff --git a/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp b/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp index ac129a998..efed95052 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp @@ -286,7 +286,7 @@ public: typedef typename point_type::type point1_type; typedef typename point_type::type point2_type; typedef model::box box2_type; - + box2_type box2; geometry::envelope(single_geometry, box2, strategy); geometry::detail::expand_by_epsilon(box2); @@ -431,7 +431,7 @@ public: typedef model::box box1_type; typedef model::box box2_type; typedef std::pair box_pair_type; - + std::size_t count2 = boost::size(multi_geometry); std::vector boxes(count2); for (std::size_t i = 0 ; i < count2 ; ++i) @@ -530,7 +530,7 @@ struct disjoint { return detail::disjoint::multipoint_multipoint ::apply(multipoint2, multipoint1, strategy); - } + } return detail::disjoint::multipoint_multipoint ::apply(multipoint1, multipoint2, strategy); diff --git a/include/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp b/include/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp index 6a852ec43..3491e3860 100644 --- a/include/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp +++ b/include/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp @@ -54,7 +54,7 @@ template > struct segment_or_box_point_range_closure : not_implemented -{}; +{}; template struct segment_or_box_point_range_closure @@ -196,7 +196,7 @@ public: assign_segment_or_box_points < - SegmentOrBox, + SegmentOrBox, std::vector >::apply(segment_or_box, seg_or_box_points); @@ -282,7 +282,7 @@ public: } - static inline return_type apply(SegmentOrBox const& segment_or_box, Geometry const& geometry, + static inline return_type apply(SegmentOrBox const& segment_or_box, Geometry const& geometry, Strategies const& strategies, bool check_intersection = true) { return apply(geometry, segment_or_box, strategies, check_intersection); diff --git a/include/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp b/include/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp index e4cb41a35..dc1f4786b 100644 --- a/include/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp +++ b/include/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp @@ -91,7 +91,7 @@ template struct distance < Linear, Areal, Strategy, - linear_tag, areal_tag, + linear_tag, areal_tag, strategy_tag_distance_point_segment, false > : detail::distance::linear_to_areal @@ -104,7 +104,7 @@ template struct distance < Areal, Linear, Strategy, - areal_tag, linear_tag, + areal_tag, linear_tag, strategy_tag_distance_point_segment, false > : detail::distance::linear_to_areal @@ -118,7 +118,7 @@ template struct distance < Areal1, Areal2, Strategy, - areal_tag, areal_tag, + areal_tag, areal_tag, strategy_tag_distance_point_segment, false > : detail::distance::areal_to_areal diff --git a/include/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp b/include/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp index eb81133f6..0c3e68051 100644 --- a/include/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp +++ b/include/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp @@ -102,7 +102,7 @@ template : detail::distance::linear_to_linear < diff --git a/include/boost/geometry/algorithms/detail/distance/multipoint_to_geometry.hpp b/include/boost/geometry/algorithms/detail/distance/multipoint_to_geometry.hpp index e410e53d8..58a9d5b28 100644 --- a/include/boost/geometry/algorithms/detail/distance/multipoint_to_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/distance/multipoint_to_geometry.hpp @@ -127,7 +127,7 @@ public: { covered_by_areal predicate(areal, strategies); - if (! boost::empty(multipoint) && + if (! boost::empty(multipoint) && std::none_of(boost::begin(multipoint), boost::end(multipoint), predicate)) { return detail::distance::point_or_segment_range_to_geometry_rtree diff --git a/include/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp b/include/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp index b76955cb6..cd7c46ce7 100644 --- a/include/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp +++ b/include/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp @@ -95,7 +95,7 @@ public: : dispatch::distance < - point_or_segment_type, + point_or_segment_type, typename std::iterator_traits < typename selector_type::iterator_type diff --git a/include/boost/geometry/algorithms/detail/distance/segment_to_box.hpp b/include/boost/geometry/algorithms/detail/distance/segment_to_box.hpp index 354d42bd0..219924551 100644 --- a/include/boost/geometry/algorithms/detail/distance/segment_to_box.hpp +++ b/include/boost/geometry/algorithms/detail/distance/segment_to_box.hpp @@ -91,7 +91,7 @@ private: std::vector, open > point_to_point_range; - + public: // TODO: Or should the return type be defined by sb_strategy_type? typedef distance::return_t return_type; @@ -114,7 +114,7 @@ public: // get box points std::vector box_points(4); detail::assign_box_corners_oriented(box, box_points); - + ps_strategy_type const strategy = strategies.distance(dummy_point(), dummy_segment()); auto const cstrategy = strategy::distance::services::get_comparable @@ -192,7 +192,7 @@ private: public: // TODO: Or should the return type be defined by sb_strategy_type? typedef distance::return_t return_type; - + static inline return_type apply(Segment const& segment, Box const& box, Strategies const& strategies, diff --git a/include/boost/geometry/algorithms/detail/envelope/geometry_collection.hpp b/include/boost/geometry/algorithms/detail/envelope/geometry_collection.hpp index ddf24c22e..979513da7 100644 --- a/include/boost/geometry/algorithms/detail/envelope/geometry_collection.hpp +++ b/include/boost/geometry/algorithms/detail/envelope/geometry_collection.hpp @@ -36,7 +36,7 @@ struct envelope Strategies const& strategies) { using strategy_t = decltype(strategies.envelope(geometry, mbr)); - + typename strategy_t::template state state; detail::visit_breadth_first([&](auto const& g) { diff --git a/include/boost/geometry/algorithms/detail/envelope/intersects_antimeridian.hpp b/include/boost/geometry/algorithms/detail/envelope/intersects_antimeridian.hpp index 47937bf74..05127e0d2 100644 --- a/include/boost/geometry/algorithms/detail/envelope/intersects_antimeridian.hpp +++ b/include/boost/geometry/algorithms/detail/envelope/intersects_antimeridian.hpp @@ -19,7 +19,7 @@ #include -namespace boost { namespace geometry +namespace boost { namespace geometry { namespace detail { namespace envelope @@ -38,7 +38,7 @@ struct intersects_antimeridian < CoordinateType, Units > constants; - + return math::equals(math::abs(lat1), constants::max_latitude()) || diff --git a/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp b/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp index c55be0343..d2536cda0 100644 --- a/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp +++ b/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp @@ -59,7 +59,7 @@ public: longitude_interval(T const& left, T const& right) { m_end[0] = left; - m_end[1] = right; + m_end[1] = right; } template @@ -287,7 +287,7 @@ struct envelope_range_of_boxes // if the box degenerates to the south or north pole // just ignore it continue; - } + } coordinate_type lon_left = geometry::get(*it); coordinate_type lon_right = geometry::get(*it); diff --git a/include/boost/geometry/algorithms/detail/equals/implementation.hpp b/include/boost/geometry/algorithms/detail/equals/implementation.hpp index 847c96f15..2f803f365 100644 --- a/include/boost/geometry/algorithms/detail/equals/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/equals/implementation.hpp @@ -389,7 +389,7 @@ struct equals < MultiPolygon1, MultiPolygon2, multi_polygon_tag, multi_polygon_tag, - areal_tag, areal_tag, + areal_tag, areal_tag, 2, Reverse > @@ -402,7 +402,7 @@ struct equals < Polygon, MultiPolygon, polygon_tag, multi_polygon_tag, - areal_tag, areal_tag, + areal_tag, areal_tag, 2, Reverse > @@ -414,7 +414,7 @@ struct equals < MultiPolygon, Ring, multi_polygon_tag, ring_tag, - areal_tag, areal_tag, + areal_tag, areal_tag, 2, Reverse > diff --git a/include/boost/geometry/algorithms/detail/expand/indexed.hpp b/include/boost/geometry/algorithms/detail/expand/indexed.hpp index 08463689d..92d701d16 100644 --- a/include/boost/geometry/algorithms/detail/expand/indexed.hpp +++ b/include/boost/geometry/algorithms/detail/expand/indexed.hpp @@ -61,7 +61,7 @@ struct indexed_loop std::less less; std::greater greater; - + if (less(coord, get(box))) { set(box, coord); diff --git a/include/boost/geometry/algorithms/detail/expand/interface.hpp b/include/boost/geometry/algorithms/detail/expand/interface.hpp index d2cdf97e7..6552c266e 100644 --- a/include/boost/geometry/algorithms/detail/expand/interface.hpp +++ b/include/boost/geometry/algorithms/detail/expand/interface.hpp @@ -100,7 +100,7 @@ struct expand namespace resolve_dynamic { - + template ::type> struct expand { @@ -112,7 +112,7 @@ struct expand concepts::check(); concepts::check(); concepts::check_concepts_and_equal_dimensions(); - + resolve_strategy::expand::apply(box, geometry, strategy); } }; @@ -131,10 +131,10 @@ struct expand }, geometry); } }; - + } // namespace resolve_dynamic - - + + /*! \brief Expands (with strategy) \ingroup expand diff --git a/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp b/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp index 3e41b71ff..ae07f5bb0 100644 --- a/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp +++ b/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp @@ -44,7 +44,7 @@ struct corner_by_epsilon typedef typename coordinate_type::type coord_type; coord_type const coord = get(point); coord_type const seps = math::scaled_epsilon(coord); - + set(point, PlusOrMinus()(coord, seps)); corner_by_epsilon::apply(point); diff --git a/include/boost/geometry/algorithms/detail/gc_group_elements.hpp b/include/boost/geometry/algorithms/detail/gc_group_elements.hpp index edc664569..c1c26ec9c 100644 --- a/include/boost/geometry/algorithms/detail/gc_group_elements.hpp +++ b/include/boost/geometry/algorithms/detail/gc_group_elements.hpp @@ -131,7 +131,7 @@ inline void gc_group_elements(GC1View const& gc1_view, GC2View const& gc2_view, std::array, 2> visited = { std::vector(boost::size(gc1_view), false), std::vector(boost::size(gc2_view), false) - }; + }; for (auto const& elem : adjacent) { std::vector group; diff --git a/include/boost/geometry/algorithms/detail/interior_iterator.hpp b/include/boost/geometry/algorithms/detail/interior_iterator.hpp index 3582773c3..1a9d4f192 100644 --- a/include/boost/geometry/algorithms/detail/interior_iterator.hpp +++ b/include/boost/geometry/algorithms/detail/interior_iterator.hpp @@ -31,7 +31,7 @@ struct interior_iterator { typedef typename boost::range_iterator < - typename geometry::interior_type::type + typename geometry::interior_type::type >::type type; }; diff --git a/include/boost/geometry/algorithms/detail/intersection/areal_areal.hpp b/include/boost/geometry/algorithms/detail/intersection/areal_areal.hpp index 9faa1df55..e657f825f 100644 --- a/include/boost/geometry/algorithms/detail/intersection/areal_areal.hpp +++ b/include/boost/geometry/algorithms/detail/intersection/areal_areal.hpp @@ -155,7 +155,7 @@ struct intersection_areal_areal_ pointlike::get(geometry_out), strategy); } - + return; } diff --git a/include/boost/geometry/algorithms/detail/intersection/gc.hpp b/include/boost/geometry/algorithms/detail/intersection/gc.hpp index 05338cd58..fa492c0f3 100644 --- a/include/boost/geometry/algorithms/detail/intersection/gc.hpp +++ b/include/boost/geometry/algorithms/detail/intersection/gc.hpp @@ -175,7 +175,7 @@ private: traits::iter_visit::apply([&](auto const& g2) { TupleOut inters_result; - using g2_t = util::remove_cref_t; + using g2_t = util::remove_cref_t; intersection::apply(g1, g2, inters_result, strategy); // TODO: If possible merge based on adjacency lists, i.e. merge @@ -218,7 +218,7 @@ private: < Out, Out, typename Strategy::cs_tag >::type; - + rescale_policy_type robust_policy = geometry::get_rescale_policy( g1, g2, strategy); diff --git a/include/boost/geometry/algorithms/detail/intersection/interface.hpp b/include/boost/geometry/algorithms/detail/intersection/interface.hpp index c3f06f6c4..84a9a57cc 100644 --- a/include/boost/geometry/algorithms/detail/intersection/interface.hpp +++ b/include/boost/geometry/algorithms/detail/intersection/interface.hpp @@ -127,7 +127,7 @@ struct intersection Geometry2, typename Strategy::cs_tag >::type rescale_policy_type; - + rescale_policy_type robust_policy = geometry::get_rescale_policy( geometry1, geometry2, strategy); @@ -225,7 +225,7 @@ struct intersection namespace resolve_dynamic { - + template < typename Geometry1, typename Geometry2, @@ -240,7 +240,7 @@ struct intersection { concepts::check(); concepts::check(); - + return resolve_strategy::intersection < Strategy @@ -283,7 +283,7 @@ struct intersection result = intersection < Geometry1, - util::remove_cref_t + util::remove_cref_t >::apply(geometry1, g2, geometry_out, strategy); }, geometry2); return result; @@ -310,9 +310,9 @@ struct intersection::type linestring_type; - + linestring_type const& ls1 = range::at(m_multilinestring, turn.operations[0].seg_id.multi_index); @@ -291,7 +291,7 @@ public: // return true for empty multilinestring using not_simple = not_simple; // do not compute self-intersections - + if (std::any_of(boost::begin(multilinestring), boost::end(multilinestring), not_simple(strategy))) diff --git a/include/boost/geometry/algorithms/detail/is_valid/debug_complement_graph.hpp b/include/boost/geometry/algorithms/detail/is_valid/debug_complement_graph.hpp index 5d16e2ea3..cf05af4ad 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/debug_complement_graph.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/debug_complement_graph.hpp @@ -39,7 +39,7 @@ debug_print_complement_graph(OutputStream& os, { os << " " << it->id(); } - os << " }" << std::endl; + os << " }" << std::endl; for (vertex_handle it = graph.m_vertices.begin(); it != graph.m_vertices.end(); ++it) @@ -54,7 +54,7 @@ debug_print_complement_graph(OutputStream& os, { os << " " << (*nit)->id(); } - os << "}" << std::endl; + os << "}" << std::endl; } } #else diff --git a/include/boost/geometry/algorithms/detail/is_valid/has_invalid_coordinate.hpp b/include/boost/geometry/algorithms/detail/is_valid/has_invalid_coordinate.hpp index 72649d0b8..82a1f5f4c 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/has_invalid_coordinate.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/has_invalid_coordinate.hpp @@ -28,7 +28,7 @@ namespace boost { namespace geometry { - + #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace is_valid { @@ -89,8 +89,8 @@ struct range_has_invalid_coordinate bool const has_valid_coordinates = std::none_of ( geometry::points_begin(geometry), points_end, - []( auto const& point ){ - return point_has_invalid_coordinate::apply(point); + []( auto const& point ){ + return point_has_invalid_coordinate::apply(point); } ); diff --git a/include/boost/geometry/algorithms/detail/is_valid/interface.hpp b/include/boost/geometry/algorithms/detail/is_valid/interface.hpp index 7ee7b38af..53576d20c 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/interface.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/interface.hpp @@ -30,7 +30,7 @@ namespace boost { namespace geometry { - + namespace resolve_strategy { diff --git a/include/boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp b/include/boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp index 9ca82b107..4aad18881 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp @@ -151,7 +151,7 @@ public: || turn.method == method_touch_interior) && turn.touch_only; } -}; +}; }} // namespace detail::is_valid diff --git a/include/boost/geometry/algorithms/detail/is_valid/linear.hpp b/include/boost/geometry/algorithms/detail/is_valid/linear.hpp index c407c72dc..946cbf101 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/linear.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/linear.hpp @@ -105,7 +105,7 @@ namespace dispatch // A curve is simple if it does not pass through the same point twice, // with the possible exception of its two endpoints // -// There is an option here as to whether spikes are allowed for linestrings; +// There is an option here as to whether spikes are allowed for linestrings; // here we pass this as an additional template parameter: allow_spikes // If allow_spikes is set to true, spikes are allowed, false otherwise. // By default, spikes are disallowed @@ -166,7 +166,7 @@ public: using per_ls = per_linestring; - return std::all_of(boost::begin(multilinestring), + return std::all_of(boost::begin(multilinestring), boost::end(multilinestring), per_ls(visitor, strategy)); } diff --git a/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp b/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp index 2a8b3fd0d..a464bd6c6 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp @@ -302,7 +302,7 @@ public: using has_valid_turns = has_valid_self_turns < - MultiPolygon, + MultiPolygon, typename Strategy::cs_tag >; diff --git a/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp b/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp index 2a3c4d9aa..747ee54ef 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp @@ -111,7 +111,7 @@ protected: VisitPolicy& visitor, Strategy const& strategy) { - return std::none_of(boost::begin(interior_rings), + return std::none_of(boost::begin(interior_rings), boost::end(interior_rings), is_invalid_ring(visitor, strategy)); } @@ -367,7 +367,7 @@ protected: } struct has_holes_inside - { + { template static inline bool apply(Polygon const& polygon, TurnIterator first, diff --git a/include/boost/geometry/algorithms/detail/max_interval_gap.hpp b/include/boost/geometry/algorithms/detail/max_interval_gap.hpp index f71efc9aa..905491ef3 100644 --- a/include/boost/geometry/algorithms/detail/max_interval_gap.hpp +++ b/include/boost/geometry/algorithms/detail/max_interval_gap.hpp @@ -225,7 +225,7 @@ maximum_gap(RangeOfIntervals const& range_of_intervals, std::priority_queue < event_type, - std::vector, + std::vector, detail::max_interval_gap::event_greater > queue; diff --git a/include/boost/geometry/algorithms/detail/overlaps/interface.hpp b/include/boost/geometry/algorithms/detail/overlaps/interface.hpp index 18c760163..bc2cfb517 100644 --- a/include/boost/geometry/algorithms/detail/overlaps/interface.hpp +++ b/include/boost/geometry/algorithms/detail/overlaps/interface.hpp @@ -147,7 +147,7 @@ struct overlaps >::apply(geometry1, geometry2, strategy); } }; - + template struct overlaps @@ -211,7 +211,7 @@ struct overlaps static inline bool is_staying_inside(Turn const& turn, - Operation const& operation, + Operation const& operation, bool entered) { if ( !entered ) @@ -327,7 +327,7 @@ public: for (TurnIterator it = first; it != beyond; ++it) { oit = process_turn(it, boost::begin(it->operations), - entered, enter_count, + entered, enter_count, linestring, current_piece, current_segment_id, oit, diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp index 2b56d7dd5..007ada0f2 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp @@ -201,7 +201,7 @@ public: BOOST_STATIC_ASSERT(I < 2); return ips[I]; } - + private: // only if collinear (same_dirs) @@ -287,7 +287,7 @@ struct get_turn_info_for_endpoint if ( intersections.template get<1>().p_operation == operation_none ) return result_ignore_ip0; - + bool append1_last = analyse_segment_and_assign_ip(range_p, range_q, intersections.template get<1>(), @@ -436,7 +436,7 @@ struct get_turn_info_for_endpoint if ( operations_both(operations, operation_continue) ) { - if ( op1 != operation_union + if ( op1 != operation_union || op2 != operation_union || ! ( G1Index == 0 ? inters.is_spike_q() : inters.is_spike_p() ) ) { @@ -544,7 +544,7 @@ struct get_turn_info_for_endpoint OutputIterator out) { TurnInfo tp = tp_model; - + //geometry::convert(ip, tp.point); //tp.method = method; base_turn_handler::assign_point(tp, method, result.intersection_points, ip_index); diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp index aaab2900a..00a6004f2 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp @@ -345,7 +345,7 @@ public: < UniqueSubRange2, UniqueSubRange1, UmbrellaStrategy > swapped_side_calculator_type; - + intersection_info_base(UniqueSubRange1 const& range_p, UniqueSubRange2 const& range_q, UmbrellaStrategy const& umbrella_strategy, @@ -409,7 +409,7 @@ public: typedef typename base::side_calculator_type side_calculator_type; typedef typename base::result_type result_type; - + typedef typename result_type::intersection_points_type i_info_type; typedef typename result_type::direction_type d_info_type; @@ -462,7 +462,7 @@ public: return true; } } - + return false; } @@ -485,18 +485,18 @@ public: bool const has_pk = ! base::p_is_last_segment(); int const pk_q1 = has_pk ? base::sides().pk_wrt_q1() : 0; int const pk_q2 = has_pk ? base::sides().pk_wrt_q2() : 0; - + if (pk_q1 == -pk_q2) { if (pk_q1 == 0) { return direction_code(base::rqi(), base::rqj(), base::rqk()) == -1; } - + return true; } } - + return false; } diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp index 576ab5f7b..76d7faf6d 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp @@ -120,12 +120,12 @@ struct get_turn_info_linear_areal replace_method_and_operations_tm(tp.method, tp.operations[0].operation, tp.operations[1].operation); - + // this function assumes that 'u' must be set for a spike calculate_spike_operation(tp.operations[0].operation, inters, umbrella_strategy); - + *out++ = tp; } } @@ -148,7 +148,7 @@ struct get_turn_info_linear_areal { // do nothing } - else + else { using handler = touch; handler::apply(range_p, range_q, tp, @@ -178,7 +178,7 @@ struct get_turn_info_linear_areal } else { - tp.operations[0].operation = operation_union; + tp.operations[0].operation = operation_union; } } } @@ -407,7 +407,7 @@ struct get_turn_info_linear_areal if ( is_p_spike ) { int const pk_q1 = inters.sides().pk_wrt_q1(); - + bool going_in = pk_q1 < 0; // Pk on the right bool going_out = pk_q1 > 0; // Pk on the left @@ -415,7 +415,7 @@ struct get_turn_info_linear_areal // special cases if ( qk_q1 < 0 ) // Q turning R - { + { // spike on the edge point // if it's already known that the spike is going out this musn't be checked if ( ! going_out @@ -528,7 +528,7 @@ struct get_turn_info_linear_areal || tp.operations[0].operation == operation_intersection ) : // i ??? true ) && inters.is_spike_p(); - + // TODO: throw an exception for spike in Areal? /*bool is_q_spike = ( ( Version == append_touches && tp.operations[1].operation == operation_continue ) @@ -675,7 +675,7 @@ struct get_turn_info_linear_areal // possible to define a spike on an endpoint. Areal geometries must // NOT have spikes at all. One thing that could be done is to throw // an exception when spike is detected in Areal geometry. - + template 1 ? (ip1.is_pj && !ip1.is_qi) : (ip0.is_pj && !ip0.is_qi) ) ) // prevents duplication { TurnInfo tp = tp_model; - + if ( inters.i_info().count > 1 ) { //BOOST_GEOMETRY_ASSERT( result.template get<1>().dir_a == 0 && result.template get<1>().dir_b == 0 ); @@ -827,7 +827,7 @@ struct get_turn_info_linear_areal { side_pi_y = sides.apply(range_q.at(1), range_q.at(2), range_p.at(0)); // pi wrt q2 side_pi_x = sides.apply(range_q.at(0), range_q.at(1), range_p.at(0)); // pi wrt q1 - side_qz_x = sides.apply(range_q.at(0), range_q.at(1), range_q.at(2)); // qk wrt q1 + side_qz_x = sides.apply(range_q.at(0), range_q.at(1), range_q.at(2)); // qk wrt q1 } // 2. ip0 or pj in the middle of q1 else @@ -853,7 +853,7 @@ struct get_turn_info_linear_areal tp.operations[0].operation = operation_blocked; tp.operations[0].position = position_back; tp.operations[1].position = position_middle; - + // equals<> or collinear<> will assign the second point, // we'd like to assign the first one unsigned int ip_index = ip_count > 1 ? 1 : 0; diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp index 396a941c1..6dbd6d682 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp @@ -110,7 +110,7 @@ struct get_turn_info_linear_linear inters.swapped_sides(), umbrella_strategy); } - + if ( tp.operations[0].operation == operation_blocked ) { tp.operations[1].is_collinear = true; @@ -123,7 +123,7 @@ struct get_turn_info_linear_linear replace_method_and_operations_tm(tp.method, tp.operations[0].operation, tp.operations[1].operation); - + *out++ = tp; } } @@ -149,7 +149,7 @@ struct get_turn_info_linear_linear { // do nothing } - else + else { handler::apply(range_p, range_q, tp, inters.i_info(), inters.d_info(), @@ -169,7 +169,7 @@ struct get_turn_info_linear_linear if ( inters.is_spike_p() && inters.is_spike_q() ) { tp.operations[0].operation = operation_union; - tp.operations[1].operation = operation_union; + tp.operations[1].operation = operation_union; } else { @@ -188,7 +188,7 @@ struct get_turn_info_linear_linear } else { - tp.operations[0].operation = operation_union; + tp.operations[0].operation = operation_union; } } else @@ -207,7 +207,7 @@ struct get_turn_info_linear_linear } else { - tp.operations[1].operation = operation_union; + tp.operations[1].operation = operation_union; } } else @@ -223,7 +223,7 @@ struct get_turn_info_linear_linear && inters.is_spike_p() ) { tp.operations[0].operation = operation_union; - tp.operations[1].operation = operation_union; + tp.operations[1].operation = operation_union; } } else if ( tp.operations[0].operation == operation_none @@ -379,7 +379,7 @@ struct get_turn_info_linear_linear // transform turn turn_transformer_ec transformer(method_replace); transformer(tp); - + // conditionally handle spikes if ( ! BOOST_GEOMETRY_CONDITION(handle_spikes) || ! append_collinear_spikes(tp, inters, @@ -524,7 +524,7 @@ struct get_turn_info_linear_linear return true; } - + return false; } @@ -567,9 +567,9 @@ struct get_turn_info_linear_linear { tp.operations[0].is_collinear = true; tp.operations[1].is_collinear = false; - + BOOST_GEOMETRY_ASSERT(inters.i_info().count > 1); - + base_turn_handler::assign_point(tp, method_touch_interior, inters.i_info(), 1); } @@ -598,7 +598,7 @@ struct get_turn_info_linear_linear { tp.operations[0].is_collinear = false; tp.operations[1].is_collinear = true; - + BOOST_GEOMETRY_ASSERT(inters.i_info().count > 0); base_turn_handler::assign_point(tp, method_touch_interior, inters.i_info(), 0); @@ -613,7 +613,7 @@ struct get_turn_info_linear_linear res = true; } - + return res; } diff --git a/include/boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp b/include/boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp index c62b7d283..31db94dd9 100644 --- a/include/boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp @@ -63,7 +63,7 @@ struct intersection_box_box // Set dimensions of output coordinate set(box_out, min1 < min2 ? min2 : min1); set(box_out, max1 > max2 ? max2 : max1); - + return intersection_box_box ::apply(box1, box2, robust_policy, box_out, strategy); } diff --git a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp index 635b4a538..174440e6e 100644 --- a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp @@ -378,7 +378,7 @@ struct intersection_of_linestring_with_areal return out; } - + #if defined(BOOST_GEOMETRY_DEBUG_FOLLOW) int index = 0; for(typename std::deque::const_iterator @@ -1543,7 +1543,7 @@ inline OutputIterator intersection_insert(Geometry1 const& geometry1, < Geometry1, Geometry2 >::type strategy_type; - + return intersection_insert(geometry1, geometry2, out, strategy_type()); } diff --git a/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp b/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp index 8b62b0752..503d65647 100644 --- a/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp @@ -157,7 +157,7 @@ private: private: MultiPolygon const& m_multipolygon; - OutputIterator& m_oit; + OutputIterator& m_oit; Strategy const& m_strategy; }; diff --git a/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp b/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp index d032884a3..e41ee8238 100644 --- a/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp @@ -154,7 +154,7 @@ inline int range_in_geometry(Point1 const& first_point1, // check points of geometry1 until point inside/outside is found // NOTE: skip first point because it should be already tested above result = range_in_geometry(geometry1, geometry2, strategy, true); - } + } return result; } diff --git a/include/boost/geometry/algorithms/detail/overlay/select_rings.hpp b/include/boost/geometry/algorithms/detail/overlay/select_rings.hpp index 709c4f8ed..9b9a3e010 100644 --- a/include/boost/geometry/algorithms/detail/overlay/select_rings.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/select_rings.hpp @@ -321,7 +321,7 @@ inline void select_rings(Geometry1 const& geometry1, Geometry2 const& geometry2, { typedef typename geometry::tag::type tag1; typedef typename geometry::tag::type tag2; - + RingPropertyMap all_ring_properties; dispatch::select_rings::apply(geometry1, geometry2, ring_identifier(0, -1, -1), all_ring_properties, diff --git a/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp b/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp index 519c88328..20369fa95 100644 --- a/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp @@ -356,7 +356,7 @@ struct self_get_turn_points namespace detail { namespace self_get_turn_points { -// Version where Reverse can be specified manually. TODO: +// Version where Reverse can be specified manually. TODO: // can most probably be merged with self_get_turn_points::get_turn template < diff --git a/include/boost/geometry/algorithms/detail/relate/de9im.hpp b/include/boost/geometry/algorithms/detail/relate/de9im.hpp index 7b62f879f..a9d6ea579 100644 --- a/include/boost/geometry/algorithms/detail/relate/de9im.hpp +++ b/include/boost/geometry/algorithms/detail/relate/de9im.hpp @@ -26,7 +26,7 @@ namespace boost { namespace geometry { - + namespace de9im { @@ -104,7 +104,7 @@ public: inline explicit mask(const char* code) : base_type(code) {} - + /*! \brief The constructor. \param code The mask pattern. diff --git a/include/boost/geometry/algorithms/detail/relate/implementation_gc.hpp b/include/boost/geometry/algorithms/detail/relate/implementation_gc.hpp index 2709ad71b..359aca954 100644 --- a/include/boost/geometry/algorithms/detail/relate/implementation_gc.hpp +++ b/include/boost/geometry/algorithms/detail/relate/implementation_gc.hpp @@ -208,7 +208,7 @@ struct gc_gc { tuple1_t tuple1; tuple2_t tuple2; - + // Create MPts, MLss and MPos containing all gc elements from this group // They may potentially intersect each other for (auto const& id : inters_group) @@ -269,7 +269,7 @@ struct gc_gc // If needed divide MLss into two parts: // - inside Areal of other GC - // - outside of other GC Areal to check WRT Linear of other GC + // - outside of other GC Areal to check WRT Linear of other GC mls2_t mls2_diff_mpo1, mls2_inters_mpo1; bool is_mls2_divided = false; mls1_t mls1_diff_mpo2, mls1_inters_mpo2; @@ -284,7 +284,7 @@ struct gc_gc geometry::intersection(mls2, mpo1, mls2_inters_mpo1); is_mls2_divided = true; } - // L/LA + // L/LA if (! geometry::is_empty(mpo2)) { geometry::difference(mls1, mpo2, mls1_diff_mpo2); diff --git a/include/boost/geometry/algorithms/detail/relate/interface.hpp b/include/boost/geometry/algorithms/detail/relate/interface.hpp index dad99e934..19568a870 100644 --- a/include/boost/geometry/algorithms/detail/relate/interface.hpp +++ b/include/boost/geometry/algorithms/detail/relate/interface.hpp @@ -214,7 +214,7 @@ struct relate Geometry1, Geometry2 >::type strategy_type; - + dispatch::relate < Geometry1, diff --git a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp index f4b41e085..53f003ea1 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp @@ -275,7 +275,7 @@ inline bool calculate_from_inside(Geometry1 const& geometry1, } auto const& range1 = sub_range(geometry1, turn.operations[op_id].seg_id); - + using range2_view = detail::closed_clockwise_view::type const>; using range2_iterator = typename boost::range_iterator::type; range2_view const range2(sub_range(geometry2, turn.operations[other_op_id].seg_id)); diff --git a/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp b/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp index b7837ff5c..8a326265a 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp @@ -515,7 +515,7 @@ struct linear_linear bool const other_b = is_ip_on_boundary(it->point, it->operations[other_op_id], other_boundary_checker); - + // if current IP is on boundary of the geometry if ( this_b ) { diff --git a/include/boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp b/include/boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp index 281ad2384..b75fd0c42 100644 --- a/include/boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp @@ -160,7 +160,7 @@ struct multi_point_geometry_eb typedef std::vector points_type; typedef geometry::less less_type; - points_type points(boost::begin(multi_point), boost::end(multi_point)); + points_type points(boost::begin(multi_point), boost::end(multi_point)); std::sort(points.begin(), points.end(), less_type()); boundary_visitor visitor(points); @@ -183,7 +183,7 @@ struct multi_point_single_geometry { typedef typename point_type::type point2_type; typedef model::box box2_type; - + box2_type box2; geometry::envelope(single_geometry, box2, strategy); geometry::detail::expand_by_epsilon(box2); diff --git a/include/boost/geometry/algorithms/detail/relate/point_geometry.hpp b/include/boost/geometry/algorithms/detail/relate/point_geometry.hpp index 6dd9a805a..e570a7209 100644 --- a/include/boost/geometry/algorithms/detail/relate/point_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/relate/point_geometry.hpp @@ -169,7 +169,7 @@ struct geometry_point // //} // return result("F0FFFF**T"); // } -// else +// else // { // /*if ( box_has_interior::apply(box) ) // { @@ -195,7 +195,7 @@ struct geometry_point // return result("0FTFFTFFT"); // else if ( geometry::covered_by(point, box) ) // return result("FF*0F*FFT"); -// else +// else // return result("FF*FFT0FT"); // } //}; diff --git a/include/boost/geometry/algorithms/detail/relate/result.hpp b/include/boost/geometry/algorithms/detail/relate/result.hpp index bb30c4606..bbfa9cb7a 100644 --- a/include/boost/geometry/algorithms/detail/relate/result.hpp +++ b/include/boost/geometry/algorithms/detail/relate/result.hpp @@ -67,7 +67,7 @@ public: static const std::size_t static_width = Width; static const std::size_t static_height = Height; static const std::size_t static_size = Width * Height; - + inline matrix() { std::fill_n(m_array, static_size, 'F'); @@ -117,7 +117,7 @@ public: { return static_size; } - + inline const char * data() const { return m_array; @@ -358,7 +358,7 @@ struct may_update_dispatch BOOST_STATIC_ASSERT('0' <= D && D <= '9'); char const m = mask.template get(); - + if ( m == 'F' ) { return true; @@ -647,7 +647,7 @@ struct static_mask BOOST_STATIC_ASSERT( std::size_t(util::sequence_size::value) == static_size); - + template struct static_get { @@ -744,7 +744,7 @@ struct static_interrupt_dispatch static const char mask_el = StaticMask::template static_get::value; static const bool value - = ( V >= '0' && V <= '9' ) ? + = ( V >= '0' && V <= '9' ) ? ( mask_el == 'F' || ( mask_el < V && mask_el >= '0' && mask_el <= '9' ) ) : ( ( V == 'T' ) ? mask_el == 'F' : false ); }; @@ -930,7 +930,7 @@ struct static_check_dispatch && per_one::apply(matrix) && per_one::apply(matrix); } - + template struct per_one { diff --git a/include/boost/geometry/algorithms/detail/relate/topology_check.hpp b/include/boost/geometry/algorithms/detail/relate/topology_check.hpp index 459c81614..cdcabe67d 100644 --- a/include/boost/geometry/algorithms/detail/relate/topology_check.hpp +++ b/include/boost/geometry/algorithms/detail/relate/topology_check.hpp @@ -200,7 +200,7 @@ private: < typename boost::range_value::type const >::type point_reference; - + point_reference front_pt = range::front(ls); point_reference back_pt = range::back(ls); @@ -341,7 +341,7 @@ struct topology_check : topology_check_areal { topology_check(MultiPolygon const&, Strategy const&) {} - + template static bool check_boundary_point(Point const& ) { return true; } }; diff --git a/include/boost/geometry/algorithms/detail/relate/turns.hpp b/include/boost/geometry/algorithms/detail/relate/turns.hpp index f88f64ab1..d98794e78 100644 --- a/include/boost/geometry/algorithms/detail/relate/turns.hpp +++ b/include/boost/geometry/algorithms/detail/relate/turns.hpp @@ -249,7 +249,7 @@ struct less_op_areal_areal else if ( right_operation.operation == overlay::operation_intersection ) return false; } - + return op_to_int_iuxc(left_operation) < op_to_int_iuxc(right_operation); } } diff --git a/include/boost/geometry/algorithms/detail/sections/section_functions.hpp b/include/boost/geometry/algorithms/detail/sections/section_functions.hpp index b5e1721ab..df4f31025 100644 --- a/include/boost/geometry/algorithms/detail/sections/section_functions.hpp +++ b/include/boost/geometry/algorithms/detail/sections/section_functions.hpp @@ -70,7 +70,7 @@ struct preceding_check<0, Geometry, spherical_tag> calc_t const value = get<0>(point); calc_t const other_min = get(other_box); calc_t const other_max = get(other_box); - + bool const pt_covered = strategy::within::detail::covered_by_range < Point, 0, spherical_tag diff --git a/include/boost/geometry/algorithms/detail/touches/implementation.hpp b/include/boost/geometry/algorithms/detail/touches/implementation.hpp index 1648af63e..6d24f3247 100644 --- a/include/boost/geometry/algorithms/detail/touches/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/touches/implementation.hpp @@ -87,7 +87,7 @@ struct box_box_loop { touch = true; } - + return box_box_loop < Dimension + 1, diff --git a/include/boost/geometry/algorithms/detail/tupled_output.hpp b/include/boost/geometry/algorithms/detail/tupled_output.hpp index e0f889745..3c5a12aea 100644 --- a/include/boost/geometry/algorithms/detail/tupled_output.hpp +++ b/include/boost/geometry/algorithms/detail/tupled_output.hpp @@ -389,7 +389,7 @@ struct output_geometry_access >::value; typedef typename geometry::tuples::element::type type; - + template static typename geometry::tuples::element::type& get(Tuple & tup) diff --git a/include/boost/geometry/algorithms/detail/within/multi_point.hpp b/include/boost/geometry/algorithms/detail/within/multi_point.hpp index 349ef0302..2e14c41c4 100644 --- a/include/boost/geometry/algorithms/detail/within/multi_point.hpp +++ b/include/boost/geometry/algorithms/detail/within/multi_point.hpp @@ -140,7 +140,7 @@ struct multi_point_single_geometry typedef decltype(strategy.covered_by(*it, box)) point_in_box_type; int in_val = 0; - + // exterior of box and of geometry if (! point_in_box_type::apply(*it, box) || (in_val = point_in_geometry(*it, linear_or_areal, strategy)) < 0) 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 c9b9cbfd8..e37c19cae 100644 --- a/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp @@ -204,7 +204,7 @@ struct point_in_geometry { typename interior_return_type::type rings = interior_rings(polygon); - + for (typename detail::interior_iterator::type it = boost::begin(rings); it != boost::end(rings); diff --git a/include/boost/geometry/algorithms/difference.hpp b/include/boost/geometry/algorithms/difference.hpp index 07a8352f0..b04e15a31 100644 --- a/include/boost/geometry/algorithms/difference.hpp +++ b/include/boost/geometry/algorithms/difference.hpp @@ -431,7 +431,7 @@ private: { traits::iter_visit::apply([&](auto const& g2) { - multi_out_minus_g2(out, g2, strategy); + multi_out_minus_g2(out, g2, strategy); }, qit->second); if (boost::empty(out)) @@ -563,7 +563,7 @@ struct difference Strategy const& strategy) { using strategies::relate::services::strategy_converter; - + difference < decltype(strategy_converter::get(strategy)) @@ -586,7 +586,7 @@ struct difference Geometry1, Geometry2 >::type strategy_type; - + difference < strategy_type diff --git a/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp b/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp index 9cc2ef0d5..115909c06 100644 --- a/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp +++ b/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp @@ -187,7 +187,7 @@ struct multi_range_multi_range boost::geometry::detail::throw_on_empty_input(mrng1); boost::geometry::detail::throw_on_empty_input(mrng2); - + size_type n = boost::size(mrng1); result_type haus_dis = 0; diff --git a/include/boost/geometry/algorithms/dispatch/closest_points.hpp b/include/boost/geometry/algorithms/dispatch/closest_points.hpp index cd9794535..e4f72de66 100644 --- a/include/boost/geometry/algorithms/dispatch/closest_points.hpp +++ b/include/boost/geometry/algorithms/dispatch/closest_points.hpp @@ -33,7 +33,7 @@ namespace dispatch template < - typename Geometry1, typename Geometry2, + typename Geometry1, typename Geometry2, typename Tag1 = typename tag_cast < typename tag::type, diff --git a/include/boost/geometry/algorithms/for_each.hpp b/include/boost/geometry/algorithms/for_each.hpp index e39c1b571..b641daf7a 100644 --- a/include/boost/geometry/algorithms/for_each.hpp +++ b/include/boost/geometry/algorithms/for_each.hpp @@ -288,9 +288,9 @@ struct fe_segment_range_with_closure { return true; } - + --end; - + if (begin == end) { // single point ranges already handled in closed case above diff --git a/include/boost/geometry/algorithms/is_empty.hpp b/include/boost/geometry/algorithms/is_empty.hpp index ddc16430e..1961b0b83 100644 --- a/include/boost/geometry/algorithms/is_empty.hpp +++ b/include/boost/geometry/algorithms/is_empty.hpp @@ -81,8 +81,8 @@ struct multi_is_empty template static inline bool apply(MultiGeometry const& multigeometry) { - return std::all_of(boost::begin(multigeometry), - boost::end(multigeometry), + return std::all_of(boost::begin(multigeometry), + boost::end(multigeometry), []( auto const& range ){ return Policy::apply(range); }); } }; diff --git a/include/boost/geometry/algorithms/line_interpolate.hpp b/include/boost/geometry/algorithms/line_interpolate.hpp index 47c89c582..f497e9be6 100644 --- a/include/boost/geometry/algorithms/line_interpolate.hpp +++ b/include/boost/geometry/algorithms/line_interpolate.hpp @@ -259,7 +259,7 @@ struct line_interpolate Distance const& max_distance, Pointlike & pointlike, Strategy const& strategy) - { + { using strategies::line_interpolate::services::strategy_converter; dispatch::line_interpolate @@ -278,7 +278,7 @@ struct line_interpolate Distance const& max_distance, Pointlike & pointlike, default_strategy) - { + { typedef typename strategies::line_interpolate::services::default_strategy < Geometry diff --git a/include/boost/geometry/algorithms/simplify.hpp b/include/boost/geometry/algorithms/simplify.hpp index 9ff214fc9..2e83666f1 100644 --- a/include/boost/geometry/algorithms/simplify.hpp +++ b/include/boost/geometry/algorithms/simplify.hpp @@ -892,7 +892,7 @@ struct simplify_insert < Geometry >::type strategy_type; - + simplify_insert < strategy_type @@ -935,7 +935,7 @@ struct simplify::apply([&](auto const& g) { using geom_t = util::remove_cref_t; - using detail::simplify::static_geometry_type; + using detail::simplify::static_geometry_type; using geom_out_t = typename static_geometry_type::type; geom_out_t o; simplify::apply(g, o, max_distance, strategy); @@ -956,7 +956,7 @@ struct simplify; - using detail::simplify::static_geometry_type; + using detail::simplify::static_geometry_type; using geom_out_t = typename static_geometry_type::type; geom_out_t o; simplify::apply(g, o, max_distance, strategy); diff --git a/include/boost/geometry/algorithms/sym_difference.hpp b/include/boost/geometry/algorithms/sym_difference.hpp index bf55664ec..60ff8f64c 100644 --- a/include/boost/geometry/algorithms/sym_difference.hpp +++ b/include/boost/geometry/algorithms/sym_difference.hpp @@ -706,7 +706,7 @@ struct sym_difference namespace resolve_dynamic { - + template < typename Geometry1, typename Geometry2, @@ -781,7 +781,7 @@ struct sym_difference::apply(geometry1, geometry2, output_collection, default_strategy()); + >::apply(geometry1, geometry2, output_collection, default_strategy()); } diff --git a/include/boost/geometry/algorithms/union.hpp b/include/boost/geometry/algorithms/union.hpp index a30b22dd9..395292d02 100644 --- a/include/boost/geometry/algorithms/union.hpp +++ b/include/boost/geometry/algorithms/union.hpp @@ -462,7 +462,7 @@ struct union_ { detail::random_access_view gc1_view(geometry1); detail::random_access_view gc2_view(geometry2); - + detail::gc_group_elements(gc1_view, gc2_view, strategy, [&](auto const& inters_group) { @@ -763,7 +763,7 @@ struct union_ namespace resolve_dynamic { - + template < typename Geometry1, typename Geometry2, @@ -853,7 +853,7 @@ struct union_ \param p1 first point \param p2 second point \return the dot product - + \qbk{[heading Examples]} \qbk{[dot_product] [dot_product_output]} diff --git a/include/boost/geometry/arithmetic/normalize.hpp b/include/boost/geometry/arithmetic/normalize.hpp index 7dfdbd2b0..64e08c2dc 100644 --- a/include/boost/geometry/arithmetic/normalize.hpp +++ b/include/boost/geometry/arithmetic/normalize.hpp @@ -45,7 +45,7 @@ inline bool vec_normalize(Point & pt, typename coordinate_type::type & le coord_t const c0 = 0; len = vec_length(pt); - + if (math::equals(len, c0)) { return false; diff --git a/include/boost/geometry/extensions/gis/io/shapefile/read.hpp b/include/boost/geometry/extensions/gis/io/shapefile/read.hpp index e18e04a35..b6a9eaa2e 100644 --- a/include/boost/geometry/extensions/gis/io/shapefile/read.hpp +++ b/include/boost/geometry/extensions/gis/io/shapefile/read.hpp @@ -68,13 +68,13 @@ namespace detail { namespace shapefile template inline void read_native(IStream & is, T & v) { - is.read(reinterpret_cast(&v), sizeof(T)); + is.read(reinterpret_cast(&v), sizeof(T)); } template inline void read_big(IStream & is, T & v) { - is.read(reinterpret_cast(&v), sizeof(T)); + is.read(reinterpret_cast(&v), sizeof(T)); boost::endian::big_to_native_inplace(v); } @@ -104,7 +104,7 @@ inline void double_endianness_check() c[7] = 0xc0; boost::endian::little_to_native_inplace(*i); - + if (static_cast(d) != -149) { BOOST_THROW_EXCEPTION(read_shapefile_exception("Unexpected endianness of double, please contact developers.")); @@ -140,7 +140,7 @@ inline boost::int32_t reset_and_read_header(IStream & is) // 5 unused, length, version is.seekg(7 * sizeof(boost::int32_t), IStream::cur); - + boost::int32_t type = 0; read_little(is, type); @@ -376,7 +376,7 @@ struct read_point_policy read_m(is); } - + if (! is.good()) { BOOST_THROW_EXCEPTION(read_shapefile_exception("Read error")); @@ -470,7 +470,7 @@ struct read_polyline_policy } read_parts(is, parts, num_parts); - + for (boost::int32_t i = 0; i < num_parts; ++i) { boost::int32_t f = parts[i]; @@ -484,9 +484,9 @@ struct read_polyline_policy range::push_back(linestrings, ls_type()); ls_type & ls = range::back(linestrings); - std::size_t ls_size = l - f; + std::size_t ls_size = l - f; range::resize(ls, ls_size); - + read_and_set_points(is, ls, ls_size); if (type == shape_type::polyline_z || type == shape_type::polyline_m) @@ -681,7 +681,7 @@ struct read_polygon_policy // unexpected, file corrupted, bug or numerical error BOOST_THROW_EXCEPTION(read_shapefile_exception("Exterior ring expected")); } - + if (! is.good()) { BOOST_THROW_EXCEPTION(read_shapefile_exception("Read error")); @@ -784,7 +784,7 @@ struct read_shapefile static inline void apply(IStream &is, Points & points, Strategy const& strategy) { namespace shp = detail::shapefile; - + boost::int32_t const type = shp::reset_and_read_header(is); if (type == shp::shape_type::point @@ -809,7 +809,7 @@ struct read_shapefile static inline void apply(IStream &is, MultiPoints & multi_points, Strategy const& strategy) { namespace shp = detail::shapefile; - + boost::int32_t const type = shp::reset_and_read_header(is); if (type == shp::shape_type::point diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp index 523461009..657bcdf49 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp @@ -144,8 +144,8 @@ struct geometry_type_impl template < - typename Geometry, - typename CheckPolicy = ogc_policy, + typename Geometry, + typename CheckPolicy = ogc_policy, typename Tag = typename tag::type > struct geometry_type : not_implemented diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp index 14dd2e5fe..7d1e0c95b 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp @@ -129,7 +129,7 @@ template struct geometry_type_parser { template - static bool parse(Iterator& it, Iterator end, + static bool parse(Iterator& it, Iterator end, byte_order_type::enum_t order) { boost::uint32_t value; @@ -147,7 +147,7 @@ template - static void run(Iterator& it, Iterator end, P& point, + static void run(Iterator& it, Iterator end, P& point, byte_order_type::enum_t order) { typedef typename coordinate_type

::type coordinate_type; @@ -186,7 +186,7 @@ template struct point_parser { template - static bool parse(Iterator& it, Iterator end, P& point, + static bool parse(Iterator& it, Iterator end, P& point, byte_order_type::enum_t order) { if (geometry_type_parser

::parse(it, end, order)) @@ -205,7 +205,7 @@ template struct point_container_parser { template - static bool parse(Iterator& it, Iterator end, C& container, + static bool parse(Iterator& it, Iterator end, C& container, byte_order_type::enum_t order) { typedef typename point_type::type point_type; @@ -215,7 +215,7 @@ struct point_container_parser { return false; } - + typedef typename std::iterator_traits::difference_type size_type; if(num_points > (std::numeric_limits::max)() ) { @@ -256,7 +256,7 @@ template struct linestring_parser { template - static bool parse(Iterator& it, Iterator end, L& linestring, + static bool parse(Iterator& it, Iterator end, L& linestring, byte_order_type::enum_t order) { if (!geometry_type_parser::parse(it, end, order)) @@ -268,7 +268,7 @@ struct linestring_parser { throw boost::geometry::read_wkb_exception(); } - + return point_container_parser::parse(it, end, linestring, order); } }; @@ -277,7 +277,7 @@ template struct polygon_parser { template - static bool parse(Iterator& it, Iterator end, Polygon& polygon, + static bool parse(Iterator& it, Iterator end, Polygon& polygon, byte_order_type::enum_t order) { if (!geometry_type_parser::parse(it, end, order)) @@ -290,7 +290,7 @@ struct polygon_parser { return false; } - + typedef typename boost::geometry::ring_return_type::type ring_type; std::size_t rings_parsed = 0; @@ -308,7 +308,7 @@ struct polygon_parser { boost::geometry::range::resize(interior_rings(polygon), rings_parsed); ring_type ringN = boost::geometry::range::back(interior_rings(polygon)); - + if (!point_container_parser::parse(it, end, ringN, order)) { return false; diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp index 4fb97b77d..8345796b2 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp @@ -218,7 +218,7 @@ namespace detail { namespace wkb for(typename boost::range_iterator::type point_iter = boost::begin(*ring_iter); - point_iter != boost::end(*ring_iter); + point_iter != boost::end(*ring_iter); ++point_iter) { // write point's x, y, z diff --git a/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp b/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp index 431ce1715..c880a24cc 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/write_wkb.hpp @@ -29,7 +29,7 @@ namespace dispatch { template -struct write_wkb +struct write_wkb { }; @@ -101,8 +101,8 @@ inline bool write_wkb(const G& geometry, OutputIterator iter) } // template -// inline bool write_wkb(G& geometry, OutputIterator iter, -// detail::wkb::byte_order_type::enum_t source_byte_order, +// inline bool write_wkb(G& geometry, OutputIterator iter, +// detail::wkb::byte_order_type::enum_t source_byte_order, // detail::wkb::byte_order_type::enum_t target_byte_order) // { // // The WKB is written to an OutputIterator. @@ -112,7 +112,7 @@ inline bool write_wkb(const G& geometry, OutputIterator iter) // typename std::iterator_traits::iterator_category, // const std::output_iterator_tag& // >::value)); -// +// // if // ( // !dispatch::write_wkb @@ -124,7 +124,7 @@ inline bool write_wkb(const G& geometry, OutputIterator iter) // { // return false; // } -// +// // return true; // } diff --git a/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp b/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp index 30009af4c..136d06ed4 100644 --- a/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp +++ b/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp @@ -43,40 +43,40 @@ struct multipoint_parser { return false; } - + boost::uint32_t num_points(0); if (!value_parser::parse(it, end, num_points, order)) { return false; } - + // Check that the number of double values in the stream is equal // or greater than the number of expected values in the multipoint - + typedef typename std::iterator_traits::difference_type size_type; - + typedef typename point_type::type point_type; - + size_type const container_byte_size = dimension::value * num_points * sizeof(double) + num_points * sizeof(boost::uint8_t) + num_points * sizeof(boost::uint32_t); - + size_type const stream_byte_size = std::distance(it,end); - + if(stream_byte_size < container_byte_size) { throw boost::geometry::read_wkb_exception(); } - + point_type point_buffer; std::back_insert_iterator output(std::back_inserter(multipoint)); - + typedef typename std::iterator_traits::difference_type size_type; if(num_points > (std::numeric_limits::max)() ) { throw boost::geometry::read_wkb_exception(); } - + size_type points_parsed = 0; while (points_parsed < num_points && it != end) { @@ -85,16 +85,16 @@ struct multipoint_parser { return false; } - + if (!geometry_type_parser::parse(it, end, point_byte_order)) { return false; } - + parsing_assigner::value>::run(it, end, point_buffer, point_byte_order); - + output = point_buffer; - + ++output; ++points_parsed; } @@ -110,49 +110,49 @@ struct multilinestring_parser { typedef typename MultiLinestring::value_type linestring_type; typedef typename point_type::type point_type; - + if (!geometry_type_parser::parse(it, end, order)) { return false; } - + boost::uint32_t num_linestrings(0); if (!value_parser::parse(it, end, num_linestrings, order)) { return false; } - + std::back_insert_iterator output(std::back_inserter(multilinestring)); - + typedef typename std::iterator_traits::difference_type size_type; if(num_linestrings > (std::numeric_limits::max)() ) { throw boost::geometry::read_wkb_exception(); } - + size_type linestrings_parsed = 0; while (linestrings_parsed < num_linestrings && it != end) { linestring_type linestring_buffer; - + detail::wkb::byte_order_type::enum_t linestring_byte_order; if (!detail::wkb::byte_order_parser::parse(it, end, linestring_byte_order)) { return false; } - + if (!geometry_type_parser::parse(it, end, order)) { return false; } - + if(!point_container_parser::parse(it, end, linestring_buffer, linestring_byte_order)) { return false; } - + output = linestring_buffer; - + ++output; ++linestrings_parsed; } @@ -167,44 +167,44 @@ struct multipolygon_parser static bool parse(Iterator& it, Iterator end, MultiPolygon& multipolygon, byte_order_type::enum_t order) { typedef typename boost::range_value::type polygon_type; - + if (!geometry_type_parser::parse(it, end, order)) { return false; } - + boost::uint32_t num_polygons(0); if (!value_parser::parse(it, end, num_polygons, order)) { return false; } - + std::back_insert_iterator output(std::back_inserter(multipolygon)); - + std::size_t polygons_parsed = 0; while(polygons_parsed < num_polygons && it != end) { polygon_type polygon_buffer; - + detail::wkb::byte_order_type::enum_t polygon_byte_order; if (!detail::wkb::byte_order_parser::parse(it, end, polygon_byte_order)) { return false; } - + if (!geometry_type_parser::parse(it, end, order)) { return false; } - + boost::uint32_t num_rings(0); if (!value_parser::parse(it, end, num_rings, polygon_byte_order)) { return false; } - + std::size_t rings_parsed = 0; - + while (rings_parsed < num_rings && it != end) { typedef typename boost::geometry::ring_return_type::type ring_type; @@ -212,7 +212,7 @@ struct multipolygon_parser if (0 == rings_parsed) { ring_type ring0 = exterior_ring(polygon_buffer); - + if (!point_container_parser::parse(it, end, ring0, polygon_byte_order)) { return false; @@ -222,7 +222,7 @@ struct multipolygon_parser { boost::geometry::range::resize(interior_rings(polygon_buffer), rings_parsed); ring_type ringN = boost::geometry::range::back(interior_rings(polygon_buffer)); - + if (!point_container_parser::parse(it, end, ringN, polygon_byte_order)) { return false; @@ -230,11 +230,11 @@ struct multipolygon_parser } ++rings_parsed; } - + output = polygon_buffer; ++output; } - + return true; } }; diff --git a/include/boost/geometry/extensions/multi/gis/io/wkb/detail/writer.hpp b/include/boost/geometry/extensions/multi/gis/io/wkb/detail/writer.hpp index 4ea6426d3..6b552b3e9 100644 --- a/include/boost/geometry/extensions/multi/gis/io/wkb/detail/writer.hpp +++ b/include/boost/geometry/extensions/multi/gis/io/wkb/detail/writer.hpp @@ -62,9 +62,9 @@ namespace detail { namespace wkb // write num points uint32_t num_points = boost::size(multipoint); value_writer::write(num_points, iter, byte_order); - + typedef typename point_type::type point_type; - + for(typename boost::range_iterator::type point_iter = boost::begin(multipoint); point_iter != boost::end(multipoint); @@ -95,9 +95,9 @@ namespace detail { namespace wkb // write num linestrings uint32_t num_linestrings = boost::size(multilinestring); value_writer::write(num_linestrings, iter, byte_order); - + typedef typename boost::range_value::type linestring_type; - + for(typename boost::range_iterator::type linestring_iter = boost::begin(multilinestring); linestring_iter != boost::end(multilinestring); @@ -128,9 +128,9 @@ namespace detail { namespace wkb // write num polygons uint32_t num_polygons = boost::size(multipolygon); value_writer::write(num_polygons, iter, byte_order); - + typedef typename boost::range_value::type polygon_type; - + for(typename boost::range_iterator::type polygon_iter = boost::begin(multipolygon); polygon_iter != boost::end(multipolygon); diff --git a/include/boost/geometry/extensions/nsphere/algorithms/within.hpp b/include/boost/geometry/extensions/nsphere/algorithms/within.hpp index 207bc6289..758555a0d 100644 --- a/include/boost/geometry/extensions/nsphere/algorithms/within.hpp +++ b/include/boost/geometry/extensions/nsphere/algorithms/within.hpp @@ -56,7 +56,7 @@ inline bool box_in_circle(B const& b, C const& c, S const& strategy) // Currently only implemented for 2d geometries assert_dimension(); assert_dimension(); - + // Box: all four points must lie within circle point_type const p0 = geometry::make(get(b), get(b)); point_type const p1 = geometry::make(get(b), get(b)); diff --git a/include/boost/geometry/formulas/differential_quantities.hpp b/include/boost/geometry/formulas/differential_quantities.hpp index 789275f14..77b8de183 100644 --- a/include/boost/geometry/formulas/differential_quantities.hpp +++ b/include/boost/geometry/formulas/differential_quantities.hpp @@ -67,7 +67,7 @@ public: CT sin_bet1 = one_minus_f * sin_lat1; CT sin_bet2 = one_minus_f * sin_lat2; - + // equator if (math::equals(sin_bet1, c0) && math::equals(sin_bet2, c0)) { @@ -80,7 +80,7 @@ public: CT m12 = azi_sign * sin(sig_12) * b; reduced_length = m12; } - + if (BOOST_GEOMETRY_CONDITION(EnableGeodesicScale)) { CT M12 = cos(sig_12); @@ -180,11 +180,11 @@ private: { return cos_alp0_sqr * f * L1; } - + CT const sin_4sig1 = c2 * sin_2sig1 * (math::sqr(cos_sig1) - math::sqr(sin_sig1)); // sin(4sig1) CT const sin_4sig2 = c2 * sin_2sig2 * (math::sqr(cos_sig2) - math::sqr(sin_sig2)); // sin(4sig2) CT const sin_4sig_12 = sin_4sig2 - sin_4sig1; - + CT const c8 = 8; CT const c12 = 12; CT const c16 = 16; @@ -266,11 +266,11 @@ private: CT const c8 = 8; CT const c64 = 64; - + CT const sin_4sig1 = c2 * sin_2sig1 * (math::sqr(cos_sig1) - math::sqr(sin_sig1)); // sin(4sig1) CT const sin_4sig2 = c2 * sin_2sig2 * (math::sqr(cos_sig2) - math::sqr(sin_sig2)); // sin(4sig2) CT const sin_4sig_12 = sin_4sig2 - sin_4sig1; - + CT const L2 = (sin_4sig_12 - c8 * sin_2sig_12 + 12 * sig_12) / c64; if (Order == 2) diff --git a/include/boost/geometry/formulas/geographic.hpp b/include/boost/geometry/formulas/geographic.hpp index 9501526ba..cc726876a 100644 --- a/include/boost/geometry/formulas/geographic.hpp +++ b/include/boost/geometry/formulas/geographic.hpp @@ -29,7 +29,7 @@ #include namespace boost { namespace geometry { - + namespace formula { template @@ -107,11 +107,11 @@ inline PointGeo cart3d_to_geo(Point3d const& point_3d, Spheroid const& spheroid) calc_t const xy_l = math::sqrt(math::sqr(x) + math::sqr(y)); calc_t const lonr = atan2(y, x); - + // NOTE: Alternative version // http://www.iag-aig.org/attach/989c8e501d9c5b5e2736955baf2632f5/V60N2_5FT.pdf // calc_t const lonr = c2 * atan2(y, x + xy_l); - + calc_t const latr = atan2(z, (c1 - e_sqr) * xy_l); // NOTE: If h is equal to 0 then there is no need to improve value of latitude @@ -141,8 +141,8 @@ inline PointGeo cart3d_to_geo(Point3d const& point_3d, Spheroid const& spheroid) template inline Point3d projected_to_xy(Point3d const& point_3d, Spheroid const& spheroid) { - typedef typename coordinate_type::type coord_t; - + typedef typename coordinate_type::type coord_t; + // len_xy = sqrt(x^2 + y^2) // r = len_xy - |z / tan(lat)| // assuming h = 0 @@ -151,7 +151,7 @@ inline Point3d projected_to_xy(Point3d const& point_3d, Spheroid const& spheroid // r = e^2 * len_xy // x_res = r * cos(lon) = e^2 * len_xy * x / len_xy = e^2 * x // y_res = r * sin(lon) = e^2 * len_xy * y / len_xy = e^2 * y - + coord_t const c0 = 0; coord_t const e_sqr = formula::eccentricity_sqr(spheroid); @@ -178,7 +178,7 @@ inline Point3d projected_to_surface(Point3d const& direction, Spheroid const& sp //(x*x+y*y)/(a*a) + z*z/(b*b) = 1 // x = d.x * t // y = d.y * t - // z = d.z * t + // z = d.z * t coord_t const dx = get<0>(direction); coord_t const dy = get<1>(direction); coord_t const dz = get<2>(direction); @@ -217,7 +217,7 @@ inline bool projected_to_surface(Point3d const& origin, Point3d const& direction //(x*x+y*y)/(a*a) + z*z/(b*b) = 1 // x = o.x + d.x * t // y = o.y + d.y * t - // z = o.z + d.z * t + // z = o.z + d.z * t coord_t const ox = get<0>(origin); coord_t const oy = get<1>(origin); coord_t const oz = get<2>(origin); diff --git a/include/boost/geometry/formulas/gnomonic_intersection.hpp b/include/boost/geometry/formulas/gnomonic_intersection.hpp index 7e1b7bcda..33c2fe62b 100644 --- a/include/boost/geometry/formulas/gnomonic_intersection.hpp +++ b/include/boost/geometry/formulas/gnomonic_intersection.hpp @@ -60,7 +60,7 @@ public: return apply(lon_a1, lat_a1, lon_a2, lat_a2, lon_b1, lat_b1, lon_b2, lat_b2, lon, lat, spheroid); } - + template static inline bool apply(CT const& lona1, CT const& lata1, CT const& lona2, CT const& lata2, @@ -93,7 +93,7 @@ public: { return false; } - + if (math::equals(lat1, lat) && math::equals(lon1, lon)) { break; @@ -137,7 +137,7 @@ private: x = get<0>(p) / z; y = get<1>(p) / z; - + return true; } }; diff --git a/include/boost/geometry/formulas/gnomonic_spheroid.hpp b/include/boost/geometry/formulas/gnomonic_spheroid.hpp index 4710c6c06..75544fc7d 100644 --- a/include/boost/geometry/formulas/gnomonic_spheroid.hpp +++ b/include/boost/geometry/formulas/gnomonic_spheroid.hpp @@ -66,7 +66,7 @@ public: CT rho = m / M; x = sin(i_res.azimuth) * rho; y = cos(i_res.azimuth) * rho; - + return true; } @@ -78,7 +78,7 @@ public: { CT const a = get_radius<0>(spheroid); CT const ds_threshold = a * std::numeric_limits::epsilon(); // TODO: 0 for non-fundamental type - + CT const azimuth = atan2(x, y); CT const rho = math::sqrt(math::sqr(x) + math::sqr(y)); // use hypot? CT distance = a * atan(rho / a); @@ -95,7 +95,7 @@ public: // found = false; return found; } - + CT const drho = m / M - rho; // rho = m / M CT const ds = drho * math::sqr(M); // drho/ds = 1/M^2 distance -= ds; diff --git a/include/boost/geometry/formulas/interpolate_point_spherical.hpp b/include/boost/geometry/formulas/interpolate_point_spherical.hpp index 2e712d44c..5c2d03a72 100644 --- a/include/boost/geometry/formulas/interpolate_point_spherical.hpp +++ b/include/boost/geometry/formulas/interpolate_point_spherical.hpp @@ -29,7 +29,7 @@ public : void compute_angle(Point const& p0, Point const& p1, CalculationType& angle01) - { + { m_xyz0 = formula::sph_to_cart3d(p0); m_xyz1 = formula::sph_to_cart3d(p1); CalculationType const dot01 = geometry::dot_product(m_xyz0, m_xyz1); diff --git a/include/boost/geometry/formulas/karney_inverse.hpp b/include/boost/geometry/formulas/karney_inverse.hpp index 936fbe22c..e1a5de0a3 100644 --- a/include/boost/geometry/formulas/karney_inverse.hpp +++ b/include/boost/geometry/formulas/karney_inverse.hpp @@ -381,7 +381,7 @@ public: cos_alpha1 / sin_alpha1 > cos_alpha1b / sin_alpha1b)) { sin_alpha1b = sin_alpha1; - cos_alpha1b = cos_alpha1; + cos_alpha1b = cos_alpha1; } else if (v < c0 && (iteration > max_iterations || cos_alpha1 / sin_alpha1 < cos_alpha1a / sin_alpha1a)) diff --git a/include/boost/geometry/formulas/sjoberg_intersection.hpp b/include/boost/geometry/formulas/sjoberg_intersection.hpp index 12abb7675..7c9222e0c 100644 --- a/include/boost/geometry/formulas/sjoberg_intersection.hpp +++ b/include/boost/geometry/formulas/sjoberg_intersection.hpp @@ -71,7 +71,7 @@ struct sjoberg_intersection_spherical_02 CT const tan_lat_a2 = tan(lat_a2); CT const tan_lat_b2 = tan(lat_b2); - + return apply(lon1, lon_a2, lon2, lon_b2, sin_lon1, cos_lon1, sin_lat1, cos_lat1, sin_lon2, cos_lon2, sin_lat2, cos_lat2, @@ -103,7 +103,7 @@ private: CT const tan_alpha1_x = cos_lat1 * tan_lat_a2 - sin_lat1 * cos_dlon1; CT const tan_alpha2_x = cos_lat2 * tan_lat_b2 - sin_lat2 * cos_dlon2; - + CT const c0 = 0; bool const is_vertical1 = math::equals(sin_dlon1, c0) || math::equals(tan_alpha1_x, c0); bool const is_vertical2 = math::equals(sin_dlon2, c0) || math::equals(tan_alpha2_x, c0); @@ -132,7 +132,7 @@ private: { tan_alpha1 = sin_dlon1 / tan_alpha1_x; tan_alpha2 = sin_dlon2 / tan_alpha2_x; - + CT const T1 = tan_alpha1 * cos_lat1; CT const T2 = tan_alpha2 * cos_lat2; CT const T1T2 = T1*T2; @@ -152,12 +152,12 @@ private: CT const lon_dist2 = (std::max)((std::min)(math::longitude_difference(lon1, lon_2), math::longitude_difference(lon_a2, lon_2)), (std::min)(math::longitude_difference(lon2, lon_2), - math::longitude_difference(lon_b2, lon_2))); + math::longitude_difference(lon_b2, lon_2))); if (lon_dist2 < lon_dist1) { lon = lon_2; } - + CT const sin_lon = sin(lon); CT const cos_lon = cos(lon); @@ -177,7 +177,7 @@ private: CT const lat_x_2 = tan_alpha2 * cos_lat2; tan_lat = lat_y_2 / lat_x_2; } - + return true; } }; @@ -213,7 +213,7 @@ inline CT sjoberg_d_lambda_e_sqr(CT const& sin_betaj, CT const& sin_beta, CT const c1 = 1; CT const c2 = 2; - + CT const asin_B = asin(bounded(sin_beta / sqrt_1_Cj_sqr, -c1, c1)); CT const asin_Bj = asin(sin_betaj / sqrt_1_Cj_sqr); CT const L0 = (asin_B - asin_Bj) / c2; @@ -405,7 +405,7 @@ public: { return false; } - + // NOTE: beta may be slightly out of bounds here but d_lambda handles that CT const dLj = d_lambda(sin_beta); delta_k = sign_lon_diff * (/*asin_t_t0j*/ - asin_tj_t0j + dLj); @@ -451,7 +451,7 @@ public: delta_k_behind = sign_lon_diff * pi; return true; } - + // beta out of bounds and not close if (check_sin_beta && ! (is_sin_beta_ok(sin_beta) @@ -459,7 +459,7 @@ public: { return false; } - + // NOTE: beta may be slightly out of bounds here but d_lambda handles that CT const dLj = d_lambda(sin_beta); delta_k_before = sign_lon_diff * (/*asin_t_t0j*/ - asin_tj_t0j + dLj); @@ -768,7 +768,7 @@ public: } t = one_minus_f * tan_lat_sph; // tan(beta) - } + } // TODO: no need to calculate atan here if reduced latitudes were used // instead of latitudes above, in sjoberg_intersection_spherical_02 @@ -802,7 +802,7 @@ private: CT const c1 = 1; CT const e_sqr = geod1.e_sqr; - + CT lon1_diff = 0; CT lon2_diff = 0; @@ -892,7 +892,7 @@ private: if (math::equals(dbeta_denom, c0)) { return false; - } + } // The sign of dbeta is changed WRT [Sjoberg02] CT const dbeta = (lon1_minus_lon2 + lon1_diff - lon2_diff) / dbeta_denom; @@ -1027,7 +1027,7 @@ private: { break; } - + bool try_t2 = false; converge_07_result result_curr; if (converge_07_step_one(CT(sin(beta1)), t1, lon1_minus_lon2, geodesics, lon_sph, result_curr)) @@ -1063,7 +1063,7 @@ private: } } - + if (try_t2) { CT t2 = t; @@ -1156,7 +1156,7 @@ private: { using math::detail::bounded; CT const c1 = 1; - + CT k_diff_before = 0; CT k_diff_behind = 0; diff --git a/include/boost/geometry/formulas/spherical.hpp b/include/boost/geometry/formulas/spherical.hpp index c73b8b155..3a388bfbc 100644 --- a/include/boost/geometry/formulas/spherical.hpp +++ b/include/boost/geometry/formulas/spherical.hpp @@ -29,7 +29,7 @@ #include namespace boost { namespace geometry { - + namespace formula { template diff --git a/include/boost/geometry/formulas/thomas_inverse.hpp b/include/boost/geometry/formulas/thomas_inverse.hpp index cf69c9df1..c93aaf838 100644 --- a/include/boost/geometry/formulas/thomas_inverse.hpp +++ b/include/boost/geometry/formulas/thomas_inverse.hpp @@ -136,7 +136,7 @@ public: CT const f_sqr = math::sqr(f); CT const f_sqr_per_64 = f_sqr / CT(64); - + if ( BOOST_GEOMETRY_CONDITION(EnableDistance) ) { CT const n1 = X * (A + C*X); @@ -151,7 +151,7 @@ public: //result.distance = a * sin_d * (T - delta1d); result.distance = a * sin_d * (T - delta1d + delta2d); } - + if ( BOOST_GEOMETRY_CONDITION(CalcAzimuths) ) { // NOTE: if both cos_latX == 0 then below we'd have 0 * INF @@ -162,7 +162,7 @@ public: CT const F = c2*Y-E*(c4-X); CT const M = CT(32)*T-(CT(20)*T-A)*X-(B+c4)*Y; CT const G = f*T/c2 + f_sqr_per_64 * M; - + // TODO: // If d_lambda is close to 90 or -90 deg then tan(d_lambda) is big // and F is small. The result is not accurate. diff --git a/include/boost/geometry/formulas/vertex_longitude.hpp b/include/boost/geometry/formulas/vertex_longitude.hpp index e8c5e8775..bef8f5a3f 100644 --- a/include/boost/geometry/formulas/vertex_longitude.hpp +++ b/include/boost/geometry/formulas/vertex_longitude.hpp @@ -212,7 +212,7 @@ public: CT const sign = bet3 >= c0 ? c1 : cminus1; - + CT const dlon_max = omg13 - sign * f * sin_alp0 * I3; return dlon_max; diff --git a/include/boost/geometry/formulas/vincenty_direct.hpp b/include/boost/geometry/formulas/vincenty_direct.hpp index bc150e6d4..274af3f2f 100644 --- a/include/boost/geometry/formulas/vincenty_direct.hpp +++ b/include/boost/geometry/formulas/vincenty_direct.hpp @@ -141,7 +141,7 @@ public: result.lat2 = atan2( sin_U1 * cos_sigma + cos_U1 * sin_sigma * cos_azimuth12, one_min_f * math::sqrt(sin_alpha_sqr + math::sqr(sin_U1 * sin_sigma - cos_U1 * cos_sigma * cos_azimuth12))); // (8) - + CT const lambda = atan2( sin_sigma * sin_azimuth12, cos_U1 * cos_sigma - sin_U1 * sin_sigma * cos_azimuth12); // (9) CT const C = (flattening/CT(16)) * cos_alpha_sqr * ( CT(4) + flattening * ( CT(4) - CT(3) * cos_alpha_sqr ) ); // (10) diff --git a/include/boost/geometry/formulas/vincenty_inverse.hpp b/include/boost/geometry/formulas/vincenty_inverse.hpp index a25e5a084..24f285d9b 100644 --- a/include/boost/geometry/formulas/vincenty_inverse.hpp +++ b/include/boost/geometry/formulas/vincenty_inverse.hpp @@ -159,7 +159,7 @@ public: } while ( geometry::math::abs(previous_lambda - lambda) > c_e_12 && geometry::math::abs(lambda) < pi && counter < BOOST_GEOMETRY_DETAIL_VINCENTY_MAX_STEPS ); // robustness - + if ( BOOST_GEOMETRY_CONDITION(EnableDistance) ) { // Some types cannot divide by doubles @@ -187,7 +187,7 @@ public: result.distance = radius_b * A * (sigma - delta_sigma); // (19) } - + if ( BOOST_GEOMETRY_CONDITION(CalcAzimuths) ) { if (BOOST_GEOMETRY_CONDITION(CalcFwdAzimuth)) diff --git a/include/boost/geometry/geometries/concepts/geometry_collection_concept.hpp b/include/boost/geometry/geometries/concepts/geometry_collection_concept.hpp index 0c40ab320..7d232c145 100644 --- a/include/boost/geometry/geometries/concepts/geometry_collection_concept.hpp +++ b/include/boost/geometry/geometries/concepts/geometry_collection_concept.hpp @@ -113,8 +113,8 @@ struct GeometryCollection BOOST_CONCEPT_USAGE(GeometryCollection) { - Geometry* gc = nullptr; - traits::clear::apply(*gc); + Geometry* gc = nullptr; + traits::clear::apply(*gc); traits::iter_visit::apply([](auto &&) {}, boost::begin(*gc)); } #endif // DOXYGEN_NO_CONCEPT_MEMBERS diff --git a/include/boost/geometry/geometries/point_xyz.hpp b/include/boost/geometry/geometries/point_xyz.hpp index 8f8ccf422..d346b28a5 100644 --- a/include/boost/geometry/geometries/point_xyz.hpp +++ b/include/boost/geometry/geometries/point_xyz.hpp @@ -70,7 +70,7 @@ public: /// Set y-value void y(CoordinateType const& v) { this->template set<1>(v); } - + /// Set z-value void z(CoordinateType const& v) { this->template set<2>(v); } diff --git a/include/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp b/include/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp index 6afe03eec..97553f7c3 100644 --- a/include/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp +++ b/include/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp @@ -55,7 +55,7 @@ struct sum_for_indexable_dimension(pt); indexable_coord_t ind_c_min = geometry::get(i); indexable_coord_t ind_c_max = geometry::get(i); - + indexable_coord_t ind_c_avg = ind_c_min + (ind_c_max - ind_c_min) / 2; // TODO: awulkiew - is (ind_c_min + ind_c_max) / 2 safe? diff --git a/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp b/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp index 508b70619..2f28163a1 100644 --- a/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp +++ b/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp @@ -56,7 +56,7 @@ struct smallest_for_indexable_dimension static inline bool apply(Indexable const& b, Linestring const& path, comparable_distance_type & comparable_distance) { typedef typename ::boost::range_value::type point_type; - typedef typename ::boost::range_const_iterator::type const_iterator; + typedef typename ::boost::range_const_iterator::type const_iterator; typedef typename ::boost::range_size::type size_type; - + const size_type count = ::boost::size(path); if ( count == 2 ) diff --git a/include/boost/geometry/index/detail/bounded_view.hpp b/include/boost/geometry/index/detail/bounded_view.hpp index 6b4d91a64..b3776416b 100644 --- a/include/boost/geometry/index/detail/bounded_view.hpp +++ b/include/boost/geometry/index/detail/bounded_view.hpp @@ -71,7 +71,7 @@ public: bounded_view_base(Segment const& segment, Strategy const& ) : m_segment(segment) {} - + template inline coordinate_type get_min() const { diff --git a/include/boost/geometry/index/detail/minmax_heap.hpp b/include/boost/geometry/index/detail/minmax_heap.hpp index 1b95f77ea..7d03c09f0 100644 --- a/include/boost/geometry/index/detail/minmax_heap.hpp +++ b/include/boost/geometry/index/detail/minmax_heap.hpp @@ -252,7 +252,7 @@ inline void pop_heap1(It first, diff_t p, diff_t size, val_t val, Co p = m; } } - + if (size >= 2 && p <= ((size - 2) >> 1)) // at least one child { diff_t const l = 2 * p + 1; @@ -298,7 +298,7 @@ inline void pop_heap1(It first, diff_t p, diff_t size, val_t val, Co p = m; } } - + *(first + p) = std::move(val); } @@ -310,14 +310,14 @@ inline void pop_heap(It first, It el, It last, Compare comp) { return; } - + --last; val_t val = std::move(*last); *last = std::move(*el); // Ignore the last element --size; - + diff_t p = el - first; if (level(p) % 2 == 0) // is min level { diff --git a/include/boost/geometry/index/detail/rtree/iterators.hpp b/include/boost/geometry/index/detail/rtree/iterators.hpp index 1d5cd1a23..5ab04a541 100644 --- a/include/boost/geometry/index/detail/rtree/iterators.hpp +++ b/include/boost/geometry/index/detail/rtree/iterators.hpp @@ -120,7 +120,7 @@ public: { return r.m_visitor.is_end(); } - + private: visitor_type m_visitor; }; 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 a71f72095..b698f18e9 100644 --- a/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp +++ b/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp @@ -167,7 +167,7 @@ struct find_greatest_normalized_separation } coordinate_type const width = highest_high - lowest_low; - + // highest_low - lowest_high separation = difference(lowest_high, highest_low); // BOOST_GEOMETRY_INDEX_ASSERT(0 <= width); @@ -450,7 +450,7 @@ struct redistribute_elements content2 = enlarged_content2; } } - + BOOST_GEOMETRY_INDEX_ASSERT(0 < remaining, "unexpected value"); --remaining; } diff --git a/include/boost/geometry/index/detail/rtree/node/node.hpp b/include/boost/geometry/index/detail/rtree/node/node.hpp index 4b789c87e..5317f4580 100644 --- a/include/boost/geometry/index/detail/rtree/node/node.hpp +++ b/include/boost/geometry/index/detail/rtree/node/node.hpp @@ -55,7 +55,7 @@ inline Box elements_box(FwdIter first, FwdIter last, Translator const& tr, Strategy const& strategy) { Box result; - + // Only here to suppress 'uninitialized local variable used' warning // until the suggestion below is not implemented geometry::assign_inverse(result); diff --git a/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp b/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp index e871e6f19..35c198586 100644 --- a/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp +++ b/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp @@ -142,7 +142,7 @@ private: node_allocator_type // node_allocator_type for consistency with variant_leaf >::template rebind_alloc value_allocator_type; typedef boost::container::allocator_traits value_allocator_traits; - + public: typedef Allocator allocator_type; diff --git a/include/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp b/include/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp index 9a3220183..01d6198a5 100644 --- a/include/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp +++ b/include/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp @@ -181,10 +181,10 @@ private: leaf_allocator_type // leaf_allocator_type for consistency with weak_leaf >::template rebind_alloc value_allocator_type; typedef boost::container::allocator_traits value_allocator_traits; - + public: typedef Allocator allocator_type; - + typedef Value value_type; typedef typename value_allocator_traits::reference reference; typedef typename value_allocator_traits::const_reference const_reference; diff --git a/include/boost/geometry/index/detail/rtree/pack_create.hpp b/include/boost/geometry/index/detail/rtree/pack_create.hpp index 14a14320e..7683378d9 100644 --- a/include/boost/geometry/index/detail/rtree/pack_create.hpp +++ b/include/boost/geometry/index/detail/rtree/pack_create.hpp @@ -190,7 +190,7 @@ public: TmpAlloc const& temp_allocator) { typedef typename std::iterator_traits::difference_type diff_type; - + diff_type diff = std::distance(first, last); if ( diff <= 0 ) return node_pointer(0); @@ -206,7 +206,7 @@ public: entries.reserve(values_count); auto const& strategy = index::detail::get_strategy(parameters); - + expandable_box hint_box(strategy); for ( ; first != last ; ++first ) { @@ -369,7 +369,7 @@ private: rtree::elements(in).reserve(nodes_count); // MAY THROW (A) // calculate values box and copy values expandable_box elements_box(detail::get_strategy(parameters)); - + per_level_packets(first, last, hint_box, values_count, subtree_counts, next_subtree_counts, rtree::elements(in), elements_box, parameters, translator, allocators); @@ -414,7 +414,7 @@ private: elements_box.expand(el.first); return; } - + size_type median_count = calculate_median_count(values_count, subtree_counts); EIt median = first + median_count; @@ -424,7 +424,7 @@ private: box_type left, right; pack_utils::nth_element_and_half_boxes<0, dimension> ::apply(first, median, last, hint_box, left, right, greatest_dim_index); - + per_level_packets(first, median, left, median_count, subtree_counts, next_subtree_counts, elements, elements_box, 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 05e71fb0e..23de98c16 100644 --- a/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp +++ b/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp @@ -77,7 +77,7 @@ inline void pick_seeds(Elements const& elements, content_type free_content = ( index::detail::content(enlarged_box) - index::detail::content(bounded_ind1) ) - index::detail::content(bounded_ind2); - + if ( greatest_free_content < free_content ) { greatest_free_content = free_content; @@ -121,7 +121,7 @@ struct redistribute_elements elements_type & elements1 = rtree::elements(n); elements_type & elements2 = rtree::elements(second_node); - + BOOST_GEOMETRY_INDEX_ASSERT(elements1.size() == parameters.get_max_elements() + 1, "unexpected elements number"); // copy original elements - use in-memory storage (std::allocator) @@ -130,7 +130,7 @@ struct redistribute_elements container_type; container_type elements_copy(elements1.begin(), elements1.end()); // MAY THROW, STRONG (alloc, copy) container_type elements_backup(elements1.begin(), elements1.end()); // MAY THROW, STRONG (alloc, copy) - + // calculate initial seeds size_t seed1 = 0; size_t seed2 = 0; @@ -277,7 +277,7 @@ struct redistribute_elements It out_it = first; out_content_increase1 = 0; out_content_increase2 = 0; - + // find element with greatest difference between increased group's boxes areas for ( It el_it = first ; el_it != last ; ++el_it ) { diff --git a/include/boost/geometry/index/detail/rtree/query_iterators.hpp b/include/boost/geometry/index/detail/rtree/query_iterators.hpp index c3a41a010..bfb75d0df 100644 --- a/include/boost/geometry/index/detail/rtree/query_iterators.hpp +++ b/include/boost/geometry/index/detail/rtree/query_iterators.hpp @@ -125,7 +125,7 @@ public: { return r.m_impl.is_end(); } - + private: visitors::spatial_query_incremental m_impl; }; @@ -217,7 +217,7 @@ public: virtual ~query_iterator_base() {} virtual query_iterator_base * clone() const = 0; - + virtual bool is_end() const = 0; virtual reference dereference() const = 0; virtual void increment() = 0; diff --git a/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp b/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp index 4ea9060f8..8032a2626 100644 --- a/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp +++ b/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp @@ -60,7 +60,7 @@ public: ::boost::ignore_unused(parameters); children_type & children = rtree::elements(n); - + // children are leafs if ( node_relative_level <= 1 ) { diff --git a/include/boost/geometry/index/detail/rtree/rstar/insert.hpp b/include/boost/geometry/index/detail/rtree/rstar/insert.hpp index ce830007a..bac010fa2 100644 --- a/include/boost/geometry/index/detail/rtree/rstar/insert.hpp +++ b/include/boost/geometry/index/detail/rtree/rstar/insert.hpp @@ -122,7 +122,7 @@ public: sorted_elements_type sorted_elements; // If constructor is used instead of resize() MS implementation leaks here sorted_elements.reserve(elements_count); // MAY THROW, STRONG (V, E: alloc, copy) - + for ( typename elements_type::const_iterator it = elements.begin() ; it != elements.end() ; ++it ) { @@ -186,7 +186,7 @@ private: { return d1.first < d2.first; } - + template static inline bool distances_dsc( std::pair const& d1, @@ -463,7 +463,7 @@ struct level_insert base::traverse(*this, n); // MAY THROW (V, E: alloc, copy, N: alloc) BOOST_GEOMETRY_INDEX_ASSERT(0 < base::m_level, "illegal level value, level shouldn't be the root level for 0 < InsertIndex"); - + if ( base::m_traverse_data.current_level == base::m_level - 1 ) { base::handle_possible_reinsert_or_split_of_root(n); // MAY THROW (E: alloc, copy, N: alloc) @@ -479,7 +479,7 @@ struct level_insert BOOST_GEOMETRY_INDEX_ASSERT(base::m_level == base::m_traverse_data.current_level || base::m_level == (std::numeric_limits::max)(), "unexpected level"); - + rtree::elements(n).push_back(base::m_element); // MAY THROW, STRONG (V: alloc, copy) base::handle_possible_split(n); // MAY THROW (V: alloc, copy, N: alloc) @@ -537,7 +537,7 @@ struct level_insert<0, Value, MembersHolder, true> rtree::elements(n).push_back(base::m_element); // MAY THROW, STRONG (V: alloc, copy) base::handle_possible_reinsert_or_split_of_root(n); // MAY THROW (V: alloc, copy, N: alloc) - + base::recalculate_aabb_if_necessary(n); } }; @@ -599,7 +599,7 @@ public: visitors::insert ins_v( m_root, m_leafs_level, m_element, m_parameters, m_translator, m_allocators, m_relative_level); - rtree::apply_visitor(ins_v, *m_root); + rtree::apply_visitor(ins_v, *m_root); } } @@ -624,7 +624,7 @@ public: visitors::insert ins_v( m_root, m_leafs_level, m_element, m_parameters, m_translator, m_allocators, m_relative_level); - rtree::apply_visitor(ins_v, *m_root); + rtree::apply_visitor(ins_v, *m_root); } } diff --git a/include/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp b/include/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp index 3369280d1..9dcb3db38 100644 --- a/include/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp +++ b/include/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp @@ -132,7 +132,7 @@ struct choose_split_axis_and_index_for_corner // copy elements Elements elements_copy(elements); // MAY THROW, STRONG (alloc, copy) - + size_t const index_first = parameters.get_min_elements(); size_t const index_last = parameters.get_max_elements() - parameters.get_min_elements() + 2; @@ -167,7 +167,7 @@ struct choose_split_axis_and_index_for_corner translator, strategy); Box box2 = rtree::elements_box(elements_copy.begin() + i, elements_copy.end(), translator, strategy); - + sum_of_margins += index::detail::comparable_margin(box1) + index::detail::comparable_margin(box2); content_type ovl = index::detail::intersection_content(box1, box2, strategy); @@ -427,7 +427,7 @@ struct redistribute_elements { typedef typename rtree::elements_type::type elements_type; typedef typename elements_type::value_type element_type; - + elements_type & elements1 = rtree::elements(n); elements_type & elements2 = rtree::elements(second_node); diff --git a/include/boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp b/include/boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp index 64c4d7470..377089fde 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp @@ -70,7 +70,7 @@ public: box_type box_exp = rtree::elements_box(elements.begin(), elements.end(), m_tr, index::detail::get_strategy(m_parameters)); - + if ( m_exact_match ) result = m_is_root || geometry::equals(box_exp, m_box); else @@ -90,7 +90,7 @@ public: result = false; return; } - + box_type box_exp = rtree::values_box(elements.begin(), elements.end(), m_tr, index::detail::get_strategy(m_parameters)); @@ -124,7 +124,7 @@ bool are_boxes_ok(Rtree const& tree, bool exact_match = true) visitors::are_boxes_ok< typename RTV::members_holder > v(tree.parameters(), rtv.translator(), exact_match); - + rtv.apply_visitor(v); return v.result; diff --git a/include/boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp b/include/boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp index 5c8fc9ef2..3ed6db496 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp @@ -26,7 +26,7 @@ class are_counts_ok : public MembersHolder::visitor_const { typedef typename MembersHolder::parameters_type parameters_type; - + typedef typename MembersHolder::internal_node internal_node; typedef typename MembersHolder::leaf leaf; @@ -105,7 +105,7 @@ bool are_counts_ok(Rtree const& tree, bool check_min = true) visitors::are_counts_ok< typename RTV::members_holder > v(tree.parameters(), check_min); - + rtv.apply_visitor(v); return v.result; diff --git a/include/boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp b/include/boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp index a76cf38bf..2c9cec32c 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp @@ -99,7 +99,7 @@ bool are_levels_ok(Rtree const& tree) visitors::are_levels_ok< typename RTV::members_holder > v; - + rtv.apply_visitor(v); return v.result; diff --git a/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp b/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp index 44933dac4..051337a27 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp @@ -181,7 +181,7 @@ struct gl_draw detail::utilities::gl_draw_indexable(it->first, level_rel * z_mul); } } - + size_t level_backup = level; ++level; diff --git a/include/boost/geometry/index/detail/rtree/utilities/print.hpp b/include/boost/geometry/index/detail/rtree/utilities/print.hpp index 15d618eb6..fb885496f 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/print.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/print.hpp @@ -24,7 +24,7 @@ #include namespace boost { namespace geometry { namespace index { namespace detail { - + namespace utilities { namespace dispatch { @@ -160,7 +160,7 @@ struct print elements_type const& elements = rtree::elements(n); spaces(level) << "INTERNAL NODE - L:" << level << " Ch:" << elements.size() << " @:" << &n << '\n'; - + for (typename elements_type::const_iterator it = elements.begin(); it != elements.end(); ++it) { diff --git a/include/boost/geometry/index/detail/rtree/utilities/statistics.hpp b/include/boost/geometry/index/detail/rtree/utilities/statistics.hpp index 17c2c2033..84380443b 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/statistics.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/statistics.hpp @@ -44,37 +44,37 @@ struct statistics { typedef typename rtree::elements_type::type elements_type; elements_type const& elements = rtree::elements(n); - + ++nodes; // count node size_t const level_backup = level; ++level; levels += level++ > levels ? 1 : 0; // count level (root already counted) - + for (typename elements_type::const_iterator it = elements.begin(); it != elements.end(); ++it) { rtree::apply_visitor(*this, *it->second); } - + level = level_backup; } inline void operator()(leaf const& n) - { + { typedef typename rtree::elements_type::type elements_type; elements_type const& elements = rtree::elements(n); ++leaves; // count leaves - + std::size_t const v = elements.size(); // count values spread per node and total values_min = (std::min)(values_min == 0 ? v : values_min, v); values_max = (std::max)(values_max, v); values += v; } - + std::size_t level; std::size_t levels; std::size_t nodes; @@ -98,7 +98,7 @@ statistics(Rtree const& tree) > stats_v; rtv.apply_visitor(stats_v); - + return std::make_tuple(stats_v.levels, stats_v.nodes, stats_v.leaves, stats_v.values, stats_v.values_min, stats_v.values_max); } diff --git a/include/boost/geometry/index/detail/rtree/utilities/view.hpp b/include/boost/geometry/index/detail/rtree/utilities/view.hpp index edaa045ac..8fadc55b4 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/view.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/view.hpp @@ -31,7 +31,7 @@ public: typedef typename Rtree::value_type value_type; typedef typename Rtree::options_type options_type; typedef typename Rtree::box_type box_type; - typedef typename Rtree::allocators_type allocators_type; + typedef typename Rtree::allocators_type allocators_type; view(Rtree const& rt) : m_rtree(rt) {} diff --git a/include/boost/geometry/index/detail/rtree/visitors/copy.hpp b/include/boost/geometry/index/detail/rtree/visitors/copy.hpp index 1dee43d63..447eba2f1 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/copy.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/copy.hpp @@ -53,7 +53,7 @@ public: for (typename elements_type::iterator it = elements.begin(); it != elements.end(); ++it) { - rtree::apply_visitor(*this, *it->second); // MAY THROW (V, E: alloc, copy, N: alloc) + rtree::apply_visitor(*this, *it->second); // MAY THROW (V, E: alloc, copy, N: alloc) // for exception safety subtree_destroyer auto_result(result, m_allocators); diff --git a/include/boost/geometry/index/detail/rtree/visitors/distance_query.hpp b/include/boost/geometry/index/detail/rtree/visitors/distance_query.hpp index 7845326d8..9ebc99941 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/distance_query.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/distance_query.hpp @@ -348,7 +348,7 @@ class distance_query_incremental > nearest_predicate_access; typedef typename nearest_predicate_access::type nearest_predicate_type; typedef typename indexable_type::type indexable_type; - + typedef index::detail::calculate_distance calculate_value_distance; typedef index::detail::calculate_distance calculate_node_distance; typedef typename calculate_value_distance::result_type value_distance_type; @@ -391,7 +391,7 @@ public: // , m_strategy() , m_pred(pred) , m_neighbors_count(0) - , m_neighbor_ptr(nullptr) + , m_neighbor_ptr(nullptr) {} inline distance_query_incremental(MembersHolder const& members, Predicates const& pred) @@ -399,7 +399,7 @@ public: , m_strategy(index::detail::get_strategy(members.parameters())) , m_pred(pred) , m_neighbors_count(0) - , m_neighbor_ptr(nullptr) + , m_neighbor_ptr(nullptr) {} const_reference dereference() const @@ -560,7 +560,7 @@ private: strategy_type m_strategy; Predicates m_pred; - + branches_type m_branches; neighbors_type m_neighbors; size_type m_neighbors_count; diff --git a/include/boost/geometry/index/detail/rtree/visitors/insert.hpp b/include/boost/geometry/index/detail/rtree/visitors/insert.hpp index 5d158bc7d..e410b4baf 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/insert.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/insert.hpp @@ -620,7 +620,7 @@ public: BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level == base::m_leafs_level, "unexpected level"); BOOST_GEOMETRY_INDEX_ASSERT(base::m_level == base::m_traverse_data.current_level || base::m_level == (std::numeric_limits::max)(), "unexpected level"); - + rtree::elements(n).push_back(base::m_element); // MAY THROW, STRONG (V: alloc, copy) base::post_traverse(n); // MAY THROW (V: alloc, copy, N: alloc) diff --git a/include/boost/geometry/index/detail/rtree/visitors/remove.hpp b/include/boost/geometry/index/detail/rtree/visitors/remove.hpp index 7cdbb0344..f6ab0b045 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/remove.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/remove.hpp @@ -157,7 +157,7 @@ public: { typedef typename rtree::elements_type::type elements_type; elements_type & elements = rtree::elements(n); - + // find value and remove it for ( typename elements_type::iterator it = elements.begin() ; it != elements.end() ; ++it ) { diff --git a/include/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp b/include/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp index 48ada100b..3da964b4b 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp @@ -237,7 +237,7 @@ private: internal_data& current_data = m_internal_stack.back(); - // no more children in current node, remove it from stack + // no more children in current node, remove it from stack if (current_data.first == current_data.last) { m_internal_stack.pop_back(); @@ -255,7 +255,7 @@ private: } } } - + const translator_type * m_translator; strategy_type m_strategy; diff --git a/include/boost/geometry/index/detail/serialization.hpp b/include/boost/geometry/index/detail/serialization.hpp index 277cdc9c5..aad9a3585 100644 --- a/include/boost/geometry/index/detail/serialization.hpp +++ b/include/boost/geometry/index/detail/serialization.hpp @@ -77,7 +77,7 @@ private: template inline T serialization_load(const char * name, Archive & ar) { - namespace bs = boost::serialization; + namespace bs = boost::serialization; serialization_storage storage(ar, bs::version::value); // load_construct_data ar >> boost::serialization::make_nvp(name, *storage.address()); // serialize //ar >> *storage.address(); // serialize @@ -92,7 +92,7 @@ void serialization_save(T const& t, const char * name, Archive & ar) ar << boost::serialization::make_nvp(name, t); // serialize //ar << t; // serialize } - + }}}} // TODO - move to index/serialization/rtree.hpp @@ -421,7 +421,7 @@ private: if ( current_level < leafs_level ) { node_pointer n = rtree::create_node::apply(allocators); // MAY THROW (A) - subtree_destroyer auto_remover(n, allocators); + subtree_destroyer auto_remover(n, allocators); internal_node & in = rtree::get(*n); elements_type & elements = rtree::elements(in); @@ -482,7 +482,7 @@ public: typedef typename Rtree::value_type value_type; typedef typename Rtree::options_type options_type; typedef typename Rtree::box_type box_type; - typedef typename Rtree::allocators_type allocators_type; + typedef typename Rtree::allocators_type allocators_type; const_private_view(Rtree const& rt) : m_rtree(rt) {} @@ -507,7 +507,7 @@ public: typedef typename Rtree::value_type value_type; typedef typename Rtree::options_type options_type; typedef typename Rtree::box_type box_type; - typedef typename Rtree::allocators_type allocators_type; + typedef typename Rtree::allocators_type allocators_type; private_view(Rtree & rt) : m_rtree(rt) {} diff --git a/include/boost/geometry/index/detail/varray.hpp b/include/boost/geometry/index/detail/varray.hpp index 8a00e361e..ae8333c68 100644 --- a/include/boost/geometry/index/detail/varray.hpp +++ b/include/boost/geometry/index/detail/varray.hpp @@ -49,7 +49,7 @@ */ namespace boost { namespace geometry { namespace index { namespace detail { - + namespace varray_detail { template @@ -99,7 +99,7 @@ struct checker static inline void check_not_empty(Varray const& v) { BOOST_GEOMETRY_INDEX_ASSERT(!v.empty(), "the container is empty"); - + ::boost::ignore_unused(v); } @@ -127,12 +127,12 @@ varray is a sequence container like boost::container::vector with contiguous sto change in size, along with the static allocation, low overhead, and fixed capacity of boost::array. A varray is a sequence that supports random access to elements, constant time insertion and -removal of elements at the end, and linear time insertion and removal of elements at the beginning or +removal of elements at the end, and linear time insertion and removal of elements at the beginning or in the middle. The number of elements in a varray may vary dynamically up to a fixed capacity -because elements are stored within the object itself similarly to an array. However, objects are +because elements are stored within the object itself similarly to an array. However, objects are initialized as they are inserted into varray unlike C arrays or std::array which must construct all elements on instantiation. The behavior of varray enables the use of statically allocated -elements in cases with complex object lifetime requirements that would otherwise not be trivially +elements in cases with complex object lifetime requirements that would otherwise not be trivially possible. \par Error Handling @@ -284,7 +284,7 @@ public: : m_size(0) { BOOST_CONCEPT_ASSERT((boost_concepts::ForwardTraversal)); // Make sure you passed a ForwardIterator - + this->assign(first, last); // may throw } @@ -323,7 +323,7 @@ public: : m_size(other.size()) { errh::check_capacity(*this, other.size()); // may throw - + namespace sv = varray_detail; sv::uninitialized_copy(other.begin(), other.end(), this->begin()); // may throw } @@ -535,7 +535,7 @@ public: typedef typename vt::use_optimized_swap use_optimized_swap; - this->swap_dispatch(other, use_optimized_swap()); + this->swap_dispatch(other, use_optimized_swap()); } //! @pre count <= capacity() @@ -597,7 +597,7 @@ public: else { errh::check_capacity(*this, count); // may throw - + std::uninitialized_fill(this->end(), this->begin() + count, value); // may throw } m_size = count; // update end @@ -641,7 +641,7 @@ public: typedef typename vt::disable_trivial_init dti; errh::check_capacity(*this, m_size + 1); // may throw - + namespace sv = varray_detail; sv::construct(dti(), this->end(), value); // may throw ++m_size; // update end @@ -811,7 +811,7 @@ public: namespace sv = varray_detail; difference_type to_move = std::distance(position, this->end()); - + // TODO - should following lines check for exception and revert to the old size? if ( count < static_cast(to_move) ) @@ -912,9 +912,9 @@ public: errh::check_iterator_end_eq(*this, first); errh::check_iterator_end_eq(*this, last); - + difference_type n = std::distance(first, last); - + //TODO - add invalid range check? //BOOST_GEOMETRY_INDEX_ASSERT(0 <= n, "invalid range"); //TODO - add this->size() check? @@ -1109,7 +1109,7 @@ public: \ return position; \ } \ - + BOOST_MOVE_ITERATE_0TO9(BOOST_GEOMETRY_INDEX_DETAIL_VARRAY_EMPLACE) #undef BOOST_GEOMETRY_INDEX_DETAIL_VARRAY_EMPLACE @@ -1309,7 +1309,7 @@ public: return boost::addressof(*(this->ptr())); } - + //! @brief Returns iterator to the first element. //! //! @return iterator to the first element contained in the vector. @@ -1568,7 +1568,7 @@ private: aligned_storage_type, typename varray::aligned_storage_type > storage_type; - + storage_type temp; Value * temp_ptr = reinterpret_cast(temp.address()); @@ -1657,9 +1657,9 @@ private: void insert_dispatch(iterator position, Iterator first, Iterator last, boost::random_access_traversal_tag const&) { BOOST_CONCEPT_ASSERT((boost_concepts::RandomAccessTraversal)); // Make sure you passed a RandomAccessIterator - + errh::check_iterator_end_eq(*this, position); - + typename boost::iterator_difference::type count = std::distance(first, last); @@ -1694,7 +1694,7 @@ private: std::ptrdiff_t d = std::distance(position, this->begin() + Capacity); std::size_t count = sv::uninitialized_copy_s(first, last, position, d); // may throw - + errh::check_capacity(*this, count <= static_cast(d) ? m_size + count : Capacity + 1); // may throw m_size += count; @@ -1703,7 +1703,7 @@ private: { typename boost::iterator_difference::type count = std::distance(first, last); - + errh::check_capacity(*this, m_size + count); // may throw this->insert_in_the_middle(position, first, last, count); // may throw @@ -1901,7 +1901,7 @@ public: errh::check_capacity(*this, count); // may throw } - + // nothrow void reserve(size_type count) { diff --git a/include/boost/geometry/index/detail/varray_detail.hpp b/include/boost/geometry/index/detail/varray_detail.hpp index c66185f9a..6299a70e0 100644 --- a/include/boost/geometry/index/detail/varray_detail.hpp +++ b/include/boost/geometry/index/detail/varray_detail.hpp @@ -48,13 +48,13 @@ namespace boost { namespace geometry { namespace index { namespace detail { name template struct are_elements_contiguous : std::is_pointer {}; - + // EXPERIMENTAL - not finished // Conditional setup - mark vector iterators defined in known implementations // as iterators pointing to contiguous ranges #if defined(BOOST_GEOMETRY_INDEX_DETAIL_VARRAY_ENABLE_VECTOR_OPTIMIZATION) && !defined(BOOST_NO_EXCEPTIONS) - + template struct are_elements_contiguous< boost::container::container_detail::vector_const_iterator @@ -68,7 +68,7 @@ struct are_elements_contiguous< {}; #if defined(BOOST_DINKUMWARE_STDLIB) - + template struct are_elements_contiguous< std::_Vector_const_iterator @@ -101,7 +101,7 @@ struct are_elements_contiguous< #else // OTHER_STDLIB // TODO - add other iterators implementations - + #endif // STDLIB #endif // BOOST_GEOMETRY_INDEX_DETAIL_VARRAY_ENABLE_VECTOR_OPTIMIZATION && !BOOST_NO_EXCEPTIONS diff --git a/include/boost/geometry/index/equal_to.hpp b/include/boost/geometry/index/equal_to.hpp index 3ce2e1e4c..9e1c091c1 100644 --- a/include/boost/geometry/index/equal_to.hpp +++ b/include/boost/geometry/index/equal_to.hpp @@ -151,10 +151,10 @@ struct equal_to { /*! \brief The type of result returned by function object. */ typedef bool result_type; - + /*! \brief Compare values. If Value is a Geometry geometry::equals() function is used. - + \param l First value. \param r Second value. \return true if values are equal. @@ -183,7 +183,7 @@ struct equal_to, false> /*! \brief Compare values. If pair<> Value member is a Geometry geometry::equals() function is used. - + \param l First value. \param r Second value. \return true if values are equal. @@ -214,7 +214,7 @@ struct equal_to, false> /*! \brief Compare values. If tuple<> Value member is a Geometry geometry::equals() function is used. - + \param l First value. \param r Second value. \return true if values are equal. @@ -277,7 +277,7 @@ struct equal_to, false> /*! \brief Compare values. If tuple<> Value member is a Geometry geometry::equals() function is used. - + \param l First value. \param r Second value. \return true if values are equal. @@ -313,10 +313,10 @@ struct equal_to { /*! \brief The type of result returned by function object. */ typedef typename detail::equal_to::result_type result_type; - + /*! \brief Compare Values. - + \param l First value. \param r Second value. \return true if Values are equal. diff --git a/include/boost/geometry/index/indexable.hpp b/include/boost/geometry/index/indexable.hpp index 2b9f3d0f1..d3a059b68 100644 --- a/include/boost/geometry/index/indexable.hpp +++ b/include/boost/geometry/index/indexable.hpp @@ -63,7 +63,7 @@ struct indexable /*! \brief Return indexable extracted from the value. - + \param v The value. \return The indexable. */ @@ -105,7 +105,7 @@ struct indexable, false> /*! \brief Return indexable extracted from the value. - + \param v The value. \return The indexable. */ @@ -164,7 +164,7 @@ struct indexable_boost_tuple /*! \brief Return indexable extracted from the value. - + \param v The value. \return The indexable. */ @@ -280,7 +280,7 @@ struct indexable, false> /*! \brief Return indexable extracted from the value. - + \param v The value. \return The indexable. */ @@ -339,7 +339,7 @@ struct indexable /*! \brief Return indexable extracted from the value. - + \param v The value. \return The indexable. */ diff --git a/include/boost/geometry/index/inserter.hpp b/include/boost/geometry/index/inserter.hpp index 30280d4cb..8ef2a4606 100644 --- a/include/boost/geometry/index/inserter.hpp +++ b/include/boost/geometry/index/inserter.hpp @@ -34,7 +34,7 @@ public: inline explicit insert_iterator(Container & c) : container(&c) {} - + insert_iterator & operator=(typename Container::value_type const& value) { container->insert(value); diff --git a/include/boost/geometry/index/parameters.hpp b/include/boost/geometry/index/parameters.hpp index 477518866..d5d8d87fe 100644 --- a/include/boost/geometry/index/parameters.hpp +++ b/include/boost/geometry/index/parameters.hpp @@ -25,7 +25,7 @@ namespace boost { namespace geometry { namespace index { -namespace detail { +namespace detail { template struct default_min_elements_s @@ -46,7 +46,7 @@ inline size_t default_min_elements_d_calc(size_t max_elements, size_t min_elemen size_t raw_value = (max_elements * 3) / 10; return 1 <= raw_value ? raw_value : 1; } - + return min_elements; } @@ -67,7 +67,7 @@ inline size_t default_rstar_reinserted_elements_d_calc(size_t max_elements, size { return (max_elements * 3) / 10; } - + return reinserted_elements; } diff --git a/include/boost/geometry/index/predicates.hpp b/include/boost/geometry/index/predicates.hpp index 3678188dc..e4b644430 100644 --- a/include/boost/geometry/index/predicates.hpp +++ b/include/boost/geometry/index/predicates.hpp @@ -423,7 +423,7 @@ operator&&(std::tuple const& t, Pred const& p) std::tuple, Pred >::apply(t, p); } - + }} // namespace detail::predicates }}} // namespace boost::geometry::index diff --git a/include/boost/geometry/index/rtree.hpp b/include/boost/geometry/index/rtree.hpp index 9fe9cabff..82dcb5472 100644 --- a/include/boost/geometry/index/rtree.hpp +++ b/include/boost/geometry/index/rtree.hpp @@ -308,7 +308,7 @@ private: node_pointer root; }; - typedef typename members_holder::translator_type translator_type; + typedef typename members_holder::translator_type translator_type; typedef typename members_holder::options_type options_type; typedef typename members_holder::allocators_type allocators_type; typedef typename members_holder::node node; @@ -718,11 +718,11 @@ public: // NOTE: if propagate is true for std allocators on darwin 4.2.1, glibc++ // (allocators stored as base classes of members_holder) // copying them changes values_count, in this case it doesn't cause errors since data must be copied - + typedef std::integral_constant propagate; - + if ( propagate::value && !(this_allocs == src_allocs) ) this->raw_destroy(*this); detail::assign_cond(this_allocs, src_allocs, propagate()); @@ -752,7 +752,7 @@ public: { allocators_type & this_allocs = m_members.allocators(); allocators_type & src_allocs = src.m_members.allocators(); - + if ( this_allocs == src_allocs ) { this->raw_destroy(*this); @@ -768,7 +768,7 @@ public: // NOTE: if propagate is true for std allocators on darwin 4.2.1, glibc++ // (allocators stored as base classes of members_holder) // moving them changes values_count - + typedef std::integral_constant propagate; @@ -801,11 +801,11 @@ public: boost::swap(m_members.indexable_getter(), other.m_members.indexable_getter()); boost::swap(m_members.equal_to(), other.m_members.equal_to()); boost::swap(m_members.parameters(), other.m_members.parameters()); - + // NOTE: if propagate is true for std allocators on darwin 4.2.1, glibc++ // (allocators stored as base classes of members_holder) // swapping them changes values_count - + typedef std::integral_constant propagate; @@ -1002,7 +1002,7 @@ public: Values will be returned only if all predicates are met. Spatial predicates - + Spatial predicates may be generated by one of the functions listed below: \li \c boost::geometry::index::contains(), \li \c boost::geometry::index::covered_by(), @@ -1022,7 +1022,7 @@ public: \li ! boost::geometry::index::within() Satisfies predicate - + This is a special kind of predicate which allows to pass a user-defined function or function object which checks if Value should be returned by the query. It's generated by: \li \c boost::geometry::index::satisfies(). @@ -1033,7 +1033,7 @@ public: in returning k values to the output iterator. Only one nearest predicate may be passed to the query. It may be generated by: \li \c boost::geometry::index::nearest(). - + Connecting predicates Predicates may be passed together connected with \c operator&&(). @@ -1098,7 +1098,7 @@ public: For the information about predicates which may be passed to this method see query(). \par Example - \verbatim + \verbatim for ( Rtree::const_query_iterator it = tree.qbegin(bgi::nearest(pt, 10000)) ; it != tree.qend() ; ++it ) { @@ -1130,7 +1130,7 @@ public: The modification of the rtree may invalidate the iterators. \param predicates Predicates. - + \return The iterator pointing at the begin of the query range. */ template @@ -1145,7 +1145,7 @@ public: This method returns an iterator which may be used to check if the query has ended. \par Example - \verbatim + \verbatim for ( Rtree::const_query_iterator it = tree.qbegin(bgi::nearest(pt, 10000)) ; it != tree.qend() ; ++it ) { @@ -1174,7 +1174,7 @@ public: \warning The modification of the rtree may invalidate the iterators. - + \return The iterator pointing at the end of the query range. */ const_query_iterator qend() const @@ -1201,7 +1201,7 @@ private: This method returns an iterator which may be used to perform iterative queries. For the information about predicates which may be passed to this method see query(). - + The type of the returned iterator depends on the type of passed Predicates but the iterator of this type may be assigned to the variable of const_query_iterator type. If you'd like to use the type of the iterator returned by this method you may get the type e.g. by using C++11 decltype or Boost.Typeof library. @@ -1246,7 +1246,7 @@ private: The modification of the rtree may invalidate the iterators. \param predicates Predicates. - + \return The iterator pointing at the begin of the query range. */ template @@ -1266,7 +1266,7 @@ private: This method returns the iterator which may be used to perform iterative queries. For the information about the predicates which may be passed to this method see query(). - + The type of the returned iterator depends on the type of passed Predicates but the iterator of this type may be assigned to the variable of const_query_iterator type. If you'd like to use the type of the iterator returned by this method you may get the type e.g. by using C++11 decltype or Boost.Typeof library. @@ -1290,7 +1290,7 @@ private: The modification of the rtree may invalidate the iterators. \param predicates Predicates. - + \return The iterator pointing at the end of the query range. */ template @@ -1308,7 +1308,7 @@ private: This method returns the iterator which may be compared with the iterator returned by qbegin() in order to check if the query has ended. - + The type of the returned iterator is different than the type returned by qbegin() but the iterator of this type may be assigned to the variable of const_query_iterator type. If you'd like to use the type of the iterator returned by this method, which most certainly will be faster than the type-erased iterator, you may get the type @@ -1349,7 +1349,7 @@ private: \warning The modification of the rtree may invalidate the iterators. - + \return The iterator pointing at the end of the query range. */ detail::rtree::iterators::end_query_iterator @@ -1510,7 +1510,7 @@ public: /*! \brief Count Values or Indexables stored in the container. - + For indexable_type it returns the number of values which indexables equals the parameter. For value_type it returns the number of values which equals the parameter. @@ -1892,7 +1892,7 @@ private: return distance_v.apply(m_members, out_it); } - + /*! \brief Count elements corresponding to value or indexable. @@ -2081,7 +2081,7 @@ This query function performs spatial and k-nearest neighbor searches. It allows Values will be returned only if all predicates are met. Spatial predicates - + Spatial predicates may be generated by one of the functions listed below: \li \c boost::geometry::index::contains(), \li \c boost::geometry::index::covered_by(), @@ -2112,7 +2112,7 @@ If the nearest predicate is passed a k-nearest neighbor search will be performed in returning k values to the output iterator. Only one nearest predicate may be passed to the query. It may be generated by: \li \c boost::geometry::index::nearest(). - + Connecting predicates Predicates may be passed together connected with \c operator&&(). @@ -2162,7 +2162,7 @@ query(rtree const& tree, This method returns the iterator which may be used to perform iterative queries. For the information about the predicates which may be passed to this method see query(). - + \par Example \verbatim std::for_each(bgi::qbegin(tree, bgi::nearest(pt, 3)), bgi::qend(tree), do_something()); @@ -2182,7 +2182,7 @@ The modification of the rtree may invalidate the iterators. \param tree The rtree. \param predicates Predicates. - + \return The iterator pointing at the begin of the query range. */ template const& tree \brief Returns the query iterator pointing at the end of the query range. This method returns the iterator which may be used to check if the query has ended. - + \par Example \verbatim std::for_each(bgi::qbegin(tree, bgi::nearest(pt, 3)), bgi::qend(tree), do_something()); @@ -2214,7 +2214,7 @@ Nothing The modification of the rtree may invalidate the iterators. \ingroup rtree_functions - + \return The iterator pointing at the end of the query range. */ template inline diff --git a/include/boost/geometry/io/svg/svg_mapper.hpp b/include/boost/geometry/io/svg/svg_mapper.hpp index aaac85044..601ffba45 100644 --- a/include/boost/geometry/io/svg/svg_mapper.hpp +++ b/include/boost/geometry/io/svg/svg_mapper.hpp @@ -343,7 +343,7 @@ class svg_mapper : boost::noncopyable } public : - + /*! \brief Constructor, initializing the SVG map. Opens and initializes the SVG. Should be called explicitly. diff --git a/include/boost/geometry/io/svg/write.hpp b/include/boost/geometry/io/svg/write.hpp index f372b7adf..e0c68bf95 100644 --- a/include/boost/geometry/io/svg/write.hpp +++ b/include/boost/geometry/io/svg/write.hpp @@ -99,7 +99,7 @@ struct svg_segment ct y1 = geometry::get<0, 1>(segment); ct x2 = geometry::get<1, 0>(segment); ct y2 = geometry::get<1, 1>(segment); - + os << ""; diff --git a/include/boost/geometry/io/wkt/read.hpp b/include/boost/geometry/io/wkt/read.hpp index ccfb4352c..640efd5dd 100644 --- a/include/boost/geometry/io/wkt/read.hpp +++ b/include/boost/geometry/io/wkt/read.hpp @@ -552,8 +552,8 @@ inline bool initialize(tokenizer::iterator& it, // Silence warning C4127: conditional expression is constant #if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable : 4127) +#pragma warning(push) +#pragma warning(disable : 4127) #endif if (has_z && dimension::value < 3) @@ -570,7 +570,7 @@ inline bool initialize(tokenizer::iterator& it, return false; } // M is ignored at all. - + return true; } diff --git a/include/boost/geometry/io/wkt/write.hpp b/include/boost/geometry/io/wkt/write.hpp index 73b374c9e..b386c10bb 100644 --- a/include/boost/geometry/io/wkt/write.hpp +++ b/include/boost/geometry/io/wkt/write.hpp @@ -61,8 +61,8 @@ namespace boost { namespace geometry // Silence warning C4512: 'boost::geometry::wkt_manipulator' : assignment operator could not be generated #if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable : 4512) +#pragma warning(push) +#pragma warning(disable : 4512) #endif #ifndef DOXYGEN_NO_DETAIL @@ -606,7 +606,7 @@ inline std::string to_wkt(Geometry const& geometry, int significant_digits) } #if defined(_MSC_VER) -#pragma warning(pop) +#pragma warning(pop) #endif }} // namespace boost::geometry diff --git a/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp b/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp index edeebee74..8e93cf56e 100644 --- a/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp +++ b/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp @@ -31,7 +31,7 @@ namespace detail { namespace point_iterator template < - typename Geometry, + typename Geometry, typename Tag = typename tag::type > struct inner_range_type diff --git a/include/boost/geometry/iterators/flatten_iterator.hpp b/include/boost/geometry/iterators/flatten_iterator.hpp index cfe232b4e..cdfb5ab1b 100644 --- a/include/boost/geometry/iterators/flatten_iterator.hpp +++ b/include/boost/geometry/iterators/flatten_iterator.hpp @@ -211,7 +211,7 @@ private: } while ( empty(m_outer_it) ); m_inner_it = AccessInnerEnd::apply(*m_outer_it); - } + } --m_inner_it; } }; diff --git a/include/boost/geometry/policies/predicate_based_interrupt_policy.hpp b/include/boost/geometry/policies/predicate_based_interrupt_policy.hpp index 5715e9207..e72cd17f4 100644 --- a/include/boost/geometry/policies/predicate_based_interrupt_policy.hpp +++ b/include/boost/geometry/policies/predicate_based_interrupt_policy.hpp @@ -45,10 +45,10 @@ struct stateless_predicate_based_interrupt_policy { // if there is at least one unacceptable turn in the range, return true bool const has_unacceptable_turn = std::any_of(boost::begin(range), boost::end(range), - [](auto const& turn) { + [](auto const& turn) { return ! IsAcceptableTurnPredicate::apply(turn); }); - + has_intersections = has_unacceptable_turn && !(AllowEmptyTurnRange && boost::empty(range)); @@ -81,12 +81,12 @@ struct predicate_based_interrupt_policy inline bool apply(Range const& range) { // if there is at least one unacceptable turn in the range, return true - bool const has_unacceptable_turn = std::any_of(boost::begin(range), + bool const has_unacceptable_turn = std::any_of(boost::begin(range), boost::end(range), - [&]( auto const& turn ) { + [&]( auto const& turn ) { return ! m_predicate.apply(turn); }); - + has_intersections = has_unacceptable_turn && !(AllowEmptyTurnRange && boost::empty(range)); diff --git a/include/boost/geometry/policies/robustness/segment_ratio.hpp b/include/boost/geometry/policies/robustness/segment_ratio.hpp index 7f283c1d6..9a3914a75 100644 --- a/include/boost/geometry/policies/robustness/segment_ratio.hpp +++ b/include/boost/geometry/policies/robustness/segment_ratio.hpp @@ -164,7 +164,7 @@ public: segment_ratio& operator=(segment_ratio const&) = default; segment_ratio(segment_ratio&&) = default; segment_ratio& operator=(segment_ratio&&) = default; - + // These are needed because in intersection strategies ratios are assigned // in fractions and if a user passes CalculationType then ratio Type in // turns is taken from geometry coordinate_type and the one used in diff --git a/include/boost/geometry/srs/epsg.hpp b/include/boost/geometry/srs/epsg.hpp index f26c2e0c4..7a636e566 100644 --- a/include/boost/geometry/srs/epsg.hpp +++ b/include/boost/geometry/srs/epsg.hpp @@ -19,7 +19,7 @@ namespace boost { namespace geometry { - + namespace projections { diff --git a/include/boost/geometry/srs/esri.hpp b/include/boost/geometry/srs/esri.hpp index 086a2f059..194ae853b 100644 --- a/include/boost/geometry/srs/esri.hpp +++ b/include/boost/geometry/srs/esri.hpp @@ -19,7 +19,7 @@ namespace boost { namespace geometry { - + namespace projections { diff --git a/include/boost/geometry/srs/iau2000.hpp b/include/boost/geometry/srs/iau2000.hpp index 82f2d2176..4e1593072 100644 --- a/include/boost/geometry/srs/iau2000.hpp +++ b/include/boost/geometry/srs/iau2000.hpp @@ -19,7 +19,7 @@ namespace boost { namespace geometry { - + namespace projections { diff --git a/include/boost/geometry/srs/projection.hpp b/include/boost/geometry/srs/projection.hpp index cbb91642a..236ebdb6b 100644 --- a/include/boost/geometry/srs/projection.hpp +++ b/include/boost/geometry/srs/projection.hpp @@ -41,7 +41,7 @@ namespace boost { namespace geometry { - + namespace projections { @@ -392,7 +392,7 @@ class static_proj_wrapper_base < StaticParameters >::type proj_tag; - + typedef typename projections::detail::static_projection_type < proj_tag, @@ -498,7 +498,7 @@ public: namespace srs { - + /*! \brief Representation of projection \details Either dynamic or static projection representation diff --git a/include/boost/geometry/srs/projections/esri_params.hpp b/include/boost/geometry/srs/projections/esri_params.hpp index 01673092f..741e194b1 100644 --- a/include/boost/geometry/srs/projections/esri_params.hpp +++ b/include/boost/geometry/srs/projections/esri_params.hpp @@ -18,7 +18,7 @@ namespace boost { namespace geometry { - + namespace srs { diff --git a/include/boost/geometry/srs/projections/iau2000_params.hpp b/include/boost/geometry/srs/projections/iau2000_params.hpp index 1cc8539a0..2782f2ae0 100644 --- a/include/boost/geometry/srs/projections/iau2000_params.hpp +++ b/include/boost/geometry/srs/projections/iau2000_params.hpp @@ -18,7 +18,7 @@ namespace boost { namespace geometry { - + namespace srs { diff --git a/include/boost/geometry/srs/projections/impl/base_dynamic.hpp b/include/boost/geometry/srs/projections/impl/base_dynamic.hpp index 74fbffa74..de94bade0 100644 --- a/include/boost/geometry/srs/projections/impl/base_dynamic.hpp +++ b/include/boost/geometry/srs/projections/impl/base_dynamic.hpp @@ -146,7 +146,7 @@ public: dynamic_wrapper_fi(Params const& params, P const& par, P3 const& p3) : base_t(params, par, p3) {} - + virtual void inv(P const& par, CT const& xy_x, CT const& xy_y, CT& lp_lon, CT& lp_lat) const { this->prj().inv(par, xy_x, xy_y, lp_lon, lp_lat); diff --git a/include/boost/geometry/srs/projections/impl/geocent.hpp b/include/boost/geometry/srs/projections/impl/geocent.hpp index 8ae2f393c..a4846c2d8 100644 --- a/include/boost/geometry/srs/projections/impl/geocent.hpp +++ b/include/boost/geometry/srs/projections/impl/geocent.hpp @@ -28,7 +28,7 @@ * ERROR HANDLING * * This component checks parameters for valid values. If an invalid value - * is found, the error code is combined with the current error code using + * is found, the error code is combined with the current error code using * the bitwise or. This combining allows multiple error codes to be * returned. The possible error codes are: * @@ -47,13 +47,13 @@ * GEOCENTRIC is intended for reuse by any application that performs * coordinate conversions between geodetic coordinates and geocentric * coordinates. - * + * * * REFERENCES - * + * * An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion, * Ralph Toms, February 1996 UCRL-JC-123138. - * + * * Further information on GEOCENTRIC can be found in the Reuse Manual. * * GEOCENTRIC originated from : U.S. Army Topographic Engineering Center @@ -135,11 +135,11 @@ inline T AD_C() /***************************************************************************/ /* - * FUNCTIONS + * FUNCTIONS */ template -inline long pj_Set_Geocentric_Parameters (GeocentricInfo & gi, T const& a, T const& b) +inline long pj_Set_Geocentric_Parameters (GeocentricInfo & gi, T const& a, T const& b) { /* BEGIN Set_Geocentric_Parameters */ /* @@ -172,7 +172,7 @@ inline long pj_Set_Geocentric_Parameters (GeocentricInfo & gi, T const& a, T template inline void pj_Get_Geocentric_Parameters (GeocentricInfo const& gi, - T & a, + T & a, T & b) { /* BEGIN Get_Geocentric_Parameters */ /* @@ -246,7 +246,7 @@ inline long pj_Convert_Geodetic_To_Geocentric (GeocentricInfo const& gi, /* * The function Convert_Geocentric_To_Geodetic converts geocentric - * coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude, + * coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude, * and height), according to the current ellipsoid parameters. * * X : Geocentric X coordinate, in meters. (input) @@ -326,7 +326,7 @@ inline void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo const& gi, Latitude = PI_OVER_2; Height = -Geocent_b; return; - } + } } } W2 = X*X + Y*Y; diff --git a/include/boost/geometry/srs/projections/impl/pj_apply_gridshift.hpp b/include/boost/geometry/srs/projections/impl/pj_apply_gridshift.hpp index e9e4c9e5b..3d1db4c06 100644 --- a/include/boost/geometry/srs/projections/impl/pj_apply_gridshift.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_apply_gridshift.hpp @@ -338,7 +338,7 @@ inline bool pj_apply_gridshift_3(StreamPolicy const& stream_policy, grids_tag) { typedef typename boost::range_size::type size_type; - + // If the grids are empty the indexes are as well if (gridindexes.empty()) { @@ -356,7 +356,7 @@ inline bool pj_apply_gridshift_3(StreamPolicy const& stream_policy, CalcT in_lon = geometry::get_as_radian<0>(point); CalcT in_lat = geometry::get_as_radian<1>(point); - + pj_gi * gip = find_grid(in_lon, in_lat, grids.gridinfo, gridindexes); if ( gip != NULL ) @@ -369,7 +369,7 @@ inline bool pj_apply_gridshift_3(StreamPolicy const& stream_policy, CalcT out_lat = HUGE_VAL; nad_cvt(in_lon, in_lat, out_lon, out_lat, *gip); - + // TODO: check differently if ( out_lon != HUGE_VAL ) { @@ -392,7 +392,7 @@ inline bool pj_apply_gridshift_3(StreamPolicy const& stream_policy, shared_grids_tag) { typedef typename boost::range_size::type size_type; - + // If the grids are empty the indexes are as well if (gridindexes.empty()) { diff --git a/include/boost/geometry/srs/projections/impl/pj_ell_set.hpp b/include/boost/geometry/srs/projections/impl/pj_ell_set.hpp index 18b4aa116..128c70e68 100644 --- a/include/boost/geometry/srs/projections/impl/pj_ell_set.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_ell_set.hpp @@ -129,7 +129,7 @@ inline bool pj_ell_init_ellps(srs::dpar::parameters const& params, T &a, T &b const pj_ellps_type* pj_ellps = pj_get_ellps().first; const int n = pj_get_ellps().second; int i = it->template get_value(); - + if (i < 0 || i >= n) { BOOST_THROW_EXCEPTION( projection_exception(error_unknown_ellp_param) ); } @@ -244,7 +244,7 @@ inline void pj_ell_init(Params const& params, T &a, T &es) } else if (pj_param_f(params, "rf", srs::dpar::rf, es)) { /* recip flattening */ if (es == 0.0) { BOOST_THROW_EXCEPTION( projection_exception(error_rev_flattening_is_zero) ); - } + } es = 1./ es; es = es * (2. - es); is_ell_set = true; diff --git a/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp b/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp index 0d297b1cb..84682bcb3 100644 --- a/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp @@ -190,18 +190,18 @@ template bool pj_gridinfo_load_ctable(IStream & is, pj_gi_load & gi) { pj_ctable & ct = gi.ct; - + // Move the input stream by the size of the proj4 original CTABLE std::size_t header_size = 80 + 2 * sizeof(pj_ctable::lp_t) + sizeof(pj_ctable::ilp_t) + sizeof(pj_ctable::flp_t*); is.seekg(header_size); - + // read all the actual shift values std::size_t a_size = ct.lim.lam * ct.lim.phi; ct.cvs.resize(a_size); - + std::size_t ch_size = sizeof(pj_ctable::flp_t) * a_size; is.read(reinterpret_cast(&ct.cvs[0]), ch_size); @@ -213,7 +213,7 @@ bool pj_gridinfo_load_ctable(IStream & is, pj_gi_load & gi) } return true; -} +} /************************************************************************/ /* pj_gridinfo_load_ctable2() */ @@ -274,7 +274,7 @@ inline bool pj_gridinfo_load_ntv1(IStream & is, pj_gi_load & gi) std::vector row_buf(r_size); gi.ct.cvs.resize(gi.ct.lim.lam * gi.ct.lim.phi); - + for (boost::int32_t row = 0; row < gi.ct.lim.phi; row++ ) { is.read(reinterpret_cast(&row_buf[0]), ch_size); @@ -366,7 +366,7 @@ inline bool pj_gridinfo_load_gtx(IStream & is, pj_gi_load & gi) { boost::int32_t words = gi.ct.lim.lam * gi.ct.lim.phi; std::size_t const ch_size = sizeof(float) * words; - + is.seekg(gi.grid_offset); // TODO: Consider changing this unintuitive code @@ -827,12 +827,12 @@ inline bool pj_gridinfo_init_ctable2(std::string const& gridname, memcpy( &ct.ll, header + 96, 40 ); // do some minimal validation to ensure the structure isn't corrupt - if ( (ct.lim.lam < 1) || (ct.lim.lam > 100000) + if ( (ct.lim.lam < 1) || (ct.lim.lam > 100000) || (ct.lim.phi < 1) || (ct.lim.phi > 100000) ) { return false; } - + // trim white space and newlines off id boost::trim_right_if(ct.id, is_trimmable_char()); @@ -879,12 +879,12 @@ inline bool pj_gridinfo_init_ctable(std::string const& gridname, memcpy( &ct.ll, header + 80, 40 ); // do some minimal validation to ensure the structure isn't corrupt - if ( (ct.lim.lam < 1) || (ct.lim.lam > 100000) + if ( (ct.lim.lam < 1) || (ct.lim.lam > 100000) || (ct.lim.phi < 1) || (ct.lim.phi > 100000) ) { return false; } - + // trim white space and newlines off id boost::trim_right_if(ct.id, is_trimmable_char()); @@ -923,7 +923,7 @@ inline bool pj_gridinfo_init(std::string const& gridname, if ( is.fail() ) { return false; } - + is.seekg(0); // Determine file type. diff --git a/include/boost/geometry/srs/projections/impl/pj_gridlist.hpp b/include/boost/geometry/srs/projections/impl/pj_gridlist.hpp index 6407142f9..06904238f 100644 --- a/include/boost/geometry/srs/projections/impl/pj_gridlist.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_gridlist.hpp @@ -101,7 +101,7 @@ inline bool pj_gridlist_merge_gridfile(std::string const& gridname, { // Try to find in the existing list of loaded grids. Add all // matching grids as with NTv2 we can get many grids from one - // file (one shared gridname). + // file (one shared gridname). if (pj_gridlist_find_all(gridname, grids.gridinfo, gridindexes)) return true; @@ -118,7 +118,7 @@ inline bool pj_gridlist_merge_gridfile(std::string const& gridname, // Add the grid now that it is loaded. pj_gridlist_add_seq_inc(gridindexes, orig_size, grids.gridinfo.size()); - + return true; } @@ -132,10 +132,10 @@ inline bool pj_gridlist_merge_gridfile(std::string const& gridname, { // Try to find in the existing list of loaded grids. Add all // matching grids as with NTv2 we can get many grids from one - // file (one shared gridname). + // file (one shared gridname). { typename SharedGrids::read_locked lck_grids(grids); - + if (pj_gridlist_find_all(gridname, lck_grids.gridinfo, gridindexes)) return true; } @@ -145,7 +145,7 @@ inline bool pj_gridlist_merge_gridfile(std::string const& gridname, stream_policy.open(is, gridname); pj_gridinfo new_grids; - + if (! pj_gridinfo_init(gridname, is, new_grids)) { return false; @@ -171,9 +171,9 @@ inline bool pj_gridlist_merge_gridfile(std::string const& gridname, for (std::size_t i = 0 ; i < new_grids.size() ; ++ i) new_grids[i].swap(lck_grids.gridinfo[i + orig_size]); } - + pj_gridlist_add_seq_inc(gridindexes, orig_size, new_size); - + return true; } @@ -200,7 +200,7 @@ inline void pj_gridlist_from_nadgrids(srs::detail::nadgrids const& nadgrids, it != nadgrids.end() ; ++it) { bool required = (*it)[0] != '@'; - + std::string name(it->begin() + (required ? 0 : 1), it->end()); if ( ! pj_gridlist_merge_gridfile(name, stream_policy, grids, gridindexes, diff --git a/include/boost/geometry/srs/projections/impl/pj_mlfn.hpp b/include/boost/geometry/srs/projections/impl/pj_mlfn.hpp index 92621875b..2795c7696 100644 --- a/include/boost/geometry/srs/projections/impl/pj_mlfn.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_mlfn.hpp @@ -95,7 +95,7 @@ inline en pj_enfn(T const& es) en[3] = (t *= es) * (C66 - es * C68); en[4] = t * es * C88; } - + return en; } diff --git a/include/boost/geometry/srs/projections/impl/pj_param.hpp b/include/boost/geometry/srs/projections/impl/pj_param.hpp index 283a65967..3ff1b06d1 100644 --- a/include/boost/geometry/srs/projections/impl/pj_param.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_param.hpp @@ -205,7 +205,7 @@ inline bool _pj_param_i(Params const& params, Name const& name, int & par) { set_value(par, *it); return true; - } + } return false; } @@ -214,12 +214,12 @@ template inline bool _pj_param_f(Params const& params, Name const& name, T & par) { check_name(name); - typename Params::const_iterator it = pj_param_find(params, name); + typename Params::const_iterator it = pj_param_find(params, name); if (it != params.end()) { set_value(par, *it); return true; - } + } return false; } @@ -228,19 +228,19 @@ template inline bool _pj_param_r(Params const& params, Name const& name, T & par) { check_name(name); - typename Params::const_iterator it = pj_param_find(params, name); + typename Params::const_iterator it = pj_param_find(params, name); if (it != params.end()) { set_value_r(par, *it); return true; - } + } return false; } /* bool input */ inline bool _pj_get_param_b(srs::detail::proj4_parameters const& pl, std::string const& name) { - srs::detail::proj4_parameters::const_iterator it = pj_param_find(pl, name); + srs::detail::proj4_parameters::const_iterator it = pj_param_find(pl, name); if (it != pl.end()) { switch (it->value[0]) @@ -253,7 +253,7 @@ inline bool _pj_get_param_b(srs::detail::proj4_parameters const& pl, std::string BOOST_THROW_EXCEPTION( projection_exception(error_invalid_boolean_param) ); return false; } - } + } return false; } @@ -270,12 +270,12 @@ inline bool _pj_get_param_b(srs::dpar::parameters const& pl, srs::dpar::name_ /* string input */ inline bool pj_param_s(srs::detail::proj4_parameters const& pl, std::string const& name, std::string & par) { - srs::detail::proj4_parameters::const_iterator it = pj_param_find(pl, name); + srs::detail::proj4_parameters::const_iterator it = pj_param_find(pl, name); if (it != pl.end()) { par = it->value; return true; - } + } return false; } @@ -363,7 +363,7 @@ inline bool _pj_get_param_b(srs::spar::parameters const& params) // { // par = static_cast(it->template get_value()); // return true; -// } +// } // return false; //} diff --git a/include/boost/geometry/srs/projections/impl/pj_qsfn.hpp b/include/boost/geometry/srs/projections/impl/pj_qsfn.hpp index 606fab5e4..7975fbd47 100644 --- a/include/boost/geometry/srs/projections/impl/pj_qsfn.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_qsfn.hpp @@ -42,7 +42,7 @@ namespace boost { namespace geometry { namespace projections { - + namespace detail { /* determine small q */ diff --git a/include/boost/geometry/srs/projections/impl/pj_transform.hpp b/include/boost/geometry/srs/projections/impl/pj_transform.hpp index 02291649e..edf664f67 100644 --- a/include/boost/geometry/srs/projections/impl/pj_transform.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_transform.hpp @@ -470,7 +470,7 @@ inline bool pj_transform(SrcPrj const& srcprj, Par const& srcdefn, result = false; else BOOST_THROW_EXCEPTION( projection_exception(err) ); - + if( dstdefn.fr_meter != 1.0 ) { for( std::size_t i = 0; i < point_count; i++ ) @@ -569,7 +569,7 @@ inline bool pj_transform(SrcPrj const& srcprj, Par const& srcdefn, { point_type & point = range::at(range, i); coord_t x = get_as_radian<0>(point); - + if( is_invalid_point(point) ) continue; @@ -770,7 +770,7 @@ inline int pj_geocentric_to_wgs84( Par const& defn, for(std::size_t i = 0; i < point_count; i++ ) { point_type & point = range::at(rng, i); - + if( is_invalid_point(point) ) continue; @@ -925,7 +925,7 @@ inline bool pj_datum_transform(Par const& srcdefn, /* -------------------------------------------------------------------- */ /* Create a temporary Z array if one is not provided. */ /* -------------------------------------------------------------------- */ - + range_wrapper z_range(range); /* -------------------------------------------------------------------- */ diff --git a/include/boost/geometry/srs/projections/proj/aea.hpp b/include/boost/geometry/srs/projections/proj/aea.hpp index 00f56316b..bf319618a 100644 --- a/include/boost/geometry/srs/projections/proj/aea.hpp +++ b/include/boost/geometry/srs/projections/proj/aea.hpp @@ -174,7 +174,7 @@ namespace projections }; template - inline void setup(Parameters const& par, par_aea& proj_parm) + inline void setup(Parameters const& par, par_aea& proj_parm) { T cosphi, sinphi; int secant; diff --git a/include/boost/geometry/srs/projections/proj/aeqd.hpp b/include/boost/geometry/srs/projections/proj/aeqd.hpp index eeee75f96..ca9f49bdf 100644 --- a/include/boost/geometry/srs/projections/proj/aeqd.hpp +++ b/include/boost/geometry/srs/projections/proj/aeqd.hpp @@ -204,7 +204,7 @@ namespace projections inline void s_forward(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y, Par const& /*par*/, ProjParm const& proj_parm) { static const T half_pi = detail::half_pi(); - + T coslam, cosphi, sinphi; sinphi = sin(lp_lat); @@ -248,7 +248,7 @@ namespace projections { static const T pi = detail::pi(); static const T half_pi = detail::half_pi(); - + T cosc, c_rh, sinc; if ((c_rh = boost::math::hypot(xy_x, xy_y)) > pi) { diff --git a/include/boost/geometry/srs/projections/proj/airy.hpp b/include/boost/geometry/srs/projections/proj/airy.hpp index 00931ae82..0237500c6 100644 --- a/include/boost/geometry/srs/projections/proj/airy.hpp +++ b/include/boost/geometry/srs/projections/proj/airy.hpp @@ -218,7 +218,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(airy_entry, airy_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(airy_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(airy, airy_entry) diff --git a/include/boost/geometry/srs/projections/proj/august.hpp b/include/boost/geometry/srs/projections/proj/august.hpp index 4db65c5a2..0b550a54b 100644 --- a/include/boost/geometry/srs/projections/proj/august.hpp +++ b/include/boost/geometry/srs/projections/proj/august.hpp @@ -125,7 +125,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(august_entry, august_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(august_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(august, august_entry) diff --git a/include/boost/geometry/srs/projections/proj/bipc.hpp b/include/boost/geometry/srs/projections/proj/bipc.hpp index 6eb57e839..bc954ca6b 100644 --- a/include/boost/geometry/srs/projections/proj/bipc.hpp +++ b/include/boost/geometry/srs/projections/proj/bipc.hpp @@ -260,7 +260,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(bipc_entry, bipc_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(bipc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(bipc, bipc_entry) diff --git a/include/boost/geometry/srs/projections/proj/cc.hpp b/include/boost/geometry/srs/projections/proj/cc.hpp index 0684efc6b..400bd2f70 100644 --- a/include/boost/geometry/srs/projections/proj/cc.hpp +++ b/include/boost/geometry/srs/projections/proj/cc.hpp @@ -57,7 +57,7 @@ namespace projections { static const double epsilon10 = 1.e-10; - + template struct base_cc_spheroid { @@ -130,7 +130,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(cc_entry, cc_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(cc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(cc, cc_entry); diff --git a/include/boost/geometry/srs/projections/proj/cea.hpp b/include/boost/geometry/srs/projections/proj/cea.hpp index 53f253aeb..cd37a7998 100644 --- a/include/boost/geometry/srs/projections/proj/cea.hpp +++ b/include/boost/geometry/srs/projections/proj/cea.hpp @@ -218,7 +218,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(cea_entry, cea_spheroid, cea_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(cea_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(cea, cea_entry); diff --git a/include/boost/geometry/srs/projections/proj/chamb.hpp b/include/boost/geometry/srs/projections/proj/chamb.hpp index d0e33fde1..f2e269a6a 100644 --- a/include/boost/geometry/srs/projections/proj/chamb.hpp +++ b/include/boost/geometry/srs/projections/proj/chamb.hpp @@ -272,7 +272,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(chamb_entry, chamb_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(chamb_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(chamb, chamb_entry); diff --git a/include/boost/geometry/srs/projections/proj/collg.hpp b/include/boost/geometry/srs/projections/proj/collg.hpp index 06d08a92a..28a1d1ff1 100644 --- a/include/boost/geometry/srs/projections/proj/collg.hpp +++ b/include/boost/geometry/srs/projections/proj/collg.hpp @@ -144,7 +144,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(collg_entry, collg_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(collg_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(collg, collg_entry); diff --git a/include/boost/geometry/srs/projections/proj/crast.hpp b/include/boost/geometry/srs/projections/proj/crast.hpp index ee8887ba9..55f3aaa0f 100644 --- a/include/boost/geometry/srs/projections/proj/crast.hpp +++ b/include/boost/geometry/srs/projections/proj/crast.hpp @@ -132,7 +132,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(crast_entry, crast_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(crast_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(crast, crast_entry); diff --git a/include/boost/geometry/srs/projections/proj/denoy.hpp b/include/boost/geometry/srs/projections/proj/denoy.hpp index cb5ca2931..1cf89d346 100644 --- a/include/boost/geometry/srs/projections/proj/denoy.hpp +++ b/include/boost/geometry/srs/projections/proj/denoy.hpp @@ -131,7 +131,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(denoy_entry, denoy_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(denoy_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(denoy, denoy_entry); diff --git a/include/boost/geometry/srs/projections/proj/eck1.hpp b/include/boost/geometry/srs/projections/proj/eck1.hpp index 4320176f9..fad743d40 100644 --- a/include/boost/geometry/srs/projections/proj/eck1.hpp +++ b/include/boost/geometry/srs/projections/proj/eck1.hpp @@ -124,7 +124,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck1_entry, eck1_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck1_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck1, eck1_entry); diff --git a/include/boost/geometry/srs/projections/proj/eck2.hpp b/include/boost/geometry/srs/projections/proj/eck2.hpp index b09979668..e80fb071c 100644 --- a/include/boost/geometry/srs/projections/proj/eck2.hpp +++ b/include/boost/geometry/srs/projections/proj/eck2.hpp @@ -141,7 +141,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck2_entry, eck2_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck2_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck2, eck2_entry); diff --git a/include/boost/geometry/srs/projections/proj/eck3.hpp b/include/boost/geometry/srs/projections/proj/eck3.hpp index 85d13ed2d..20c5bc1bb 100644 --- a/include/boost/geometry/srs/projections/proj/eck3.hpp +++ b/include/boost/geometry/srs/projections/proj/eck3.hpp @@ -260,7 +260,7 @@ namespace projections BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(putp1_entry, putp1_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(wag6_entry, wag6_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(kav7_entry, kav7_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck3_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck3, eck3_entry); diff --git a/include/boost/geometry/srs/projections/proj/eck4.hpp b/include/boost/geometry/srs/projections/proj/eck4.hpp index bdc4311e9..d6364353a 100644 --- a/include/boost/geometry/srs/projections/proj/eck4.hpp +++ b/include/boost/geometry/srs/projections/proj/eck4.hpp @@ -152,7 +152,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck4_entry, eck4_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck4_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck4, eck4_entry); diff --git a/include/boost/geometry/srs/projections/proj/eck5.hpp b/include/boost/geometry/srs/projections/proj/eck5.hpp index ae658ea61..ea62eeb39 100644 --- a/include/boost/geometry/srs/projections/proj/eck5.hpp +++ b/include/boost/geometry/srs/projections/proj/eck5.hpp @@ -125,7 +125,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck5_entry, eck5_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck5_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck5, eck5_entry); diff --git a/include/boost/geometry/srs/projections/proj/eqc.hpp b/include/boost/geometry/srs/projections/proj/eqc.hpp index 93a90dca3..b85480008 100644 --- a/include/boost/geometry/srs/projections/proj/eqc.hpp +++ b/include/boost/geometry/srs/projections/proj/eqc.hpp @@ -135,7 +135,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eqc_entry, eqc_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eqc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eqc, eqc_entry); diff --git a/include/boost/geometry/srs/projections/proj/eqdc.hpp b/include/boost/geometry/srs/projections/proj/eqdc.hpp index 2919c5d7f..9fec68c26 100644 --- a/include/boost/geometry/srs/projections/proj/eqdc.hpp +++ b/include/boost/geometry/srs/projections/proj/eqdc.hpp @@ -201,7 +201,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eqdc_entry, eqdc_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eqdc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eqdc, eqdc_entry); diff --git a/include/boost/geometry/srs/projections/proj/etmerc.hpp b/include/boost/geometry/srs/projections/proj/etmerc.hpp index 946ad2813..6d58e7b63 100644 --- a/include/boost/geometry/srs/projections/proj/etmerc.hpp +++ b/include/boost/geometry/srs/projections/proj/etmerc.hpp @@ -427,7 +427,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(etmerc_entry, etmerc_ellipsoid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(utm_entry, utm_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(etmerc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(etmerc, etmerc_entry); diff --git a/include/boost/geometry/srs/projections/proj/fahey.hpp b/include/boost/geometry/srs/projections/proj/fahey.hpp index e143436f9..1889ddfcd 100644 --- a/include/boost/geometry/srs/projections/proj/fahey.hpp +++ b/include/boost/geometry/srs/projections/proj/fahey.hpp @@ -127,7 +127,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(fahey_entry, fahey_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(fahey_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(fahey, fahey_entry); diff --git a/include/boost/geometry/srs/projections/proj/fouc_s.hpp b/include/boost/geometry/srs/projections/proj/fouc_s.hpp index ec1cd3483..5f2825e22 100644 --- a/include/boost/geometry/srs/projections/proj/fouc_s.hpp +++ b/include/boost/geometry/srs/projections/proj/fouc_s.hpp @@ -163,7 +163,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(fouc_s_entry, fouc_s_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(fouc_s_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(fouc_s, fouc_s_entry); diff --git a/include/boost/geometry/srs/projections/proj/gall.hpp b/include/boost/geometry/srs/projections/proj/gall.hpp index 61967ce81..2eea2c102 100644 --- a/include/boost/geometry/srs/projections/proj/gall.hpp +++ b/include/boost/geometry/srs/projections/proj/gall.hpp @@ -126,7 +126,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gall_entry, gall_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gall_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gall, gall_entry); diff --git a/include/boost/geometry/srs/projections/proj/geocent.hpp b/include/boost/geometry/srs/projections/proj/geocent.hpp index ebb5350dc..9c10fe1a7 100644 --- a/include/boost/geometry/srs/projections/proj/geocent.hpp +++ b/include/boost/geometry/srs/projections/proj/geocent.hpp @@ -126,7 +126,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(geocent_entry, geocent_other) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(geocent_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(geocent, geocent_entry); diff --git a/include/boost/geometry/srs/projections/proj/geos.hpp b/include/boost/geometry/srs/projections/proj/geos.hpp index e27786ee1..ddc8095ec 100644 --- a/include/boost/geometry/srs/projections/proj/geos.hpp +++ b/include/boost/geometry/srs/projections/proj/geos.hpp @@ -88,7 +88,7 @@ namespace projections /* Calculation of geocentric latitude. */ lp_lat = atan (this->m_proj_parm.radius_p2 * tan (lp_lat)); - + /* Calculation of the three components of the vector from satellite to ** position on earth surface (lon,lat).*/ r = (this->m_proj_parm.radius_p) / boost::math::hypot(this->m_proj_parm.radius_p * cos (lp_lat), sin (lp_lat)); @@ -121,7 +121,7 @@ namespace projections /* Setting three components of vector from satellite to position.*/ Vx = -1.0; - + if(this->m_proj_parm.flip_axis) { Vz = tan (xy_y / this->m_proj_parm.radius_g_1); Vy = tan (xy_x / this->m_proj_parm.radius_g_1) * boost::math::hypot(1.0, Vz); @@ -207,7 +207,7 @@ namespace projections Vy = tan (xy_x / (this->m_proj_parm.radius_g - 1.0)); Vz = tan (xy_y / (this->m_proj_parm.radius_g - 1.0)) * sqrt (1.0 + Vy * Vy); } - + /* Calculation of terms in cubic equation and determinant.*/ a = Vy * Vy + Vz * Vz + Vx * Vx; b = 2 * this->m_proj_parm.radius_g * Vx; @@ -274,7 +274,7 @@ namespace projections if (par.phi0 != 0.0) BOOST_THROW_EXCEPTION( projection_exception(error_unknown_prime_meridian) ); - + proj_parm.flip_axis = geos_flip_axis(params); proj_parm.radius_g_1 = proj_parm.h / par.a; @@ -353,7 +353,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(geos_entry, geos_spheroid, geos_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(geos_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(geos, geos_entry); diff --git a/include/boost/geometry/srs/projections/proj/gins8.hpp b/include/boost/geometry/srs/projections/proj/gins8.hpp index b1bb4a74c..7f2f4062d 100644 --- a/include/boost/geometry/srs/projections/proj/gins8.hpp +++ b/include/boost/geometry/srs/projections/proj/gins8.hpp @@ -127,7 +127,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(gins8_entry, gins8_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gins8_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gins8, gins8_entry); diff --git a/include/boost/geometry/srs/projections/proj/gn_sinu.hpp b/include/boost/geometry/srs/projections/proj/gn_sinu.hpp index 7e6903f9b..9bc9e4d36 100644 --- a/include/boost/geometry/srs/projections/proj/gn_sinu.hpp +++ b/include/boost/geometry/srs/projections/proj/gn_sinu.hpp @@ -165,7 +165,7 @@ namespace projections }; template - inline void setup(Parameters& par, par_gn_sinu_s& proj_parm) + inline void setup(Parameters& par, par_gn_sinu_s& proj_parm) { par.es = 0; @@ -354,7 +354,7 @@ namespace projections BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(sinu_entry, sinu_spheroid, sinu_ellipsoid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck6_entry, eck6_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(mbtfps_entry, mbtfps_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gn_sinu_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gn_sinu, gn_sinu_entry); diff --git a/include/boost/geometry/srs/projections/proj/gnom.hpp b/include/boost/geometry/srs/projections/proj/gnom.hpp index bde8e1906..afee05653 100644 --- a/include/boost/geometry/srs/projections/proj/gnom.hpp +++ b/include/boost/geometry/srs/projections/proj/gnom.hpp @@ -232,7 +232,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gnom_entry, gnom_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gnom_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gnom, gnom_entry); diff --git a/include/boost/geometry/srs/projections/proj/goode.hpp b/include/boost/geometry/srs/projections/proj/goode.hpp index f8dd87c37..226c09801 100644 --- a/include/boost/geometry/srs/projections/proj/goode.hpp +++ b/include/boost/geometry/srs/projections/proj/goode.hpp @@ -67,7 +67,7 @@ namespace projections { sinu_spheroid sinu; moll_spheroid moll; - + // NOTE: It is ok to share parameters between projections because // the only member that is modified in the constructors of // spherical sinu and moll projections is es = 0 which is set @@ -176,7 +176,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(goode_entry, goode_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(goode_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(goode, goode_entry); diff --git a/include/boost/geometry/srs/projections/proj/gstmerc.hpp b/include/boost/geometry/srs/projections/proj/gstmerc.hpp index a39db181a..d8999d555 100644 --- a/include/boost/geometry/srs/projections/proj/gstmerc.hpp +++ b/include/boost/geometry/srs/projections/proj/gstmerc.hpp @@ -159,7 +159,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gstmerc_entry, gstmerc_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gstmerc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gstmerc, gstmerc_entry); diff --git a/include/boost/geometry/srs/projections/proj/hammer.hpp b/include/boost/geometry/srs/projections/proj/hammer.hpp index de2afa55e..0a8352127 100644 --- a/include/boost/geometry/srs/projections/proj/hammer.hpp +++ b/include/boost/geometry/srs/projections/proj/hammer.hpp @@ -164,7 +164,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(hammer_entry, hammer_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(hammer_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(hammer, hammer_entry) diff --git a/include/boost/geometry/srs/projections/proj/hatano.hpp b/include/boost/geometry/srs/projections/proj/hatano.hpp index 4d444f87e..a87c52f80 100644 --- a/include/boost/geometry/srs/projections/proj/hatano.hpp +++ b/include/boost/geometry/srs/projections/proj/hatano.hpp @@ -170,7 +170,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(hatano_entry, hatano_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(hatano_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(hatano, hatano_entry) diff --git a/include/boost/geometry/srs/projections/proj/healpix.hpp b/include/boost/geometry/srs/projections/proj/healpix.hpp index 670b8b9af..e84da4828 100644 --- a/include/boost/geometry/srs/projections/proj/healpix.hpp +++ b/include/boost/geometry/srs/projections/proj/healpix.hpp @@ -276,7 +276,7 @@ namespace projections **/ template inline void healpix_sphere(T const& lp_lam, T const& lp_phi, T& xy_x, T& xy_y) - { + { static const T pi = detail::pi(); static const T half_pi = detail::half_pi(); static const T fourth_pi = detail::fourth_pi(); @@ -307,7 +307,7 @@ namespace projections **/ template inline void healpix_sphere_inverse(T const& xy_x, T const& xy_y, T& lp_lam, T& lp_phi) - { + { static const T pi = detail::pi(); static const T half_pi = detail::half_pi(); static const T fourth_pi = detail::fourth_pi(); @@ -827,7 +827,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(healpix_entry, healpix_spheroid, healpix_ellipsoid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(rhealpix_entry, rhealpix_spheroid, rhealpix_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(healpix_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(healpix, healpix_entry) diff --git a/include/boost/geometry/srs/projections/proj/igh.hpp b/include/boost/geometry/srs/projections/proj/igh.hpp index 8e01151c8..94fe68bbc 100644 --- a/include/boost/geometry/srs/projections/proj/igh.hpp +++ b/include/boost/geometry/srs/projections/proj/igh.hpp @@ -218,7 +218,7 @@ namespace projections static const T d180 = igh::d180(); static const T c2 = 2.0; - + const T y90 = this->m_proj_parm.dy0 + sqrt(c2); // lt=90 corresponds to y=y0+sqrt(2.0) int z = 0; @@ -317,7 +317,7 @@ namespace projections +-------+--------+-----------+-----------+ -180 -100 -20 80 180 */ - + T lp_lam = 0, lp_phi = d4044118; T xy1_x, xy1_y; T xy3_x, xy3_y; diff --git a/include/boost/geometry/srs/projections/proj/imw_p.hpp b/include/boost/geometry/srs/projections/proj/imw_p.hpp index 2e018646d..72ac322f8 100644 --- a/include/boost/geometry/srs/projections/proj/imw_p.hpp +++ b/include/boost/geometry/srs/projections/proj/imw_p.hpp @@ -298,7 +298,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(imw_p_entry, imw_p_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(imw_p_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(imw_p, imw_p_entry) diff --git a/include/boost/geometry/srs/projections/proj/isea.hpp b/include/boost/geometry/srs/projections/proj/isea.hpp index f1b887ad6..f2984568c 100644 --- a/include/boost/geometry/srs/projections/proj/isea.hpp +++ b/include/boost/geometry/srs/projections/proj/isea.hpp @@ -266,7 +266,7 @@ namespace projections }; return result; } - + template inline const isea_geo * vertex() { @@ -1240,7 +1240,7 @@ namespace projections pj_param_i(params, "aperture", srs::dpar::aperture, proj_parm.dgg.aperture); // TODO: this parameter is set below second time pj_param_i(params, "resolution", srs::dpar::resolution, proj_parm.dgg.resolution); - + isea_mode_init(params, proj_parm); // TODO: pj_param_exists -> pj_get_param_b ? @@ -1303,7 +1303,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(isea_entry, isea_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(isea_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(isea, isea_entry) diff --git a/include/boost/geometry/srs/projections/proj/labrd.hpp b/include/boost/geometry/srs/projections/proj/labrd.hpp index 823bd6955..50fcdc586 100644 --- a/include/boost/geometry/srs/projections/proj/labrd.hpp +++ b/include/boost/geometry/srs/projections/proj/labrd.hpp @@ -226,7 +226,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(labrd_entry, labrd_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(labrd_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(labrd, labrd_entry) diff --git a/include/boost/geometry/srs/projections/proj/laea.hpp b/include/boost/geometry/srs/projections/proj/laea.hpp index c6775ed3e..30f82d07b 100644 --- a/include/boost/geometry/srs/projections/proj/laea.hpp +++ b/include/boost/geometry/srs/projections/proj/laea.hpp @@ -408,7 +408,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(laea_entry, laea_spheroid, laea_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(laea_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(laea, laea_entry) diff --git a/include/boost/geometry/srs/projections/proj/lagrng.hpp b/include/boost/geometry/srs/projections/proj/lagrng.hpp index 439b57471..ad9cf7702 100644 --- a/include/boost/geometry/srs/projections/proj/lagrng.hpp +++ b/include/boost/geometry/srs/projections/proj/lagrng.hpp @@ -109,7 +109,7 @@ namespace projections proj_parm.rw = 0.0; bool is_w_set = pj_param_f(params, "W", srs::dpar::w, proj_parm.rw); - + // Boost.Geometry specific, set default parameters manually if (! is_w_set) { bool const use_defaults = ! pj_get_param_b(params, "no_defs", srs::dpar::no_defs); @@ -170,7 +170,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(lagrng_entry, lagrng_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(lagrng_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(lagrng, lagrng_entry); diff --git a/include/boost/geometry/srs/projections/proj/larr.hpp b/include/boost/geometry/srs/projections/proj/larr.hpp index a584aa337..427b9906c 100644 --- a/include/boost/geometry/srs/projections/proj/larr.hpp +++ b/include/boost/geometry/srs/projections/proj/larr.hpp @@ -116,7 +116,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(larr_entry, larr_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(larr_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(larr, larr_entry); diff --git a/include/boost/geometry/srs/projections/proj/lask.hpp b/include/boost/geometry/srs/projections/proj/lask.hpp index 158402de0..270ae73e9 100644 --- a/include/boost/geometry/srs/projections/proj/lask.hpp +++ b/include/boost/geometry/srs/projections/proj/lask.hpp @@ -130,7 +130,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(lask_entry, lask_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(lask_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(lask, lask_entry); diff --git a/include/boost/geometry/srs/projections/proj/latlong.hpp b/include/boost/geometry/srs/projections/proj/latlong.hpp index 111075ef2..2673b9e63 100644 --- a/include/boost/geometry/srs/projections/proj/latlong.hpp +++ b/include/boost/geometry/srs/projections/proj/latlong.hpp @@ -136,7 +136,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(latlong_entry, latlong_other) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(latlong_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(lonlat, latlong_entry) diff --git a/include/boost/geometry/srs/projections/proj/lcc.hpp b/include/boost/geometry/srs/projections/proj/lcc.hpp index 7210c3b88..611a6e030 100644 --- a/include/boost/geometry/srs/projections/proj/lcc.hpp +++ b/include/boost/geometry/srs/projections/proj/lcc.hpp @@ -248,7 +248,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(lcc_entry, lcc_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(lcc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(lcc, lcc_entry); diff --git a/include/boost/geometry/srs/projections/proj/lcca.hpp b/include/boost/geometry/srs/projections/proj/lcca.hpp index e36ece867..25f3e182d 100644 --- a/include/boost/geometry/srs/projections/proj/lcca.hpp +++ b/include/boost/geometry/srs/projections/proj/lcca.hpp @@ -180,7 +180,7 @@ namespace projections T s2p0, N0, R0, tan0; proj_parm.en = pj_enfn(par.es); - + if (par.phi0 == 0.) { BOOST_THROW_EXCEPTION( projection_exception(error_lat_0_is_zero) ); } @@ -232,7 +232,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(lcca_entry, lcca_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(lcca_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(lcca, lcca_entry) diff --git a/include/boost/geometry/srs/projections/proj/loxim.hpp b/include/boost/geometry/srs/projections/proj/loxim.hpp index d39bf8928..3ad8603d8 100644 --- a/include/boost/geometry/srs/projections/proj/loxim.hpp +++ b/include/boost/geometry/srs/projections/proj/loxim.hpp @@ -168,7 +168,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(loxim_entry, loxim_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(loxim_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(loxim, loxim_entry) diff --git a/include/boost/geometry/srs/projections/proj/lsat.hpp b/include/boost/geometry/srs/projections/proj/lsat.hpp index dd6b3ae62..37ffcc5b7 100644 --- a/include/boost/geometry/srs/projections/proj/lsat.hpp +++ b/include/boost/geometry/srs/projections/proj/lsat.hpp @@ -316,7 +316,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(lsat_entry, lsat_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(lsat_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(lsat, lsat_entry) diff --git a/include/boost/geometry/srs/projections/proj/mbt_fps.hpp b/include/boost/geometry/srs/projections/proj/mbt_fps.hpp index 282799f84..e48843c37 100644 --- a/include/boost/geometry/srs/projections/proj/mbt_fps.hpp +++ b/include/boost/geometry/srs/projections/proj/mbt_fps.hpp @@ -151,7 +151,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(mbt_fps_entry, mbt_fps_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(mbt_fps_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(mbt_fps, mbt_fps_entry) diff --git a/include/boost/geometry/srs/projections/proj/mbtfpp.hpp b/include/boost/geometry/srs/projections/proj/mbtfpp.hpp index 7b587b7da..e8383c6cd 100644 --- a/include/boost/geometry/srs/projections/proj/mbtfpp.hpp +++ b/include/boost/geometry/srs/projections/proj/mbtfpp.hpp @@ -154,7 +154,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(mbtfpp_entry, mbtfpp_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(mbtfpp_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(mbtfpp, mbtfpp_entry) diff --git a/include/boost/geometry/srs/projections/proj/mbtfpq.hpp b/include/boost/geometry/srs/projections/proj/mbtfpq.hpp index 6bd850a5e..2e194e4ab 100644 --- a/include/boost/geometry/srs/projections/proj/mbtfpq.hpp +++ b/include/boost/geometry/srs/projections/proj/mbtfpq.hpp @@ -165,7 +165,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(mbtfpq_entry, mbtfpq_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(mbtfpq_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(mbtfpq, mbtfpq_entry) diff --git a/include/boost/geometry/srs/projections/proj/merc.hpp b/include/boost/geometry/srs/projections/proj/merc.hpp index d2587f925..54c26f702 100644 --- a/include/boost/geometry/srs/projections/proj/merc.hpp +++ b/include/boost/geometry/srs/projections/proj/merc.hpp @@ -233,13 +233,13 @@ namespace projections { // Static projection - BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI2(srs::spar::proj_merc, merc_spheroid, + BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI2(srs::spar::proj_merc, merc_spheroid, merc_ellipsoid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI(srs::spar::proj_webmerc, webmerc_spheroid) // Factory entry(s) - BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(merc_entry, merc_spheroid, + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(merc_entry, merc_spheroid, merc_ellipsoid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(webmerc_entry, webmerc_spheroid) diff --git a/include/boost/geometry/srs/projections/proj/mill.hpp b/include/boost/geometry/srs/projections/proj/mill.hpp index 375f056fb..789cb1312 100644 --- a/include/boost/geometry/srs/projections/proj/mill.hpp +++ b/include/boost/geometry/srs/projections/proj/mill.hpp @@ -129,7 +129,7 @@ namespace projections { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(mill, mill_entry) } - + } // namespace detail #endif // doxygen diff --git a/include/boost/geometry/srs/projections/proj/mod_ster.hpp b/include/boost/geometry/srs/projections/proj/mod_ster.hpp index b7fffb3f9..71df525c7 100644 --- a/include/boost/geometry/srs/projections/proj/mod_ster.hpp +++ b/include/boost/geometry/srs/projections/proj/mod_ster.hpp @@ -458,7 +458,7 @@ namespace projections BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gs48_entry, gs48_ellipsoid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(alsk_entry, alsk_ellipsoid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gs50_entry, gs50_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(mod_ster_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(mil_os, mil_os_entry) diff --git a/include/boost/geometry/srs/projections/proj/moll.hpp b/include/boost/geometry/srs/projections/proj/moll.hpp index e00bb2c76..5dc030f60 100644 --- a/include/boost/geometry/srs/projections/proj/moll.hpp +++ b/include/boost/geometry/srs/projections/proj/moll.hpp @@ -119,7 +119,7 @@ namespace projections }; template - inline void setup(Parameters& par, par_moll& proj_parm, T const& p) + inline void setup(Parameters& par, par_moll& proj_parm, T const& p) { T r, sp, p2 = p + p; @@ -239,7 +239,7 @@ namespace projections BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(moll_entry, moll_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(wag4_entry, wag4_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(wag5_entry, wag5_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(moll_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(moll, moll_entry); diff --git a/include/boost/geometry/srs/projections/proj/nsper.hpp b/include/boost/geometry/srs/projections/proj/nsper.hpp index 49b8c85cd..29ecdc3c9 100644 --- a/include/boost/geometry/srs/projections/proj/nsper.hpp +++ b/include/boost/geometry/srs/projections/proj/nsper.hpp @@ -202,7 +202,7 @@ namespace projections }; template - inline void setup(Params const& params, Parameters& par, par_nsper& proj_parm) + inline void setup(Params const& params, Parameters& par, par_nsper& proj_parm) { proj_parm.height = pj_get_param_f(params, "h", srs::dpar::h); if (proj_parm.height <= 0.) diff --git a/include/boost/geometry/srs/projections/proj/ob_tran.hpp b/include/boost/geometry/srs/projections/proj/ob_tran.hpp index 0ec9ba349..6108a0f08 100644 --- a/include/boost/geometry/srs/projections/proj/ob_tran.hpp +++ b/include/boost/geometry/srs/projections/proj/ob_tran.hpp @@ -61,7 +61,7 @@ namespace projections { #ifndef DOXYGEN_NO_DETAIL namespace detail { - + // fwd declaration needed below template inline detail::dynamic_wrapper_b >* @@ -253,7 +253,7 @@ namespace projections inline void o_forward(T lp_lon, T lp_lat, T& xy_x, T& xy_y, Par const& proj_parm) { T coslam, sinphi, cosphi; - + coslam = cos(lp_lon); sinphi = sin(lp_lat); cosphi = cos(lp_lat); @@ -326,7 +326,7 @@ namespace projections lamc = pj_get_param_r(params, "o_lon_c", srs::dpar::o_lon_c); phic = pj_get_param_r(params, "o_lat_c", srs::dpar::o_lat_c); //alpha = pj_get_param_r(par.params, "o_alpha"); - + if (fabs(fabs(phic) - half_pi) <= tolerance) BOOST_THROW_EXCEPTION( projection_exception(error_lat_0_or_alpha_eq_90) ); @@ -542,7 +542,7 @@ namespace projections */ template struct ob_tran_transverse : public detail::ob_tran::base_ob_tran_transverse - { + { template inline ob_tran_transverse(Params const& , Parameters const& , detail::ob_tran::par_ob_tran const& proj_parm) diff --git a/include/boost/geometry/srs/projections/proj/putp3.hpp b/include/boost/geometry/srs/projections/proj/putp3.hpp index b7ee61350..e057f70e4 100644 --- a/include/boost/geometry/srs/projections/proj/putp3.hpp +++ b/include/boost/geometry/srs/projections/proj/putp3.hpp @@ -97,7 +97,7 @@ namespace projections inline void setup_putp3(Parameters& par, par_putp3& proj_parm) { proj_parm.A = 4. * RPISQ; - + par.es = 0.; } @@ -106,7 +106,7 @@ namespace projections inline void setup_putp3p(Parameters& par, par_putp3& proj_parm) { proj_parm.A = 2. * RPISQ; - + par.es = 0.; } diff --git a/include/boost/geometry/srs/projections/proj/putp4p.hpp b/include/boost/geometry/srs/projections/proj/putp4p.hpp index f510557ca..3647e7e31 100644 --- a/include/boost/geometry/srs/projections/proj/putp4p.hpp +++ b/include/boost/geometry/srs/projections/proj/putp4p.hpp @@ -102,7 +102,7 @@ namespace projections { proj_parm.C_x = 0.874038744; proj_parm.C_y = 3.883251825; - + par.es = 0.; } @@ -112,7 +112,7 @@ namespace projections { proj_parm.C_x = 1.; proj_parm.C_y = 4.442882938; - + par.es = 0.; } diff --git a/include/boost/geometry/srs/projections/proj/putp5.hpp b/include/boost/geometry/srs/projections/proj/putp5.hpp index 6601b9dc9..8968a11b6 100644 --- a/include/boost/geometry/srs/projections/proj/putp5.hpp +++ b/include/boost/geometry/srs/projections/proj/putp5.hpp @@ -90,7 +90,7 @@ namespace projections } }; - + // Putnins P5 template @@ -98,7 +98,7 @@ namespace projections { proj_parm.A = 2.; proj_parm.B = 1.; - + par.es = 0.; } @@ -108,7 +108,7 @@ namespace projections { proj_parm.A = 1.5; proj_parm.B = 0.5; - + par.es = 0.; } diff --git a/include/boost/geometry/srs/projections/proj/putp6.hpp b/include/boost/geometry/srs/projections/proj/putp6.hpp index cf3025247..c7688b47b 100644 --- a/include/boost/geometry/srs/projections/proj/putp6.hpp +++ b/include/boost/geometry/srs/projections/proj/putp6.hpp @@ -110,7 +110,7 @@ namespace projections } }; - + // Putnins P6 template @@ -121,7 +121,7 @@ namespace projections proj_parm.A = 4.; proj_parm.B = 2.1471437182129378784; proj_parm.D = 2.; - + par.es = 0.; } @@ -134,7 +134,7 @@ namespace projections proj_parm.A = 6.; proj_parm.B = 5.61125; proj_parm.D = 3.; - + par.es = 0.; } diff --git a/include/boost/geometry/srs/projections/proj/qsc.hpp b/include/boost/geometry/srs/projections/proj/qsc.hpp index 49eef3398..733015e7f 100644 --- a/include/boost/geometry/srs/projections/proj/qsc.hpp +++ b/include/boost/geometry/srs/projections/proj/qsc.hpp @@ -189,7 +189,7 @@ namespace projections T lat, lon; T theta, phi; - T t, mu; /* nu; */ + T t, mu; /* nu; */ area_type area; /* Convert the geodetic latitude to a geocentric latitude. diff --git a/include/boost/geometry/srs/projections/proj/sconics.hpp b/include/boost/geometry/srs/projections/proj/sconics.hpp index 465928cbd..a0a0551de 100644 --- a/include/boost/geometry/srs/projections/proj/sconics.hpp +++ b/include/boost/geometry/srs/projections/proj/sconics.hpp @@ -163,7 +163,7 @@ namespace projections }; template - inline void setup(Params const& params, Parameters& par, par_sconics& proj_parm, proj_type type) + inline void setup(Params const& params, Parameters& par, par_sconics& proj_parm, proj_type type) { static const T half_pi = detail::half_pi(); @@ -256,7 +256,7 @@ namespace projections inline void setup_murd3(Params const& params, Parameters& par, par_sconics& proj_parm) { setup(params, par, proj_parm, proj_murd3); - } + } // Perspective Conic template @@ -274,7 +274,7 @@ namespace projections }} // namespace detail::sconics #endif // doxygen - + /*! \brief Tissot projection \ingroup projections @@ -462,7 +462,7 @@ namespace projections BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI(srs::spar::proj_pconic, pconic_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI(srs::spar::proj_tissot, tissot_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI(srs::spar::proj_vitk1, vitk1_spheroid) - + // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(euler_entry, euler_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(murd1_entry, murd1_spheroid) diff --git a/include/boost/geometry/srs/projections/proj/somerc.hpp b/include/boost/geometry/srs/projections/proj/somerc.hpp index 6c189726c..7d84d8f9c 100644 --- a/include/boost/geometry/srs/projections/proj/somerc.hpp +++ b/include/boost/geometry/srs/projections/proj/somerc.hpp @@ -183,10 +183,10 @@ namespace projections // Static projection BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI(srs::spar::proj_somerc, somerc_ellipsoid) - + // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(somerc_entry, somerc_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(somerc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(somerc, somerc_entry) diff --git a/include/boost/geometry/srs/projections/proj/sterea.hpp b/include/boost/geometry/srs/projections/proj/sterea.hpp index c1e6134bd..c3b2a0723 100644 --- a/include/boost/geometry/srs/projections/proj/sterea.hpp +++ b/include/boost/geometry/srs/projections/proj/sterea.hpp @@ -165,7 +165,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(sterea_entry, sterea_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(sterea_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(sterea, sterea_entry) diff --git a/include/boost/geometry/srs/projections/proj/sts.hpp b/include/boost/geometry/srs/projections/proj/sts.hpp index deca4d001..8662afb41 100644 --- a/include/boost/geometry/srs/projections/proj/sts.hpp +++ b/include/boost/geometry/srs/projections/proj/sts.hpp @@ -109,7 +109,7 @@ namespace projections }; template - inline void setup(Parameters& par, par_sts& proj_parm, T const& p, T const& q, bool mode) + inline void setup(Parameters& par, par_sts& proj_parm, T const& p, T const& q, bool mode) { par.es = 0.; proj_parm.C_x = q / p; @@ -253,7 +253,7 @@ namespace projections BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(qua_aut_entry, qua_aut_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(mbt_s_entry, mbt_s_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(fouc_entry, fouc_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(sts_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(kav5, kav5_entry) diff --git a/include/boost/geometry/srs/projections/proj/tcc.hpp b/include/boost/geometry/srs/projections/proj/tcc.hpp index 8380d94b0..501aa4f9a 100644 --- a/include/boost/geometry/srs/projections/proj/tcc.hpp +++ b/include/boost/geometry/srs/projections/proj/tcc.hpp @@ -122,7 +122,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(tcc_entry, tcc_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(tcc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(tcc, tcc_entry) diff --git a/include/boost/geometry/srs/projections/proj/tcea.hpp b/include/boost/geometry/srs/projections/proj/tcea.hpp index f442e010b..7e0acf885 100644 --- a/include/boost/geometry/srs/projections/proj/tcea.hpp +++ b/include/boost/geometry/srs/projections/proj/tcea.hpp @@ -93,7 +93,7 @@ namespace projections }} // namespace detail::tcea #endif // doxygen - + /*! \brief Transverse Cylindrical Equal Area projection \ingroup projections @@ -125,7 +125,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(tcea_entry, tcea_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(tcea_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(tcea, tcea_entry) diff --git a/include/boost/geometry/srs/projections/proj/tmerc.hpp b/include/boost/geometry/srs/projections/proj/tmerc.hpp index af86d0d26..1c4d822d5 100644 --- a/include/boost/geometry/srs/projections/proj/tmerc.hpp +++ b/include/boost/geometry/srs/projections/proj/tmerc.hpp @@ -221,7 +221,7 @@ namespace projections /* Helper functions for "exact" transverse mercator */ inline - static T gatg(const T *p1, int len_p1, T B, T cos_2B, T sin_2B) + static T gatg(const T *p1, int len_p1, T B, T cos_2B, T sin_2B) { T h = 0, h1, h2 = 0; @@ -241,7 +241,7 @@ namespace projections static T clenS(const T *a, int size, T sin_arg_r, T cos_arg_r, T sinh_arg_i, T cosh_arg_i, - T *R, T *I) + T *R, T *I) { T r, i, hr, hr1, hr2, hi, hi1, hi2; @@ -268,9 +268,9 @@ namespace projections *I = r*hi + i*hr; return *R; } - + /* Real Clenshaw summation */ - static T clens(const T *a, int size, T arg_r) + static T clens(const T *a, int size, T arg_r) { T r, hr, hr1, hr2, cos_arg_r; @@ -291,16 +291,16 @@ namespace projections /* Ellipsoidal, forward */ //static PJ_XY exact_e_fwd (PJ_LP lp, PJ *P) - inline void fwd(Parameters const& par, - T const& lp_lon, - T const& lp_lat, - T& xy_x, T& xy_y) const + inline void fwd(Parameters const& par, + T const& lp_lon, + T const& lp_lat, + T& xy_x, T& xy_y) const { //PJ_XY xy = {0.0,0.0}; //const auto *Q = &(static_cast(par.opaque)->exact); /* ell. LAT, LNG -> Gaussian LAT, LNG */ - T Cn = gatg (this->m_proj_parm.cbg, proj_etmerc_order, lp_lat, + T Cn = gatg (this->m_proj_parm.cbg, proj_etmerc_order, lp_lat, cos(2*lp_lat), sin(2*lp_lat)); /* Gaussian LAT, LNG -> compl. sph. LAT */ const T sin_Cn = sin (Cn); @@ -382,10 +382,10 @@ namespace projections /* Ellipsoidal, inverse */ - inline void inv(Parameters const& par, - T const& xy_x, - T const& xy_y, - T& lp_lon, + inline void inv(Parameters const& par, + T const& xy_x, + T const& xy_y, + T& lp_lon, T& lp_lat) const { //PJ_LP lp = {0.0,0.0}; @@ -625,7 +625,7 @@ namespace projections /* Origin northing minus true northing at the origin latitude */ /* i.e. true northing = N - par.Zb */ - proj_parm.Zb = - proj_parm.Qn*(Z + base_tmerc_ellipsoid_exact::clens(proj_parm.gtu, proj_etmerc_order, 2*Z)); + proj_parm.Zb = - proj_parm.Qn*(Z + base_tmerc_ellipsoid_exact::clens(proj_parm.gtu, proj_etmerc_order, 2*Z)); } }} // namespace detail::tmerc @@ -645,7 +645,7 @@ namespace projections \image html ex_tmerc.gif */ //approximate tmerc algorithm - /* + /* template struct tmerc_ellipsoid : public detail::tmerc::base_tmerc_ellipsoid { @@ -695,10 +695,10 @@ namespace projections // Static projection BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI2(srs::spar::proj_tmerc, tmerc_spheroid, tmerc_ellipsoid) - + // Factory entry(s) - dynamic projection BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(tmerc_entry, tmerc_spheroid, tmerc_ellipsoid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(tmerc_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(tmerc, tmerc_entry) diff --git a/include/boost/geometry/srs/projections/proj/tpeqd.hpp b/include/boost/geometry/srs/projections/proj/tpeqd.hpp index 4c059313e..8ef38e5be 100644 --- a/include/boost/geometry/srs/projections/proj/tpeqd.hpp +++ b/include/boost/geometry/srs/projections/proj/tpeqd.hpp @@ -199,7 +199,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(tpeqd_entry, tpeqd_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(tpeqd_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(tpeqd, tpeqd_entry) diff --git a/include/boost/geometry/srs/projections/proj/urm5.hpp b/include/boost/geometry/srs/projections/proj/urm5.hpp index b9914382e..2277633c5 100644 --- a/include/boost/geometry/srs/projections/proj/urm5.hpp +++ b/include/boost/geometry/srs/projections/proj/urm5.hpp @@ -145,7 +145,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(urm5_entry, urm5_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(urm5_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(urm5, urm5_entry) diff --git a/include/boost/geometry/srs/projections/proj/urmfps.hpp b/include/boost/geometry/srs/projections/proj/urmfps.hpp index a065b651f..002acc246 100644 --- a/include/boost/geometry/srs/projections/proj/urmfps.hpp +++ b/include/boost/geometry/srs/projections/proj/urmfps.hpp @@ -96,7 +96,7 @@ namespace projections }; template - inline void setup(Parameters& par, par_urmfps& proj_parm) + inline void setup(Parameters& par, par_urmfps& proj_parm) { proj_parm.C_y = Cy / proj_parm.n; par.es = 0.; @@ -184,7 +184,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(urmfps_entry, urmfps_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(wag1_entry, wag1_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(urmfps_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(urmfps, urmfps_entry) diff --git a/include/boost/geometry/srs/projections/proj/vandg.hpp b/include/boost/geometry/srs/projections/proj/vandg.hpp index c34c500ab..95552d460 100644 --- a/include/boost/geometry/srs/projections/proj/vandg.hpp +++ b/include/boost/geometry/srs/projections/proj/vandg.hpp @@ -126,10 +126,10 @@ namespace projections static const T two_pi = detail::two_pi(); static const T C2_27 = vandg::C2_27(); - static const T PI4_3 = vandg::PI4_3(); + static const T PI4_3 = vandg::PI4_3(); static const T TPISQ = vandg::TPISQ(); static const T HPISQ = vandg::HPISQ(); - + T t, c0, c1, c2, c3, al, r2, r, m, d, ay, x2, y2; x2 = xy_x * xy_x; @@ -210,7 +210,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(vandg_entry, vandg_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(vandg_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(vandg, vandg_entry) diff --git a/include/boost/geometry/srs/projections/proj/vandg2.hpp b/include/boost/geometry/srs/projections/proj/vandg2.hpp index 3d5a7d5ce..c6ae88b97 100644 --- a/include/boost/geometry/srs/projections/proj/vandg2.hpp +++ b/include/boost/geometry/srs/projections/proj/vandg2.hpp @@ -183,7 +183,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(vandg2_entry, vandg2_spheroid) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(vandg3_entry, vandg3_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(vandg2_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(vandg2, vandg2_entry) diff --git a/include/boost/geometry/srs/projections/proj/vandg4.hpp b/include/boost/geometry/srs/projections/proj/vandg4.hpp index 92cd6302b..22f46b663 100644 --- a/include/boost/geometry/srs/projections/proj/vandg4.hpp +++ b/include/boost/geometry/srs/projections/proj/vandg4.hpp @@ -150,7 +150,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(vandg4_entry, vandg4_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(vandg4_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(vandg4, vandg4_entry) diff --git a/include/boost/geometry/srs/projections/proj/wag2.hpp b/include/boost/geometry/srs/projections/proj/wag2.hpp index 78e7b0318..fb23c222b 100644 --- a/include/boost/geometry/srs/projections/proj/wag2.hpp +++ b/include/boost/geometry/srs/projections/proj/wag2.hpp @@ -129,7 +129,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(wag2_entry, wag2_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(wag2_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(wag2, wag2_entry) diff --git a/include/boost/geometry/srs/projections/proj/wag3.hpp b/include/boost/geometry/srs/projections/proj/wag3.hpp index 2c65eb591..2bdb51a6a 100644 --- a/include/boost/geometry/srs/projections/proj/wag3.hpp +++ b/include/boost/geometry/srs/projections/proj/wag3.hpp @@ -137,7 +137,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(wag3_entry, wag3_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(wag3_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(wag3, wag3_entry) diff --git a/include/boost/geometry/srs/projections/proj/wag7.hpp b/include/boost/geometry/srs/projections/proj/wag7.hpp index f2fafb58a..2e6ae918a 100644 --- a/include/boost/geometry/srs/projections/proj/wag7.hpp +++ b/include/boost/geometry/srs/projections/proj/wag7.hpp @@ -118,7 +118,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(wag7_entry, wag7_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(wag7_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(wag7, wag7_entry) diff --git a/include/boost/geometry/srs/projections/proj/wink1.hpp b/include/boost/geometry/srs/projections/proj/wink1.hpp index c3c399848..9d2bedb0b 100644 --- a/include/boost/geometry/srs/projections/proj/wink1.hpp +++ b/include/boost/geometry/srs/projections/proj/wink1.hpp @@ -133,7 +133,7 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(wink1_entry, wink1_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(wink1_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(wink1, wink1_entry) diff --git a/include/boost/geometry/srs/projections/proj/wink2.hpp b/include/boost/geometry/srs/projections/proj/wink2.hpp index a8d2bdb57..484ab4ebc 100644 --- a/include/boost/geometry/srs/projections/proj/wink2.hpp +++ b/include/boost/geometry/srs/projections/proj/wink2.hpp @@ -152,12 +152,12 @@ namespace projections // Factory entry(s) BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(wink2_entry, wink2_spheroid) - + BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(wink2_init) { BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(wink2, wink2_entry) } - + } // namespace detail #endif // doxygen diff --git a/include/boost/geometry/srs/projections/proj4.hpp b/include/boost/geometry/srs/projections/proj4.hpp index 2e1d06c15..b896acbec 100644 --- a/include/boost/geometry/srs/projections/proj4.hpp +++ b/include/boost/geometry/srs/projections/proj4.hpp @@ -21,7 +21,7 @@ namespace boost { namespace geometry { - + namespace srs { diff --git a/include/boost/geometry/srs/shared_grids.hpp b/include/boost/geometry/srs/shared_grids.hpp index 52b4e9944..54bbb442a 100644 --- a/include/boost/geometry/srs/shared_grids.hpp +++ b/include/boost/geometry/srs/shared_grids.hpp @@ -16,7 +16,7 @@ namespace boost { namespace geometry { - + namespace srs { diff --git a/include/boost/geometry/srs/shared_grids_boost.hpp b/include/boost/geometry/srs/shared_grids_boost.hpp index e55298d73..774fa6695 100644 --- a/include/boost/geometry/srs/shared_grids_boost.hpp +++ b/include/boost/geometry/srs/shared_grids_boost.hpp @@ -19,7 +19,7 @@ namespace boost { namespace geometry { - + namespace srs { diff --git a/include/boost/geometry/srs/shared_grids_std.hpp b/include/boost/geometry/srs/shared_grids_std.hpp index f940d9037..d6f406130 100644 --- a/include/boost/geometry/srs/shared_grids_std.hpp +++ b/include/boost/geometry/srs/shared_grids_std.hpp @@ -25,7 +25,7 @@ namespace boost { namespace geometry { - + namespace srs { diff --git a/include/boost/geometry/srs/spheroid.hpp b/include/boost/geometry/srs/spheroid.hpp index 63ef10095..f8e5b5181 100644 --- a/include/boost/geometry/srs/spheroid.hpp +++ b/include/boost/geometry/srs/spheroid.hpp @@ -35,7 +35,7 @@ namespace boost { namespace geometry { - + namespace srs { diff --git a/include/boost/geometry/srs/transformation.hpp b/include/boost/geometry/srs/transformation.hpp index f661e47a6..d3c9b09c5 100644 --- a/include/boost/geometry/srs/transformation.hpp +++ b/include/boost/geometry/srs/transformation.hpp @@ -95,7 +95,7 @@ struct transform_geometry_point typedef typename geometry::point_type::type point_type; typedef geometry::model::point - < + < typename select_most_precise < typename geometry::coordinate_type::type, @@ -552,7 +552,7 @@ struct transform }} // namespace projections::detail - + namespace srs { diff --git a/include/boost/geometry/strategies/azimuth/spherical.hpp b/include/boost/geometry/strategies/azimuth/spherical.hpp index a87cf927b..c27781996 100644 --- a/include/boost/geometry/strategies/azimuth/spherical.hpp +++ b/include/boost/geometry/strategies/azimuth/spherical.hpp @@ -30,7 +30,7 @@ class spherical : strategies::detail::spherical_base using base_t = strategies::detail::spherical_base; public: - + static auto azimuth() { return strategy::azimuth::spherical(); diff --git a/include/boost/geometry/strategies/cartesian.hpp b/include/boost/geometry/strategies/cartesian.hpp index 14ec8b7cd..83c89f00c 100644 --- a/include/boost/geometry/strategies/cartesian.hpp +++ b/include/boost/geometry/strategies/cartesian.hpp @@ -28,7 +28,7 @@ namespace boost { namespace geometry { - + namespace strategies { diff --git a/include/boost/geometry/strategies/cartesian/box_in_box.hpp b/include/boost/geometry/strategies/cartesian/box_in_box.hpp index a0cb6d9d1..91127b13e 100644 --- a/include/boost/geometry/strategies/cartesian/box_in_box.hpp +++ b/include/boost/geometry/strategies/cartesian/box_in_box.hpp @@ -113,7 +113,7 @@ struct box_longitude_range // min <= max <=> diff >= 0 calc_t const diff_ed = bed_max - bed_min; calc_t const diff_ing = bing_max - bing_min; - + // if containing covers the whole globe it contains all if (diff_ing >= constants::period()) { @@ -150,7 +150,7 @@ struct relate_box_box_loop static inline bool apply(Box1 const& b_contained, Box2 const& b_containing) { assert_dimension_equal(); - + if (! SubStrategy::apply( get(b_contained), get(b_contained), diff --git a/include/boost/geometry/strategies/cartesian/centroid_average.hpp b/include/boost/geometry/strategies/cartesian/centroid_average.hpp index 573b7f6e7..103a1d8ab 100644 --- a/include/boost/geometry/strategies/cartesian/centroid_average.hpp +++ b/include/boost/geometry/strategies/cartesian/centroid_average.hpp @@ -72,7 +72,7 @@ public : struct state_type { typedef sum type; - }; + }; template static inline void apply(GeometryPoint const& p, diff --git a/include/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp b/include/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp index b3541c879..5ead8add9 100644 --- a/include/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp +++ b/include/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp @@ -129,7 +129,7 @@ public: assert_dimension_equal(); using calculation_type = typename calculation_type::type; - + return detail::compute_closest_point_to_segment::apply(p, p1, p2); } diff --git a/include/boost/geometry/strategies/cartesian/densify.hpp b/include/boost/geometry/strategies/cartesian/densify.hpp index 0a897bad9..a6bc0a793 100644 --- a/include/boost/geometry/strategies/cartesian/densify.hpp +++ b/include/boost/geometry/strategies/cartesian/densify.hpp @@ -61,7 +61,7 @@ public: >::type calc_t; typedef model::point::value, cs::cartesian> calc_point_t; - + assert_dimension_equal(); calc_point_t cp0, dir01; @@ -89,7 +89,7 @@ public: for (signed_size_type i = 0 ; i < n ; ++i) { out_point_t out; - + calc_t const num = calc_t(i + 1); geometry::detail::for_each_dimension([&](auto index) { diff --git a/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp b/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp index 37ae77f2b..d903f2100 100644 --- a/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp +++ b/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp @@ -162,7 +162,7 @@ struct disjoint_segment_box_impl < RelativeDistance, SegmentPoint, - Box, + Box, I + 1, Dimension >::apply(p0, p1, box, t_min, t_max); diff --git a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp index 4f7c88334..e3396494a 100644 --- a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp @@ -104,7 +104,7 @@ public: assert_dimension_equal(); typedef typename calculation_type::type calculation_type; - + auto closest_point = closest_points::detail::compute_closest_point_to_segment ::apply(p, p1, p2); diff --git a/include/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp b/include/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp index 85ee4b78f..96a4ef027 100644 --- a/include/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp @@ -128,7 +128,7 @@ public : assert_dimension_equal(); typename calculation_type::type result(0); - + detail::compute_pythagoras_box_box < dimension::value 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 d5f62c9ef..719569d55 100644 --- a/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp @@ -123,7 +123,7 @@ public : assert_dimension_equal(); typename calculation_type::type result(0); - + detail::compute_pythagoras_point_box < dimension::value diff --git a/include/boost/geometry/strategies/cartesian/intersection.hpp b/include/boost/geometry/strategies/cartesian/intersection.hpp index 605163a36..ba853af58 100644 --- a/include/boost/geometry/strategies/cartesian/intersection.hpp +++ b/include/boost/geometry/strategies/cartesian/intersection.hpp @@ -452,7 +452,7 @@ struct cartesian_segments sides.set<1>(side_strategy_type::apply(p1, p2, q1), side_strategy_type::apply(p1, p2, q2)); - + if (sides.same<1>()) { // Both points are at same side of other segment, we can leave @@ -670,7 +670,7 @@ private: int const a2_wrt_b = position_value(oa_2, ob_1, ob_2); int const b1_wrt_a = position_value(ob_1, oa_1, oa_2); int const b2_wrt_a = position_value(ob_2, oa_1, oa_2); - + // fix the ratios if necessary // CONSIDER: fixing ratios also in other cases, if they're inconsistent // e.g. if ratio == 1 or 0 (so IP at the endpoint) @@ -687,7 +687,7 @@ private: { ra_from.assign(1, 1); rb_to.assign(0, 1); - } + } if (a2_wrt_b == 1) { diff --git a/include/boost/geometry/strategies/closest_points/geographic.hpp b/include/boost/geometry/strategies/closest_points/geographic.hpp index d950a951c..7a20a7a50 100644 --- a/include/boost/geometry/strategies/closest_points/geographic.hpp +++ b/include/boost/geometry/strategies/closest_points/geographic.hpp @@ -39,7 +39,7 @@ class geographic using base_t = strategies::distance::geographic; public: - + geographic() = default; explicit geographic(Spheroid const& spheroid) @@ -52,8 +52,8 @@ public: { return strategy::closest_points::geographic_cross_track < - FormulaPolicy, - Spheroid, + FormulaPolicy, + Spheroid, CalculationType >(base_t::m_spheroid); } diff --git a/include/boost/geometry/strategies/closest_points/spherical.hpp b/include/boost/geometry/strategies/closest_points/spherical.hpp index 18beb1c0c..d2846c722 100644 --- a/include/boost/geometry/strategies/closest_points/spherical.hpp +++ b/include/boost/geometry/strategies/closest_points/spherical.hpp @@ -60,9 +60,9 @@ namespace services template struct default_strategy < - Geometry1, - Geometry2, - spherical_equatorial_tag, + Geometry1, + Geometry2, + spherical_equatorial_tag, spherical_equatorial_tag > { diff --git a/include/boost/geometry/strategies/comparable_distance_result.hpp b/include/boost/geometry/strategies/comparable_distance_result.hpp index f84e5c728..42a6b211a 100644 --- a/include/boost/geometry/strategies/comparable_distance_result.hpp +++ b/include/boost/geometry/strategies/comparable_distance_result.hpp @@ -72,7 +72,7 @@ struct comparable_distance_strategy_type : comparable_distance_strategy_type {}; - + template struct comparable_distance_result : strategy::distance::services::return_type diff --git a/include/boost/geometry/strategies/distance/backward_compatibility.hpp b/include/boost/geometry/strategies/distance/backward_compatibility.hpp index b5b627fc9..0af5f3ec2 100644 --- a/include/boost/geometry/strategies/distance/backward_compatibility.hpp +++ b/include/boost/geometry/strategies/distance/backward_compatibility.hpp @@ -22,7 +22,7 @@ namespace boost { namespace geometry { namespace strategies { namespace distance -{ +{ #ifndef DOXYGEN_NO_DETAIL namespace detail diff --git a/include/boost/geometry/strategies/distance/comparable.hpp b/include/boost/geometry/strategies/distance/comparable.hpp index 3a6d8300b..07d219b8a 100644 --- a/include/boost/geometry/strategies/distance/comparable.hpp +++ b/include/boost/geometry/strategies/distance/comparable.hpp @@ -21,7 +21,7 @@ namespace boost { namespace geometry { namespace strategies { namespace distance -{ +{ #ifndef DOXYGEN_NO_DETAIL namespace detail diff --git a/include/boost/geometry/strategies/geographic.hpp b/include/boost/geometry/strategies/geographic.hpp index 11cebf46b..435ba29b2 100644 --- a/include/boost/geometry/strategies/geographic.hpp +++ b/include/boost/geometry/strategies/geographic.hpp @@ -28,7 +28,7 @@ namespace boost { namespace geometry { - + namespace strategies { diff --git a/include/boost/geometry/strategies/geographic/closest_points_pt_seg.hpp b/include/boost/geometry/strategies/geographic/closest_points_pt_seg.hpp index b932e4c4a..54a5c8832 100644 --- a/include/boost/geometry/strategies/geographic/closest_points_pt_seg.hpp +++ b/include/boost/geometry/strategies/geographic/closest_points_pt_seg.hpp @@ -85,7 +85,7 @@ class geographic_cross_track false, true >; - + template struct calculation_type : promote_floating_point @@ -120,7 +120,7 @@ public : dimension::value, typename coordinate_system::type > cp; - + geometry::set_from_radian<0>(cp, result.lon); geometry::set_from_radian<1>(cp, result.lat); diff --git a/include/boost/geometry/strategies/geographic/disjoint_segment_box.hpp b/include/boost/geometry/strategies/geographic/disjoint_segment_box.hpp index 2e06049aa..d7ea122a3 100644 --- a/include/boost/geometry/strategies/geographic/disjoint_segment_box.hpp +++ b/include/boost/geometry/strategies/geographic/disjoint_segment_box.hpp @@ -67,7 +67,7 @@ public: {} typedef covered_by::spherical_point_box disjoint_point_box_strategy_type; - + static inline disjoint_point_box_strategy_type get_disjoint_point_box_strategy() { return disjoint_point_box_strategy_type(); diff --git a/include/boost/geometry/strategies/geographic/intersection.hpp b/include/boost/geometry/strategies/geographic/intersection.hpp index 179ac6636..e6a94a15e 100644 --- a/include/boost/geometry/strategies/geographic/intersection.hpp +++ b/include/boost/geometry/strategies/geographic/intersection.hpp @@ -215,7 +215,7 @@ private: : Policy::disjoint() ; } - + calc_t const a1_lon = get_as_radian<0>(a1); calc_t const a1_lat = get_as_radian<1>(a1); calc_t const a2_lon = get_as_radian<0>(a2); @@ -315,7 +315,7 @@ private: // NOTE: at this point the segments may still be disjoint // NOTE: at this point one of the segments may be degenerated - bool collinear = sides.collinear(); + bool collinear = sides.collinear(); if (! collinear) { @@ -525,7 +525,7 @@ private: // distance for ratio dist_1_o = dist_1_2 - dist_1_o; } - + return Policy::one_degenerate(segment, segment_ratio(dist_1_o, dist_1_2), degenerated_a); } @@ -764,7 +764,7 @@ private: { return false; } - + typedef typename FormulaPolicy::template inverse inverse_dist; ip_flag = ipi_inters; @@ -801,7 +801,7 @@ private: dist_a1_ip = res_a1_a2.distance; dist_b1_ip = inverse_dist::apply(b1_lon, b1_lat, lon, lat, spheroid).distance; // for consistency ip_flag = ipi_at_a2; - } + } return true; } diff --git a/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp b/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp index fce973525..c7aaf8aa8 100644 --- a/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp +++ b/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp @@ -167,7 +167,7 @@ struct experimental_elliptic_segments_calc_policy Point3d const v1 = normalized_vec(p1); Point3d const v2 = normalized_vec(p2); - + is_forward = dot_product(normal, cross_product(v1, v2)) >= c0; return dot_product(v1, v2); } diff --git a/include/boost/geometry/strategies/index/services.hpp b/include/boost/geometry/strategies/index/services.hpp index f256a3ac3..635a8523d 100644 --- a/include/boost/geometry/strategies/index/services.hpp +++ b/include/boost/geometry/strategies/index/services.hpp @@ -17,7 +17,7 @@ namespace boost { namespace geometry { - + namespace strategies { namespace index { namespace services { diff --git a/include/boost/geometry/strategies/spherical.hpp b/include/boost/geometry/strategies/spherical.hpp index f7d6484b2..0fed07e5b 100644 --- a/include/boost/geometry/strategies/spherical.hpp +++ b/include/boost/geometry/strategies/spherical.hpp @@ -28,7 +28,7 @@ namespace boost { namespace geometry { - + namespace strategies { diff --git a/include/boost/geometry/strategies/spherical/closest_points_pt_seg.hpp b/include/boost/geometry/strategies/spherical/closest_points_pt_seg.hpp index c4c914396..aff36314d 100644 --- a/include/boost/geometry/strategies/spherical/closest_points_pt_seg.hpp +++ b/include/boost/geometry/strategies/spherical/closest_points_pt_seg.hpp @@ -79,12 +79,12 @@ public: {} template - inline auto apply(Point const& p, - PointOfSegment const& sp1, + inline auto apply(Point const& p, + PointOfSegment const& sp1, PointOfSegment const& sp2) const { using CT = typename calculation_type::type; - + // http://williams.best.vwh.net/avform.htm#XTE CT d3 = m_strategy.apply(sp1, sp2); @@ -143,12 +143,12 @@ public: CT dist = CT(2) * asin(math::sqrt(distance)) * m_strategy.radius(); CT dist_d1 = CT(2) * asin(math::sqrt(d1)) * m_strategy.radius(); - + // Note: this is similar to spherical computation in geographic // point_segment_distance formula CT earth_radius = m_strategy.radius(); CT cos_frac = cos(dist_d1 / earth_radius) / cos(dist / earth_radius); - CT s14_sph = cos_frac >= 1 + CT s14_sph = cos_frac >= 1 ? CT(0) : cos_frac <= -1 ? math::pi() * earth_radius : acos(cos_frac) * earth_radius; @@ -165,7 +165,7 @@ public: dimension::value, typename coordinate_system::type > cp; - + geometry::set_from_radian<0>(cp, res_direct.lon2); geometry::set_from_radian<1>(cp, res_direct.lat2); diff --git a/include/boost/geometry/strategies/spherical/compare.hpp b/include/boost/geometry/strategies/spherical/compare.hpp index dc804acc0..4703ee504 100644 --- a/include/boost/geometry/strategies/spherical/compare.hpp +++ b/include/boost/geometry/strategies/spherical/compare.hpp @@ -165,7 +165,7 @@ struct spherical_longitude bool is_left_at_antimeridian = false; bool is_right_at_antimeridian = false; - + // longitudes equal if (math::equals(l0, r0) // both at antimeridian diff --git a/include/boost/geometry/strategies/spherical/distance_cross_track.hpp b/include/boost/geometry/strategies/spherical/distance_cross_track.hpp index 7fad3092f..d9af40988 100644 --- a/include/boost/geometry/strategies/spherical/distance_cross_track.hpp +++ b/include/boost/geometry/strategies/spherical/distance_cross_track.hpp @@ -57,10 +57,10 @@ namespace detail struct compute_cross_track_pair { template - static inline auto apply(Point const& p, - PointOfSegment const& sp1, + static inline auto apply(Point const& p, + PointOfSegment const& sp1, PointOfSegment const& sp2) - { + { CalculationType lon1 = geometry::get_as_radian<0>(sp1); CalculationType lat1 = geometry::get_as_radian<1>(sp1); CalculationType lon2 = geometry::get_as_radian<0>(sp2); @@ -70,23 +70,23 @@ namespace detail CalculationType const crs_AD = geometry::formula::spherical_azimuth < - CalculationType, + CalculationType, false >(lon1, lat1, lon, lat).azimuth; auto result = geometry::formula::spherical_azimuth < - CalculationType, + CalculationType, true >(lon1, lat1, lon2, lat2); CalculationType crs_AB = result.azimuth; - CalculationType crs_BA = result.reverse_azimuth - + CalculationType crs_BA = result.reverse_azimuth - geometry::math::pi(); CalculationType crs_BD = geometry::formula::spherical_azimuth < - CalculationType, + CalculationType, false >(lon2, lat2, lon, lat).azimuth; @@ -100,20 +100,20 @@ namespace detail struct compute_cross_track_distance { template - static inline auto apply(CalculationType const& d_crs1, + static inline auto apply(CalculationType const& d_crs1, CalculationType const& d1) - { + { CalculationType const half(0.5); CalculationType const quarter(0.25); CalculationType sin_d_crs1 = sin(d_crs1); /* This is the straightforward obvious way to continue: - + return_type discriminant = 1.0 - 4.0 * (d1 - d1 * d1) * sin_d_crs1 * sin_d_crs1; return 0.5 - 0.5 * math::sqrt(discriminant); - + Below we optimize the number of arithmetic operations and account for numerical robustness: */ @@ -123,7 +123,7 @@ namespace detail } }; -} +} #endif // DOXYGEN_NO_DETAIL @@ -235,7 +235,7 @@ namespace comparable The distance d1 needed when the projection of the point D is within the segment must be the true distance. However, comparable::haversine<> returns a comparable distance instead of the one needed. - To remedy this, we implicitly compute what is needed. + To remedy this, we implicitly compute what is needed. More precisely, we need to compute sin(true_d1): sin(true_d1) = sin(2 * asin(sqrt(d1))) @@ -549,7 +549,7 @@ template class cross_track { public : - + template struct return_type : promote_floating_point @@ -582,8 +582,8 @@ public : template - inline auto apply(Point const& p, - PointOfSegment const& sp1, + inline auto apply(Point const& p, + PointOfSegment const& sp1, PointOfSegment const& sp2) const { diff --git a/include/boost/geometry/strategies/spherical/intersection.hpp b/include/boost/geometry/strategies/spherical/intersection.hpp index 12995b828..fdd44c5d1 100644 --- a/include/boost/geometry/strategies/spherical/intersection.hpp +++ b/include/boost/geometry/strategies/spherical/intersection.hpp @@ -197,7 +197,7 @@ struct ecef_segments vec3d_t const a2v = calc_policy.template to_cart3d(a2); vec3d_t const b1v = calc_policy.template to_cart3d(b1); vec3d_t const b2v = calc_policy.template to_cart3d(b2); - + bool degen_neq_coords = false; side_info sides; @@ -286,7 +286,7 @@ struct ecef_segments // NOTE: at this point the segments may still be disjoint // NOTE: at this point one of the segments may be degenerated - bool collinear = sides.collinear(); + bool collinear = sides.collinear(); if (! collinear) { @@ -324,7 +324,7 @@ struct ecef_segments sides.set<0>(0, 0); sides.set<1>(0, 0); } - + if (collinear) { if (a_is_point) @@ -360,7 +360,7 @@ struct ecef_segments segment_ratio ra_to(dist_b1_a2, dist_b1_b2); segment_ratio rb_from(dist_a1_b1, dist_a1_a2); segment_ratio rb_to(dist_a1_b2, dist_a1_a2); - + // NOTE: this is probably not needed int const a1_wrt_b = position_value(c0, dist_a1_b1, dist_a1_b2); int const a2_wrt_b = position_value(dist_a1_a2, dist_a1_b1, dist_a1_b2); @@ -526,7 +526,7 @@ private: { Vec3d ip1, ip2; calc_policy.intersection_points(plane1, plane2, ip1, ip2); - + calculate_dist(a1v, a2v, plane1, ip1, dist_a1_ip); ip = ip1; @@ -572,7 +572,7 @@ private: ip_flag = ipi_at_a1; return true; } - + if (is_near_b2 && equals_point_point(a1, b2)) { dist_a1_ip = 0; @@ -848,7 +848,7 @@ struct spherical_segments_calc_policy }); return true; - } + } }; diff --git a/include/boost/geometry/strategies/spherical/point_in_point.hpp b/include/boost/geometry/strategies/spherical/point_in_point.hpp index dc25d0d59..242c22010 100644 --- a/include/boost/geometry/strategies/spherical/point_in_point.hpp +++ b/include/boost/geometry/strategies/spherical/point_in_point.hpp @@ -72,7 +72,7 @@ private: helper_point_type1 point1_normalized; strategy::normalize::spherical_point::apply(point1, point1_normalized); - helper_point_type2 point2_normalized; + helper_point_type2 point2_normalized; strategy::normalize::spherical_point::apply(point2, point2_normalized); return point_point_generic diff --git a/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp b/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp index c475105d7..d326b6ecd 100644 --- a/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp +++ b/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp @@ -77,7 +77,7 @@ class spherical_winding_base { return 0; } - + if (m_raw_count != 0 && m_raw_count_anti != 0) { if (m_raw_count > 0) // right, wrap around south pole @@ -175,7 +175,7 @@ public: : 1); // going right all points will be on left side } } - + if (side == 0) { // Point is lying on segment @@ -264,7 +264,7 @@ protected: // it doesn't matter what lon it is if it's a pole // so e.g. if one of the segment endpoints is a pole // then only the other lon matters - + bool eq1_strict = longitudes_equal(s1_lon, p_lon); bool eq2_strict = longitudes_equal(s2_lon, p_lon); bool eq1_anti = false; @@ -292,7 +292,7 @@ protected: eq1 = eq2 = true; } } - + // Both equal p -> segment vertical // The only thing which has to be done is check if point is ON segment if (eq1 && eq2) @@ -368,7 +368,7 @@ protected: calc_t const s2 = get<0>(seg2); calc_t const s1_p = math::longitude_distance_signed(s1, p); - + if (s_antipodal) { return count_info(s1_p < c0 ? -2 : 2, false); // choose W/E @@ -388,7 +388,7 @@ protected: { return count_info(s1_s2 < c0 ? -2 : 2, false); // choose W/E } - + calc_t const s1_p_anti = math::longitude_distance_signed(s1, p + pi); // Anti-Point between s1 and s2 diff --git a/include/boost/geometry/strategies/transform/srs_transformer.hpp b/include/boost/geometry/strategies/transform/srs_transformer.hpp index e1815e236..8baeed886 100644 --- a/include/boost/geometry/strategies/transform/srs_transformer.hpp +++ b/include/boost/geometry/strategies/transform/srs_transformer.hpp @@ -16,7 +16,7 @@ namespace boost { namespace geometry { - + namespace strategy { namespace transform { diff --git a/include/boost/geometry/strategy/cartesian/area.hpp b/include/boost/geometry/strategy/cartesian/area.hpp index f17453fac..a18a4f85e 100644 --- a/include/boost/geometry/strategy/cartesian/area.hpp +++ b/include/boost/geometry/strategy/cartesian/area.hpp @@ -62,7 +62,7 @@ public : CalculationType > {}; - + template class state { @@ -70,7 +70,7 @@ public : typedef typename result_type::type return_type; - public: + public: inline state() : sum(0) { diff --git a/include/boost/geometry/strategy/cartesian/area_box.hpp b/include/boost/geometry/strategy/cartesian/area_box.hpp index d41b412c6..1263b564d 100644 --- a/include/boost/geometry/strategy/cartesian/area_box.hpp +++ b/include/boost/geometry/strategy/cartesian/area_box.hpp @@ -36,7 +36,7 @@ public: CalculationType > {}; - + template static inline auto apply(Box const& box) { diff --git a/include/boost/geometry/strategy/cartesian/envelope_segment.hpp b/include/boost/geometry/strategy/cartesian/envelope_segment.hpp index 08fbc0921..75124bcbd 100644 --- a/include/boost/geometry/strategy/cartesian/envelope_segment.hpp +++ b/include/boost/geometry/strategy/cartesian/envelope_segment.hpp @@ -65,7 +65,7 @@ public: < 0, dimension::value - >::apply(point1, point2, box); + >::apply(point1, point2, box); } }; diff --git a/include/boost/geometry/strategy/geographic/area_box.hpp b/include/boost/geometry/strategy/geographic/area_box.hpp index 6c0943e09..0a3fa6f80 100644 --- a/include/boost/geometry/strategy/geographic/area_box.hpp +++ b/include/boost/geometry/strategy/geographic/area_box.hpp @@ -77,14 +77,14 @@ public: explicit geographic_box(Spheroid const& spheroid) : m_spheroid(spheroid) {} - + template inline auto apply(Box const& box) const { typedef typename result_type::type return_type; return_type const c0 = 0; - + return_type x_min = get_as_radian(box); // lon return_type y_min = get_as_radian(box); // lat return_type x_max = get_as_radian(box); diff --git a/include/boost/geometry/strategy/relate.hpp b/include/boost/geometry/strategy/relate.hpp index 6f9967082..fa523d846 100644 --- a/include/boost/geometry/strategy/relate.hpp +++ b/include/boost/geometry/strategy/relate.hpp @@ -80,7 +80,7 @@ struct default_strategy } // namespace point_in_geometry - + namespace relate { diff --git a/include/boost/geometry/strategy/spherical/area_box.hpp b/include/boost/geometry/strategy/spherical/area_box.hpp index 8ee29a778..196dc3d8b 100644 --- a/include/boost/geometry/strategy/spherical/area_box.hpp +++ b/include/boost/geometry/strategy/spherical/area_box.hpp @@ -73,7 +73,7 @@ public: RadiusOrSphere >::apply(radius_or_sphere)) {} - + template inline auto apply(Box const& box) const { diff --git a/include/boost/geometry/strategy/spherical/envelope_range.hpp b/include/boost/geometry/strategy/spherical/envelope_range.hpp index de69e1b64..8833bd8ea 100644 --- a/include/boost/geometry/strategy/spherical/envelope_range.hpp +++ b/include/boost/geometry/strategy/spherical/envelope_range.hpp @@ -188,9 +188,9 @@ inline void spheroidal_ring(Range const& range, Box& mbr, geometry::detail::closed_view closed_range(range); spheroidal_linestring(closed_range, mbr, envelope_strategy, expand_strategy); - + using coord_t = typename geometry::coordinate_type::type; - using point_t = typename geometry::point_type::type; + using point_t = typename geometry::point_type::type; using units_t = typename geometry::detail::cs_angular_units::type; using constants_t = math::detail::constants_on_spheroid; coord_t const two_pi = constants_t::period(); diff --git a/include/boost/geometry/strategy/spherical/expand_box.hpp b/include/boost/geometry/strategy/spherical/expand_box.hpp index 67564e15a..9400f0cc4 100644 --- a/include/boost/geometry/strategy/spherical/expand_box.hpp +++ b/include/boost/geometry/strategy/spherical/expand_box.hpp @@ -86,7 +86,7 @@ struct envelope_box_on_spheroid // BoxIn can be non-mutable typename helper_geometry::type box_in_normalized; geometry::convert(box_in, box_in_normalized); - + if (! is_inverse_spheroidal_coordinates(box_in)) { strategy::normalize::spherical_box::apply(box_in, box_in_normalized); diff --git a/include/boost/geometry/util/combine_if.hpp b/include/boost/geometry/util/combine_if.hpp index 62489dcf7..7b00864a3 100644 --- a/include/boost/geometry/util/combine_if.hpp +++ b/include/boost/geometry/util/combine_if.hpp @@ -51,9 +51,9 @@ namespace util pair, boost::mpl::int_<1> >, pair, boost::mpl::int_<0> >, pair, boost::mpl::int_<1> >, - pair, boost::mpl::int_<0> > + pair, boost::mpl::int_<0> > > result_types; - + BOOST_MPL_ASSERT(( boost::mpl::equal )); \endcode */ diff --git a/include/boost/geometry/util/has_infinite_coordinate.hpp b/include/boost/geometry/util/has_infinite_coordinate.hpp index 87a65c024..22113e89d 100644 --- a/include/boost/geometry/util/has_infinite_coordinate.hpp +++ b/include/boost/geometry/util/has_infinite_coordinate.hpp @@ -20,7 +20,7 @@ namespace boost { namespace geometry { - + #ifndef DOXYGEN_NO_DETAIL namespace detail { diff --git a/include/boost/geometry/util/has_nan_coordinate.hpp b/include/boost/geometry/util/has_nan_coordinate.hpp index 6ae111f1b..d3fc9f195 100644 --- a/include/boost/geometry/util/has_nan_coordinate.hpp +++ b/include/boost/geometry/util/has_nan_coordinate.hpp @@ -24,7 +24,7 @@ namespace boost { namespace geometry { - + #ifndef DOXYGEN_NO_DETAIL namespace detail { diff --git a/include/boost/geometry/util/has_non_finite_coordinate.hpp b/include/boost/geometry/util/has_non_finite_coordinate.hpp index 96c19dc18..df6990a15 100644 --- a/include/boost/geometry/util/has_non_finite_coordinate.hpp +++ b/include/boost/geometry/util/has_non_finite_coordinate.hpp @@ -20,7 +20,7 @@ namespace boost { namespace geometry { - + #ifndef DOXYGEN_NO_DETAIL namespace detail { diff --git a/include/boost/geometry/util/normalize_spheroidal_box_coordinates.hpp b/include/boost/geometry/util/normalize_spheroidal_box_coordinates.hpp index 6eeb17efa..9658b8bbe 100644 --- a/include/boost/geometry/util/normalize_spheroidal_box_coordinates.hpp +++ b/include/boost/geometry/util/normalize_spheroidal_box_coordinates.hpp @@ -19,7 +19,7 @@ namespace boost { namespace geometry { -namespace math +namespace math { #ifndef DOXYGEN_NO_DETAIL diff --git a/include/boost/geometry/util/normalize_spheroidal_coordinates.hpp b/include/boost/geometry/util/normalize_spheroidal_coordinates.hpp index 6fda8dee0..074acc8a2 100644 --- a/include/boost/geometry/util/normalize_spheroidal_coordinates.hpp +++ b/include/boost/geometry/util/normalize_spheroidal_coordinates.hpp @@ -22,7 +22,7 @@ namespace boost { namespace geometry { -namespace math +namespace math { #ifndef DOXYGEN_NO_DETAIL @@ -225,14 +225,14 @@ protected: { return math::mod(value + constants::half_period(), constants::period()) - - constants::half_period(); + - constants::half_period(); } static inline CoordinateType normalize_down(CoordinateType const& value) { return math::mod(value - constants::half_period(), constants::period()) - + constants::half_period(); + + constants::half_period(); } public: @@ -495,7 +495,7 @@ inline CoordinateType longitude_interval_distance_signed(CoordinateType const& l dist_a12 = -dist_a12; dist_a1b = -dist_a1b; } - + return dist_a1b < c0 ? dist_a1b : dist_a1b > dist_a12 ? dist_a1b - dist_a12 : c0; diff --git a/include/boost/geometry/util/parameter_type_of.hpp b/include/boost/geometry/util/parameter_type_of.hpp index 1c1754eb1..6c2209ad8 100644 --- a/include/boost/geometry/util/parameter_type_of.hpp +++ b/include/boost/geometry/util/parameter_type_of.hpp @@ -58,7 +58,7 @@ struct parameter_type_of < int, (base_index_type::value + Index) - > + > > indexed_type; typedef typename std::remove_reference diff --git a/include/boost/geometry/util/promote_integral.hpp b/include/boost/geometry/util/promote_integral.hpp index 59397257e..0566f4214 100644 --- a/include/boost/geometry/util/promote_integral.hpp +++ b/include/boost/geometry/util/promote_integral.hpp @@ -278,7 +278,7 @@ public: < T, min_bit_size_type::value, - integral_types + integral_types >::type type; }; diff --git a/include/boost/geometry/util/range.hpp b/include/boost/geometry/util/range.hpp index 445636dd0..a25ac102e 100644 --- a/include/boost/geometry/util/range.hpp +++ b/include/boost/geometry/util/range.hpp @@ -327,7 +327,7 @@ erase(Range && rng, std::size_t const count = static_cast(diff); BOOST_GEOMETRY_ASSERT(count <= boost::size(rng)); - + if ( count > 0 ) { typename boost::range_difference::type const diff --git a/include/boost/geometry/util/sequence.hpp b/include/boost/geometry/util/sequence.hpp index 2f8e7b51b..3f643ef6c 100644 --- a/include/boost/geometry/util/sequence.hpp +++ b/include/boost/geometry/util/sequence.hpp @@ -270,7 +270,7 @@ struct pack_min_element template < typename Sequence, - template class LessPred + template class LessPred > struct sequence_min_element; diff --git a/include/boost/geometry/views/detail/boundary_view/implementation.hpp b/include/boost/geometry/views/detail/boundary_view/implementation.hpp index f3c3ece7a..8a17b760c 100644 --- a/include/boost/geometry/views/detail/boundary_view/implementation.hpp +++ b/include/boost/geometry/views/detail/boundary_view/implementation.hpp @@ -217,7 +217,7 @@ private: public: typedef typename base_type::iterator iterator; typedef typename base_type::const_iterator const_iterator; - + typedef linestring_tag tag_type; explicit ring_boundary(Ring& ring) diff --git a/include/boost/geometry/views/detail/closed_clockwise_view.hpp b/include/boost/geometry/views/detail/closed_clockwise_view.hpp index e74487a83..071f85f5d 100644 --- a/include/boost/geometry/views/detail/closed_clockwise_view.hpp +++ b/include/boost/geometry/views/detail/closed_clockwise_view.hpp @@ -47,7 +47,7 @@ struct closed_clockwise_view { using closed_view = detail::closed_view; using view = detail::clockwise_view; - + explicit inline closed_clockwise_view(Range const& r) : m_view(closed_view(r)) {} diff --git a/index/example/Jamfile b/index/example/Jamfile index 5cfa81a0c..3c7b5b2cd 100644 --- a/index/example/Jamfile +++ b/index/example/Jamfile @@ -10,7 +10,7 @@ # Build as optimised for proper benchmarking: # b2 variant=release threading=multi # b2 variant=release threading=multi link=static runtime-link=static -# +# # Set GLUT_ROOT to installation prefix of GLUT or, for Windows, # it may be all-in-one directory with GLUT header and binaries. @@ -31,10 +31,10 @@ if $(GLUT_ROOT) } lib glut - : + : : $(glut_name) - $(GLUT_ROOT) + $(GLUT_ROOT) $(GLUT_ROOT)/lib : : diff --git a/index/example/benchmark3.cpp b/index/example/benchmark3.cpp index ad1910e45..5ddd78bdf 100644 --- a/index/example/benchmark3.cpp +++ b/index/example/benchmark3.cpp @@ -68,7 +68,7 @@ int main() { P p(coords[i].first, coords[i].second); rtl.insert(p); - } + } dur_t time = clock_t::now() - start; std::cout << time.count() << ' '; diff --git a/index/example/benchmark_experimental.cpp b/index/example/benchmark_experimental.cpp index 6556d7662..b7af02e40 100644 --- a/index/example/benchmark_experimental.cpp +++ b/index/example/benchmark_experimental.cpp @@ -162,7 +162,7 @@ int main() std::cout << time << " - query(B) " << queries_count << " found " << temp << '\n'; } } - + RT t; // inserting test @@ -176,7 +176,7 @@ int main() << (bgi::detail::rtree::utilities::are_boxes_ok(t) ? " ok\n" : "NOK\n"); } - + { clock_t::time_point start = clock_t::now(); @@ -402,7 +402,7 @@ int main() { LS ls; ls.resize(6); - + clock_t::time_point start = clock_t::now(); size_t temp = 0; for (size_t i = 0 ; i < path_queries_count ; ++i ) @@ -414,7 +414,7 @@ int main() float foo = i*max_val/300; ls[2*i] = P(x, y+foo); ls[2*i+1] = P(x+max_val/100, y+foo); - } + } result.clear(); t.query(bgi::path(ls, path_values_count), std::back_inserter(result)); temp += result.size(); @@ -466,7 +466,7 @@ int main() { float x = coords[i].first; float y = coords[i].second; - + t.remove(generate_value::apply(x, y)); } dur_t time = clock_t::now() - start; diff --git a/index/example/glut_vis.cpp b/index/example/glut_vis.cpp index 2c5f5740b..8370517a4 100644 --- a/index/example/glut_vis.cpp +++ b/index/example/glut_vis.cpp @@ -177,7 +177,7 @@ struct print_tree_v : boost::static_visitor<> template void operator()(C & c) const { - bgi::detail::rtree::utilities::print(std::cout, c.tree); + bgi::detail::rtree::utilities::print(std::cout, c.tree); } }; template @@ -282,7 +282,7 @@ void query_path() search_path[2 * i] = P(x-w, yy); search_path[2 * i + 1] = P(x+w, yy); } - + found_count = query(cont, bgi::detail::path(search_path, count)); if ( found_count > 0 ) @@ -354,9 +354,9 @@ void query_ring() search_ring.push_back(P(x - 3*w/2, y)); search_ring.push_back(P(x - w, y - h/2)); search_ring.push_back(P(x - w, y - h)); - + found_count = query(cont, Predicate(search_ring)); - + if ( found_count > 0 ) { std::cout << "search ring: "; @@ -474,7 +474,7 @@ void query_multi_poly() search_multi_poly[2].outer().push_back(P(x + 6*w/5, y + 6*h/5)); found_count = query(cont, Predicate(search_multi_poly)); - + if ( found_count > 0 ) { std::cout << "search multi_poly[0] outer: "; @@ -506,7 +506,7 @@ void query_segment() boost::geometry::set<1, 1>(search_segment, y + h); found_count = query(cont, Predicate(search_segment)); - + if ( found_count > 0 ) { std::cout << "search segment: "; @@ -539,7 +539,7 @@ void query_linestring() } found_count = query(cont, Predicate(search_linestring)); - + if ( found_count > 0 ) { std::cout << "search linestring: "; @@ -699,7 +699,7 @@ void draw_ring(Range const& range) // search box glBegin(GL_LINE_LOOP); - + BOOST_FOREACH(P const& p, range) { float x = boost::geometry::get<0>(p); @@ -783,11 +783,11 @@ void resize(int w, int h) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); /*gluLookAt( - 120.0f, 120.0f, 120.0f, + 120.0f, 120.0f, 120.0f, 50.0f, 50.0f, -1.0f, 0.0f, 1.0f, 0.0f);*/ gluLookAt( - 50.0f, 50.0f, 75.0f, + 50.0f, 50.0f, 75.0f, 50.0f, 50.0f, -1.0f, 0.0f, 1.0f, 0.0f); @@ -831,7 +831,7 @@ struct insert_random_value_v : boost::static_visitor<> { V v; rand_val(v); - + boost::geometry::index::insert(c.tree, v); c.values.push_back(v); @@ -1058,7 +1058,7 @@ void keyboard(unsigned char key, int /*x*/, int /*y*/) query_mode = qm_lsi; else if ( current_line == "path" ) query_mode = qm_path; - + search(); glutPostRedisplay(); } diff --git a/index/example/random_test.cpp b/index/example/random_test.cpp index 1c40d1553..08be14ea0 100644 --- a/index/example/random_test.cpp +++ b/index/example/random_test.cpp @@ -73,7 +73,7 @@ int main() std::vector result; result.reserve(100); - + // test std::vector spatial_query_data; size_t spatial_query_index = 0; @@ -86,7 +86,7 @@ int main() float y = coords[i].second; result.clear(); t.query(bgi::intersects(B(P(x - 10, y - 10), P(x + 10, y + 10))), std::back_inserter(result)); - + // test spatial_query_data.push_back(result.size()); found_count += result.size(); diff --git a/index/example/serialize.cpp b/index/example/serialize.cpp index bc50371d5..967ac4826 100644 --- a/index/example/serialize.cpp +++ b/index/example/serialize.cpp @@ -129,7 +129,7 @@ int main() tree = boost::move(tmp); std::cout << "tree rebuilt from vector in: " << t.elapsed() << std::endl; } - + t.restart(); tree.clear(); std::cout << "tree cleared in: " << t.elapsed() << std::endl; diff --git a/index/index.html b/index/index.html index ff0005b2a..0a1f7be00 100644 --- a/index/index.html +++ b/index/index.html @@ -4,10 +4,10 @@ - Automatic redirection failed, click this + Automatic redirection failed, click this link  


Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its affiliates

-

Distributed under the Boost Software License, Version 1.0. (See +

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)

diff --git a/index/test/algorithms/Jamfile b/index/test/algorithms/Jamfile index 1fe75c6fc..181c9479e 100644 --- a/index/test/algorithms/Jamfile +++ b/index/test/algorithms/Jamfile @@ -17,4 +17,4 @@ test-suite boost-geometry-index-algorithms [ run segment_intersection.cpp ] [ run path_intersection.cpp ] ; - + diff --git a/index/test/algorithms/content.cpp b/index/test/algorithms/content.cpp index 9fc00daac..58be240e5 100644 --- a/index/test/algorithms/content.cpp +++ b/index/test/algorithms/content.cpp @@ -42,21 +42,21 @@ int test_main(int, char* []) typedef bg::model::point P3ic; typedef bg::model::point P3fc; typedef bg::model::point P3dc; - + test_content(P2ic(0, 0), 0); test_content(P2fc(0, 0), 0); test_content(P2dc(0, 0), 0); test_content(P3ic(0, 0, 0), 0); test_content(P3fc(0, 0, 0), 0); test_content(P3dc(0, 0, 0), 0); - + test_geometry >("POLYGON((0 1,2 4))", 6.0); test_geometry >("POLYGON((0 1,2 4))", 6.0); test_geometry >("POLYGON((0 1,2 4))", 6.0); test_geometry >("POLYGON((0 1 2,2 4 6))", 24.0); test_geometry >("POLYGON((0 1 2,2 4 6))", 24.0); test_geometry >("POLYGON((0 1 2,2 4 6))", 24.0); - + test_large_integers(); return 0; diff --git a/index/test/algorithms/intersection_content.cpp b/index/test/algorithms/intersection_content.cpp index 8dac3536e..e8c1fa938 100644 --- a/index/test/algorithms/intersection_content.cpp +++ b/index/test/algorithms/intersection_content.cpp @@ -45,7 +45,7 @@ int test_main(int, char* []) typedef bg::model::point P3ic; typedef bg::model::point P3fc; typedef bg::model::point P3dc; - + test_geometry >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 2.0); test_geometry >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 2.0); test_geometry >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 2.0); @@ -55,7 +55,7 @@ int test_main(int, char* []) test_geometry >("POLYGON((0 1,2 4))", "POLYGON((2 1,3 4))", 0.0); test_geometry >("POLYGON((0 1,2 4))", "POLYGON((2 4,3 5))", 0.0); - + test_large_integers(); return 0; diff --git a/index/test/algorithms/is_valid.cpp b/index/test/algorithms/is_valid.cpp index b4a91bb56..41983a47a 100644 --- a/index/test/algorithms/is_valid.cpp +++ b/index/test/algorithms/is_valid.cpp @@ -81,21 +81,21 @@ int test_main(int, char* []) typedef bg::model::point P3ic; typedef bg::model::point P3fc; typedef bg::model::point P3dc; - + test(P2ic(0, 0), true); test(P2fc(0, 0), true); test(P2dc(0, 0), true); test(P3ic(0, 0, 0), true); test(P3fc(0, 0, 0), true); test(P3dc(0, 0, 0), true); - + test_box >("POLYGON((0 1,2 4))", true); test_box >("POLYGON((0 1,2 4))", true); test_box >("POLYGON((0 1,2 4))", true); test_box >("POLYGON((0 1 2,2 4 6))", true); test_box >("POLYGON((0 1 2,2 4 6))", true); test_box >("POLYGON((0 1 2,2 4 6))", true); - + test_large_integers(); return 0; diff --git a/index/test/algorithms/margin.cpp b/index/test/algorithms/margin.cpp index 6c4f5f5bd..8a33699e4 100644 --- a/index/test/algorithms/margin.cpp +++ b/index/test/algorithms/margin.cpp @@ -42,14 +42,14 @@ int test_main(int, char* []) typedef bg::model::point P3ic; typedef bg::model::point P3fc; typedef bg::model::point P3dc; - + test_geometry >("POLYGON((0 1,2 4))", 5); test_geometry >("POLYGON((0 1,2 4))", 5.0); test_geometry >("POLYGON((0 1,2 4))", 5.0); test_geometry >("POLYGON((0 1 2,2 4 6))", 9); test_geometry >("POLYGON((0 1 2,2 4 6))", 9.0); test_geometry >("POLYGON((0 1 2,2 4 6))", 9.0); - + test_large_integers(); // test_empty_input >(); diff --git a/index/test/algorithms/minmaxdist.cpp b/index/test/algorithms/minmaxdist.cpp index b082cc431..ec15685e8 100644 --- a/index/test/algorithms/minmaxdist.cpp +++ b/index/test/algorithms/minmaxdist.cpp @@ -64,7 +64,7 @@ void test_large_integers() std::string const box_li = "POLYGON((1536119 192000, 1872000 528000))"; bg::read_wkt(box_li, int_box); bg::read_wkt(box_li, double_box); - + BOOST_CHECK(bgi::detail::minmaxdist(int_pt, int_box) == bgi::detail::minmaxdist(double_pt, double_box)); } @@ -86,7 +86,7 @@ int test_main(int, char* []) test_indexable >(P3dc(1, 2, 3), "POLYGON((0 1 2,2 4 6))", 14.0); test_indexable >(P2ic(1, 2), "POLYGON((1 2,3 5))", 4.0); - + test_large_integers(); return 0; diff --git a/index/test/algorithms/path_intersection.cpp b/index/test/algorithms/path_intersection.cpp index 9c4901ee8..66c76c4e1 100644 --- a/index/test/algorithms/path_intersection.cpp +++ b/index/test/algorithms/path_intersection.cpp @@ -102,7 +102,7 @@ int test_main(int, char* []) typedef bg::model::linestring L3ic; typedef bg::model::linestring L3fc; typedef bg::model::linestring L3dc; - + // IMPORTANT! For 2-point linestrings comparable distance optimization is enabled! test_geometry, L2ic>("POLYGON((0 1,2 4))", "LINESTRING(0 0, 2 5)", true, 1.0f/5); @@ -115,7 +115,7 @@ int test_main(int, char* []) test_geometry, L2fc>("POLYGON((0 1,2 4))", "LINESTRING(0 0, 1 0, 1 5)", true, 2); test_geometry, L2fc>("POLYGON((0 1,2 4))", "LINESTRING(0 0, 3 0, 3 2, 0 2)", true, 6); test_geometry, L2fc>("POLYGON((0 1,2 4))", "LINESTRING(1 2, 3 3, 0 3)", true, 0); - + test_large_integers(); return 0; diff --git a/index/test/algorithms/segment_intersection.cpp b/index/test/algorithms/segment_intersection.cpp index 8bb8623af..32e1b41a4 100644 --- a/index/test/algorithms/segment_intersection.cpp +++ b/index/test/algorithms/segment_intersection.cpp @@ -80,7 +80,7 @@ int test_main(int, char* []) typedef bg::model::point P3ic; typedef bg::model::point P3fc; typedef bg::model::point P3dc; - + test_geometry, P2ic>("POLYGON((0 1,2 4))", "POINT(0 0)", "POINT(2 5)", true, 1.0f/5); test_geometry, P2fc>("POLYGON((0 1,2 4))", "POINT(0 0)", "POINT(2 5)", true, 1.0f/5); test_geometry, P2dc>("POLYGON((0 1,2 4))", "POINT(0 0)", "POINT(2 5)", true, 1.0/5); @@ -114,7 +114,7 @@ int test_main(int, char* []) test_geometry, P2fc>("POLYGON((0 1,2 4))", "POINT(1 4)", "POINT(1 5)", true, 0.0f); test_geometry, P2fc>("POLYGON((0 1,2 4))", "POINT(0.5 2)", "POINT(1.5 3)", true, 0.0f); - + test_large_integers(); return 0; diff --git a/index/test/algorithms/union_content.cpp b/index/test/algorithms/union_content.cpp index e27f71836..e7fe9ea54 100644 --- a/index/test/algorithms/union_content.cpp +++ b/index/test/algorithms/union_content.cpp @@ -45,7 +45,7 @@ int test_main(int, char* []) typedef bg::model::point P3ic; typedef bg::model::point P3fc; typedef bg::model::point P3dc; - + test_geometry >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 12.0); test_geometry >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 12.0); test_geometry >("POLYGON((0 1,2 4))", "POLYGON((1 2,3 5))", 12.0); @@ -55,7 +55,7 @@ int test_main(int, char* []) test_geometry >("POLYGON((0 1,2 4))", "POLYGON((2 1,3 4))", 9.0); test_geometry >("POLYGON((0 1,2 4))", "POLYGON((2 4,3 5))", 12.0); - + test_large_integers(); return 0; diff --git a/index/test/minmax_heap.cpp b/index/test/minmax_heap.cpp index 4dd3a7d82..a5029f18d 100644 --- a/index/test/minmax_heap.cpp +++ b/index/test/minmax_heap.cpp @@ -219,7 +219,7 @@ void test() { heap.push(i); BOOST_CHECK(heap.is_heap()); - + map[i]++; BOOST_CHECK_EQUAL(heap.top(), map.begin()->first); BOOST_CHECK_EQUAL(heap.bottom(), (--map.end())->first); @@ -245,7 +245,7 @@ void test() { Heap heap(vec); BOOST_CHECK(heap.is_heap()); - + std::map map; for (int i : vec) map[i]++; diff --git a/index/test/movable.hpp b/index/test/movable.hpp index c1dd278e7..cdcb138d3 100644 --- a/index/test/movable.hpp +++ b/index/test/movable.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_GEOMETRY_INDEX_TEST_MOVABLE_HPP #define BOOST_GEOMETRY_INDEX_TEST_MOVABLE_HPP -//[movable_definition +//[movable_definition //header file "movable.hpp" #include @@ -20,17 +20,17 @@ class movable { BOOST_MOVABLE_BUT_NOT_COPYABLE(movable) int value_; - + public: movable() : value_(1){} - + //Move constructor and assignment movable(BOOST_RV_REF(movable) m) { value_ = m.value_; m.value_ = 0; } - + movable & operator=(BOOST_RV_REF(movable) m) { value_ = m.value_; m.value_ = 0; return *this; } - + bool moved() const //Observer { return value_ == 0; } }; @@ -40,26 +40,26 @@ class copy_movable { BOOST_COPYABLE_AND_MOVABLE(copy_movable) size_t value_; - + public: copy_movable(size_t value = 1) : value_(value){} - + //Move constructor and assignment copy_movable(BOOST_RV_REF(copy_movable) m) { value_ = m.value_; m.value_ = 0; } - + copy_movable(const copy_movable &m) { value_ = m.value_; } - + copy_movable & operator=(BOOST_RV_REF(copy_movable) m) { value_ = m.value_; m.value_ = 0; return *this; } - + copy_movable & operator=(BOOST_COPY_ASSIGN_REF(copy_movable) m) { value_ = m.value_; return *this; } - + bool moved() const //Observer { return value_ == 0; } - + bool operator==(const copy_movable& m) const { return value_ == m.value_; } }; diff --git a/index/test/rtree/exceptions/rtree_exceptions_lin.cpp b/index/test/rtree/exceptions/rtree_exceptions_lin.cpp index 74c0ba6d0..47c610e76 100644 --- a/index/test/rtree/exceptions/rtree_exceptions_lin.cpp +++ b/index/test/rtree/exceptions/rtree_exceptions_lin.cpp @@ -13,8 +13,8 @@ int test_main(int, char* []) { test_rtree_value_exceptions< bgi::linear<4, 2> >(); test_rtree_value_exceptions(bgi::dynamic_linear(4, 2)); - + test_rtree_elements_exceptions< bgi::linear_throwing<4, 2> >(); - + return 0; } diff --git a/index/test/rtree/exceptions/test_exceptions.hpp b/index/test/rtree/exceptions/test_exceptions.hpp index df85e217c..540ce7b56 100644 --- a/index/test/rtree/exceptions/test_exceptions.hpp +++ b/index/test/rtree/exceptions/test_exceptions.hpp @@ -131,7 +131,7 @@ void test_rtree_elements_exceptions(Parameters const& parameters = Parameters()) { throwing_varray_settings::reset_calls_counter(); throwing_varray_settings::set_max_calls(10000); - + Tree tree(parameters); throwing_varray_settings::reset_calls_counter(); @@ -154,7 +154,7 @@ void test_rtree_elements_exceptions(Parameters const& parameters = Parameters()) BOOST_CHECK_EQUAL(throwing_nodes_stats::internal_nodes_count(), 0u); BOOST_CHECK_EQUAL(throwing_nodes_stats::leafs_count(), 0u); } - + for ( size_t i = 0 ; i < 50 ; i += 2 ) { throwing_varray_settings::reset_calls_counter(); @@ -171,7 +171,7 @@ void test_rtree_elements_exceptions(Parameters const& parameters = Parameters()) BOOST_CHECK(bgi::detail::rtree::utilities::are_counts_ok(tree, false)); } - + for ( size_t i = 0 ; i < 50 ; i += 2 ) { throwing_varray_settings::reset_calls_counter(); diff --git a/index/test/rtree/interprocess/Jamfile b/index/test/rtree/interprocess/Jamfile index 0933eae08..23008aa61 100644 --- a/index/test/rtree/interprocess/Jamfile +++ b/index/test/rtree/interprocess/Jamfile @@ -20,7 +20,7 @@ rule test_all acc-pa_risc:-lrt hpux,gcc:"-Wl,+as,mpas" # gcc-mingw:"-lole32 -loleaut32 -lpsapi -ladvapi32" - gcc,windows:"-lole32 -loleaut32 -lpsapi -ladvapi32" + gcc,windows:"-lole32 -loleaut32 -lpsapi -ladvapi32" windows,clang:"-lole32 -loleaut32 -lpsapi -ladvapi32" msvc:/bigobj windows,intel:/bigobj diff --git a/index/test/rtree/interprocess/rtree_interprocess_quadratic.cpp b/index/test/rtree/interprocess/rtree_interprocess_quadratic.cpp index b4630a172..7201afaf4 100644 --- a/index/test/rtree/interprocess/rtree_interprocess_quadratic.cpp +++ b/index/test/rtree/interprocess/rtree_interprocess_quadratic.cpp @@ -14,6 +14,6 @@ int test_main(int, char* []) typedef bg::model::point P2f; testset::interprocess::modifiers_and_additional(bgi::quadratic<32, 8>()); - + return 0; } diff --git a/index/test/rtree/interprocess/rtree_interprocess_quadratic_dyn.cpp b/index/test/rtree/interprocess/rtree_interprocess_quadratic_dyn.cpp index cf935b377..2f2555f73 100644 --- a/index/test/rtree/interprocess/rtree_interprocess_quadratic_dyn.cpp +++ b/index/test/rtree/interprocess/rtree_interprocess_quadratic_dyn.cpp @@ -14,6 +14,6 @@ int test_main(int, char* []) typedef bg::model::point P2f; testset::interprocess::modifiers_and_additional(bgi::dynamic_quadratic(32, 8)); - + return 0; } diff --git a/index/test/rtree/interprocess/rtree_interprocess_rstar.cpp b/index/test/rtree/interprocess/rtree_interprocess_rstar.cpp index 415a473da..146d3042d 100644 --- a/index/test/rtree/interprocess/rtree_interprocess_rstar.cpp +++ b/index/test/rtree/interprocess/rtree_interprocess_rstar.cpp @@ -14,6 +14,6 @@ int test_main(int, char* []) typedef bg::model::point P2f; testset::interprocess::modifiers_and_additional(bgi::rstar<32, 8>()); - + return 0; } diff --git a/index/test/rtree/interprocess/rtree_interprocess_rstar_dyn.cpp b/index/test/rtree/interprocess/rtree_interprocess_rstar_dyn.cpp index 06edc43a8..ba30bfb83 100644 --- a/index/test/rtree/interprocess/rtree_interprocess_rstar_dyn.cpp +++ b/index/test/rtree/interprocess/rtree_interprocess_rstar_dyn.cpp @@ -14,6 +14,6 @@ int test_main(int, char* []) typedef bg::model::point P2f; testset::interprocess::modifiers_and_additional(bgi::dynamic_rstar(32, 8)); - + return 0; } diff --git a/index/test/rtree/rtree_epsilon.cpp b/index/test/rtree/rtree_epsilon.cpp index 728e22d9c..dbdf55df4 100644 --- a/index/test/rtree/rtree_epsilon.cpp +++ b/index/test/rtree/rtree_epsilon.cpp @@ -50,11 +50,11 @@ void test_rtree(unsigned vcount) rt.query(bgi::intersects(qpt), std::back_inserter(result)); BOOST_CHECK(result.size() == 1); } - + { bgi::rtree rt; rt.insert(values); - + std::vector result; rt.query(bgi::intersects(qpt), std::back_inserter(result)); BOOST_CHECK(result.size() == 1); diff --git a/index/test/rtree/rtree_intersects_geom.cpp b/index/test/rtree/rtree_intersects_geom.cpp index 973628cbb..9f02ba781 100644 --- a/index/test/rtree/rtree_intersects_geom.cpp +++ b/index/test/rtree/rtree_intersects_geom.cpp @@ -26,7 +26,7 @@ void test_all() bgi::rtree rt; std::vector found; - + rt.query(bgi::intersects(Point()), back_inserter(found)); rt.query(bgi::intersects(Seg()), back_inserter(found)); rt.query(bgi::intersects(Box()), back_inserter(found)); @@ -50,6 +50,6 @@ int test_main(int, char* []) test_all< Box, Pt, bgi::linear<16> >(); test_all< Box, Pt, bgi::quadratic<4> >(); test_all< Box, Pt, bgi::rstar<4> >(); - + return 0; } diff --git a/index/test/rtree/rtree_test_generator.cpp b/index/test/rtree/rtree_test_generator.cpp index 512ef4306..5f92f11ca 100644 --- a/index/test/rtree/rtree_test_generator.cpp +++ b/index/test/rtree/rtree_test_generator.cpp @@ -37,7 +37,7 @@ int main() parameters.push_back(boost::make_tuple("bgi::dynamic_quadratic(5, 2)", "dqua")); parameters.push_back(boost::make_tuple("bgi::rstar<5, 2>()", "rst")); parameters.push_back(boost::make_tuple("bgi::dynamic_rstar(5, 2)","drst")); - + std::vector indexables; indexables.push_back("p"); indexables.push_back("b"); @@ -63,7 +63,7 @@ int main() continue; } - for (CT const& c : coordinate_types) + for (CT const& c : coordinate_types) { std::string filename = std::string() + "rtree_" + boost::get<1>(p) + '_' + ts.second + '_' + i + d + boost::get<1>(c) + ".cpp"; @@ -105,7 +105,7 @@ int main() "}\n"; } } - } + } } } diff --git a/index/test/rtree/rtree_values.cpp b/index/test/rtree/rtree_values.cpp index e9eb13810..74f916b78 100644 --- a/index/test/rtree/rtree_values.cpp +++ b/index/test/rtree/rtree_values.cpp @@ -116,7 +116,7 @@ template void test_point() { bgi::rtree rt; - + rt.insert(0.0); BOOST_CHECK_EQUAL(rt.size(), 1u); BOOST_CHECK_EQUAL(rt.remove(0.0), 1u); diff --git a/index/test/rtree/rtree_values_invalid.cpp b/index/test/rtree/rtree_values_invalid.cpp index d16861331..116d30687 100644 --- a/index/test/rtree/rtree_values_invalid.cpp +++ b/index/test/rtree/rtree_values_invalid.cpp @@ -22,10 +22,10 @@ void test_rtree() int test_main(int, char* []) { typedef bg::model::point Pt; - + test_rtree >(); test_rtree >(); test_rtree >(); - + return 0; } diff --git a/index/test/rtree/test_rtree.hpp b/index/test/rtree/test_rtree.hpp index 889f61fac..184576941 100644 --- a/index/test/rtree/test_rtree.hpp +++ b/index/test/rtree/test_rtree.hpp @@ -355,7 +355,7 @@ struct value< boost::shared_ptr > > > typedef boost::shared_ptr R; static R apply(int x, int y, int z) - { + { return R(new O(P(x, y, z))); } }; @@ -383,7 +383,7 @@ struct value< boost::shared_ptr R; static R apply(int x, int y, int z) - { + { return R(new O(B(P(x, y, z), P(x + 2, y + 3, z + 4)))); } }; @@ -1269,7 +1269,7 @@ inline void nearest_query_k(Rtree const& rtree, std::vector const& input, { greatest_distance = test_output.back().first; } - + // transform test output to vector of values std::vector expected_output(test_output.size(), generate::value_default::apply()); std::transform(test_output.begin(), test_output.end(), expected_output.begin(), NearestKTransform()); @@ -1343,7 +1343,7 @@ struct satisfies_obj template void satisfies(Rtree const& rtree, std::vector const& input) { - std::vector result; + std::vector result; rtree.query(bgi::satisfies(satisfies_obj()), std::back_inserter(result)); BOOST_CHECK(result.size() == input.size()); result.clear(); @@ -1404,7 +1404,7 @@ void copy_swap_move(Rtree const& tree, Box const& qbox) output.clear(); t1.query(bgi::intersects(qbox), std::back_inserter(output)); exactly_the_same_outputs(t1, output, expected_output); - + Rtree t2(tree.parameters(), tree.indexable_get(), tree.value_eq(), tree.get_allocator()); t2.swap(t1); BOOST_CHECK(tree.empty() == t2.empty()); @@ -1574,7 +1574,7 @@ void remove(Rtree const& tree, Box const& qbox) // Add value which is not stored in the Rtree Value outsider = generate::value_outside(); values_to_remove.push_back(outsider); - + { Rtree t(tree); size_t r = 0; @@ -1850,12 +1850,12 @@ void test_rtree_count(Parameters const& parameters, Allocator const& allocator) B qbox; generate::rtree(t, input, qbox); - + BOOST_CHECK(t.count(input[0]) == 1); BOOST_CHECK(t.count(input[0].first) == 1); - + t.insert(input[0]); - + BOOST_CHECK(t.count(input[0]) == 2); BOOST_CHECK(t.count(input[0].first) == 2); @@ -1883,14 +1883,14 @@ void test_rtree_bounds(Parameters const& parameters, Allocator const& allocator) B b; bg::assign_inverse(b); - + BOOST_CHECK(bg::equals(t.bounds(), b)); generate::rtree(t, input, qbox); b = bgi::detail::rtree::values_box(input.begin(), input.end(), t.indexable_get(), bgi::detail::get_strategy(parameters)); - + BOOST_CHECK(bg::equals(t.bounds(), b)); BOOST_CHECK(bg::equals(t.bounds(), bgi::bounds(t))); diff --git a/index/test/varray_old.cpp b/index/test/varray_old.cpp index a257f6235..3a11e98ba 100644 --- a/index/test/varray_old.cpp +++ b/index/test/varray_old.cpp @@ -178,7 +178,7 @@ void test_pop_back_nd() varray s; for ( size_t i = 0 ; i < N ; ++i ) - s.push_back(T(i)); + s.push_back(T(i)); for ( size_t i = N ; i > 1 ; --i ) { @@ -300,7 +300,7 @@ template void test_erase_nd() { varray s; - + for ( size_t i = 0 ; i < N ; ++i ) s.push_back(T(i)); @@ -315,7 +315,7 @@ void test_erase_nd() BOOST_CHECK(s1[j] == T(j)); for ( size_t j = i+1 ; j < N ; ++j ) BOOST_CHECK(s1[j-1] == T(j)); - } + } } // erase(first, last) { @@ -330,7 +330,7 @@ void test_erase_nd() BOOST_CHECK(s1[j] == T(j)); for ( size_t j = i+n ; j < N ; ++j ) BOOST_CHECK(s1[j-n] == T(j)); - } + } } } @@ -363,7 +363,7 @@ void test_insert_nd(T const& val) BOOST_CHECK(s1[i] == val); for ( size_t j = 0 ; j < h-i ; ++j ) BOOST_CHECK(s1[j+i+1] == T(j+i)); - } + } } // insert(pos, n, val) { @@ -379,7 +379,7 @@ void test_insert_nd(T const& val) BOOST_CHECK(s1[j+i] == val); for ( size_t j = 0 ; j < h-i ; ++j ) BOOST_CHECK(s1[j+i+n] == T(j+i)); - } + } } // insert(pos, first, last) { @@ -395,7 +395,7 @@ void test_insert_nd(T const& val) BOOST_CHECK(s1[j+i] == T(100 + j)); for ( size_t j = 0 ; j < h-i ; ++j ) BOOST_CHECK(s1[j+i+n] == T(j+i)); - } + } } { size_t n = size_t(h/1.5f); @@ -410,7 +410,7 @@ void test_insert_nd(T const& val) BOOST_CHECK(s1[j+i] == T(100 + j)); for ( size_t j = 0 ; j < h-i ; ++j ) BOOST_CHECK(s1[j+i+n] == T(j+i)); - } + } } { size_t n = size_t(h/1.5f); @@ -427,7 +427,7 @@ void test_insert_nd(T const& val) BOOST_CHECK(s1[j+i] == T(100 + j)); for ( size_t j = 0 ; j < h-i ; ++j ) BOOST_CHECK(s1[j+i+n] == T(j+i)); - } + } } }