From c821efcc2bd5fa4987737fb85e261d50c1d767ef Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sun, 8 May 2011 15:55:43 +0000 Subject: [PATCH] Removed std_as_linestring/ring/multi_point and c_array* and boost_array* because there are now macros for that Mention box/point/segment as helper-geometry explicitly Removed all std geometries from geometries.hpp, geometry.hpp, multi.hpp - they have to be included explicitly [SVN r71825] --- .../detail/overlay/assign_parents.hpp | 2 + .../overlay/get_intersection_points.hpp | 2 + .../detail/overlay/get_turn_info.hpp | 2 + .../algorithms/detail/overlay/get_turns.hpp | 1 + .../detail/overlay/handle_tangencies.hpp | 3 +- .../detail/overlay/self_turn_points.hpp | 2 + .../algorithms/buffer/linestring_buffer.hpp | 2 + .../extensions/algorithms/mark_spikes.hpp | 2 + .../geometry/extensions/algorithms/offset.hpp | 1 + .../extensions/algorithms/remove_spikes.hpp | 3 + .../geometry/extensions/io/svg/svg_mapper.hpp | 36 ++++---- .../iterators/segment_returning_iterator.hpp | 2 + .../adapted/boost_array_as_linestring.hpp | 87 ------------------- .../adapted/boost_array_as_ring.hpp | 56 ------------ .../adapted/c_array_as_linestring.hpp | 51 ----------- .../geometries/adapted/c_array_as_ring.hpp | 51 ----------- .../geometries/adapted/std_as_linestring.hpp | 72 --------------- .../geometries/adapted/std_as_ring.hpp | 54 ------------ .../boost/geometry/geometries/geometries.hpp | 6 +- include/boost/geometry/geometry.hpp | 8 -- .../adapted/boost_array_as_multi_point.hpp | 56 ------------ .../adapted/c_array_as_multi_point.hpp | 51 ----------- .../geometries/adapted/std_as_multi_point.hpp | 71 --------------- .../multi/geometries/multi_geometries.hpp | 21 +++++ include/boost/geometry/multi/multi.hpp | 3 - .../cartesian/centroid_weighted_length.hpp | 7 +- .../cartesian/distance_projected_point.hpp | 5 +- 27 files changed, 67 insertions(+), 590 deletions(-) delete mode 100644 include/boost/geometry/geometries/adapted/boost_array_as_linestring.hpp delete mode 100644 include/boost/geometry/geometries/adapted/boost_array_as_ring.hpp delete mode 100644 include/boost/geometry/geometries/adapted/c_array_as_linestring.hpp delete mode 100644 include/boost/geometry/geometries/adapted/c_array_as_ring.hpp delete mode 100644 include/boost/geometry/geometries/adapted/std_as_linestring.hpp delete mode 100644 include/boost/geometry/geometries/adapted/std_as_ring.hpp delete mode 100644 include/boost/geometry/multi/geometries/adapted/boost_array_as_multi_point.hpp delete mode 100644 include/boost/geometry/multi/geometries/adapted/c_array_as_multi_point.hpp delete mode 100644 include/boost/geometry/multi/geometries/adapted/std_as_multi_point.hpp create mode 100644 include/boost/geometry/multi/geometries/multi_geometries.hpp diff --git a/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp b/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp index 90ba4164b..423e051f9 100644 --- a/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp @@ -16,6 +16,8 @@ #include #include +#include + namespace boost { namespace geometry { diff --git a/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp b/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp index 4a0fdc952..a752773ab 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp @@ -15,6 +15,8 @@ #include #include +#include + namespace boost { namespace geometry { diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp index 783a63bb1..93bf368bc 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp @@ -17,6 +17,8 @@ #include #include +#include + namespace boost { namespace geometry { diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp index 55d062f42..6b7fbe19d 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp @@ -36,6 +36,7 @@ #include #include +#include #include diff --git a/include/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp b/include/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp index 6c1ac0a4e..61e737847 100644 --- a/include/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/handle_tangencies.hpp @@ -11,11 +11,12 @@ #include - #include #include #include +#include + namespace boost { namespace geometry { 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 f996b60ea..62b8ef484 100644 --- a/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp @@ -21,6 +21,8 @@ #include #include +#include + namespace boost { namespace geometry { diff --git a/include/boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp b/include/boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp index d1aa797f2..9b428ff40 100644 --- a/include/boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp +++ b/include/boost/geometry/extensions/algorithms/buffer/linestring_buffer.hpp @@ -22,6 +22,8 @@ #include #include +#include + diff --git a/include/boost/geometry/extensions/algorithms/mark_spikes.hpp b/include/boost/geometry/extensions/algorithms/mark_spikes.hpp index ec2a7b149..fc5ad4e91 100644 --- a/include/boost/geometry/extensions/algorithms/mark_spikes.hpp +++ b/include/boost/geometry/extensions/algorithms/mark_spikes.hpp @@ -31,6 +31,8 @@ #include #include +#include + /* Mark spikes in a ring/polygon. diff --git a/include/boost/geometry/extensions/algorithms/offset.hpp b/include/boost/geometry/extensions/algorithms/offset.hpp index bf59352c3..bcc52b14b 100644 --- a/include/boost/geometry/extensions/algorithms/offset.hpp +++ b/include/boost/geometry/extensions/algorithms/offset.hpp @@ -18,6 +18,7 @@ #include #include +#include namespace boost { namespace geometry { diff --git a/include/boost/geometry/extensions/algorithms/remove_spikes.hpp b/include/boost/geometry/extensions/algorithms/remove_spikes.hpp index b2e7e7153..e568e25fa 100644 --- a/include/boost/geometry/extensions/algorithms/remove_spikes.hpp +++ b/include/boost/geometry/extensions/algorithms/remove_spikes.hpp @@ -36,6 +36,9 @@ #include +#include + + /* Remove spikes from a ring/polygon. Ring (having 8 vertices, including closing vertex) diff --git a/include/boost/geometry/extensions/io/svg/svg_mapper.hpp b/include/boost/geometry/extensions/io/svg/svg_mapper.hpp index 27b97d418..f883a9b24 100644 --- a/include/boost/geometry/extensions/io/svg/svg_mapper.hpp +++ b/include/boost/geometry/extensions/io/svg/svg_mapper.hpp @@ -37,28 +37,33 @@ #include #include -#include -#include -#include -#include -#include - - #include #include #include #include +// Helper geometries (all points are transformed to integer-points) +#include + namespace boost { namespace geometry { +#ifndef DOXYGEN_NO_DETAIL +namespace detail { namespace svg +{ + typedef model::point svg_point_type; +}} +#endif + #ifndef DOXYGEN_NO_DISPATCH namespace dispatch { + + template struct svg_map { @@ -78,7 +83,7 @@ struct svg_map std::string const& style, int size, Point const& point, TransformStrategy const& strategy) { - model::d2::point_xy ipoint; + detail::svg::svg_point_type ipoint; geometry::transform(point, ipoint, strategy); stream << geometry::svg(ipoint, style, size) << std::endl; } @@ -92,7 +97,7 @@ struct svg_map std::string const& style, int size, Box const& box, TransformStrategy const& strategy) { - model::box > ibox; + model::box ibox; geometry::transform(box, ibox, strategy); stream << geometry::svg(ibox, style, size) << std::endl; @@ -127,7 +132,7 @@ struct svg_map svg_map_range < view_type, - model::linestring > + model::linestring >::apply(stream, style, size, range, strategy); } }; @@ -135,13 +140,13 @@ struct svg_map template struct svg_map - : svg_map_range > > + : svg_map_range > {}; template struct svg_map - : svg_map_range > > + : svg_map_range > {}; @@ -153,7 +158,7 @@ struct svg_map std::string const& style, int size, Polygon const& polygon, TransformStrategy const& strategy) { - model::polygon > ipoly; + model::polygon ipoly; geometry::transform(polygon, ipoly, strategy); stream << geometry::svg(ipoly, style, size) << std::endl; } @@ -212,11 +217,10 @@ inline void svg_map(std::ostream& stream, template class svg_mapper : boost::noncopyable { - typedef model::d2::point_xy map_point_type; typedef strategy::transform::map_transformer < Point, - map_point_type, + detail::svg::svg_point_type, true, SameScale > transformer_type; @@ -299,7 +303,7 @@ public : int offset_x = 0, int offset_y = 0, int lineheight = 10) { init_matrix(); - map_point_type map_point; + detail::svg::svg_point_type map_point; transform(point, map_point, *m_matrix); m_stream << " #include + +// Helper geometry #include namespace boost { namespace geometry diff --git a/include/boost/geometry/geometries/adapted/boost_array_as_linestring.hpp b/include/boost/geometry/geometries/adapted/boost_array_as_linestring.hpp deleted file mode 100644 index 7e6396fa0..000000000 --- a/include/boost/geometry/geometries/adapted/boost_array_as_linestring.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. -// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - -// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library -// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_LINESTRING_HPP -#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_LINESTRING_HPP - - -#ifdef BOOST_GEOMETRY_ADAPTED_BOOST_ARRAY_TAG_DEFINED -#error Include either "boost_array_as_point" or \ - "boost_array_as_linestring" or "boost_array_as_ring" \ - or "boost_array_as_multi_point" to adapt a boost_array -#endif - -#define BOOST_GEOMETRY_ADAPTED_BOOST_ARRAY_TAG_DEFINED - - -#include -#include - -#include - -#include -#include -#include - - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS -namespace traits -{ - -template -struct tag< boost::array > -{ - typedef linestring_tag type; -}; - -// boost::array is immutable with respect to size -// Therefore, prohibit compilation -template -struct clear< boost::array > -{ - BOOST_MPL_ASSERT_MSG - ( - false, NOT_IMPLEMENTED_FOR_BOOST_ARRAY_OF, (types) - ); -}; - -template -struct resize< boost::array > -{ - BOOST_MPL_ASSERT_MSG - ( - false, NOT_IMPLEMENTED_FOR_BOOST_ARRAY_OF, (types) - ); -}; - -template -struct push_back< boost::array > -{ - BOOST_MPL_ASSERT_MSG - ( - false, NOT_IMPLEMENTED_FOR_BOOST_ARRAY_OF, (types) - ); -}; - -} -#endif - - -}} // namespace boost::geometry - - -#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_LINESTRING_HPP diff --git a/include/boost/geometry/geometries/adapted/boost_array_as_ring.hpp b/include/boost/geometry/geometries/adapted/boost_array_as_ring.hpp deleted file mode 100644 index c71019672..000000000 --- a/include/boost/geometry/geometries/adapted/boost_array_as_ring.hpp +++ /dev/null @@ -1,56 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. -// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - -// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library -// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_RING_HPP -#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_RING_HPP - - -#ifdef BOOST_GEOMETRY_ADAPTED_BOOST_ARRAY_TAG_DEFINED -#error Include either "boost_array_as_point" or \ - "boost_array_as_linestring" or "boost_array_as_ring" \ - or "boost_array_as_multi_point" to adapt a boost_array -#endif - -#define BOOST_GEOMETRY_ADAPTED_BOOST_ARRAY_TAG_DEFINED - - -#include - -#include - -#include -#include - - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS -namespace traits -{ - - template - struct tag< boost::array > - { - typedef ring_tag type; - }; - -} -#endif - - -}} // namespace boost::geometry - - -#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_RING_HPP diff --git a/include/boost/geometry/geometries/adapted/c_array_as_linestring.hpp b/include/boost/geometry/geometries/adapted/c_array_as_linestring.hpp deleted file mode 100644 index 41b4319c6..000000000 --- a/include/boost/geometry/geometries/adapted/c_array_as_linestring.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. -// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - -// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library -// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_C_ARRAY_AS_LINESTRING_HPP -#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_C_ARRAY_AS_LINESTRING_HPP - - -#ifdef BOOST_GEOMETRY_ADAPTED_C_ARRAY_AS_POINT_COLLECTION_TAG_DEFINED -#error Include either "c_array_as_linestring" or "c_array_as_ring" \ - or "c_array_as_multi_point" to adapt a c array -#endif - -#define BOOST_GEOMETRY_ADAPTED_C_ARRAY_AS_POINT_COLLECTION_TAG_DEFINED - - -#include - -#include -#include - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS -namespace traits -{ - - template - struct tag< T[PointCount][DimensionCount] > - { - typedef linestring_tag type; - }; - -} // namespace traits -#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS - - -}} // namespace boost::geometry - -#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_C_ARRAY_AS_LINESTRING_HPP diff --git a/include/boost/geometry/geometries/adapted/c_array_as_ring.hpp b/include/boost/geometry/geometries/adapted/c_array_as_ring.hpp deleted file mode 100644 index 604da8e39..000000000 --- a/include/boost/geometry/geometries/adapted/c_array_as_ring.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. -// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - -// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library -// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_C_ARRAY_AS_RING_HPP -#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_C_ARRAY_AS_RING_HPP - - -#ifdef BOOST_GEOMETRY_ADAPTED_C_ARRAY_AS_POINT_COLLECTION_TAG_DEFINED -#error Include either "c_array_as_linestring" or "c_array_as_ring" \ - or "c_array_as_multi_point" to adapt a c array -#endif - -#define BOOST_GEOMETRY_ADAPTED_C_ARRAY_AS_POINT_COLLECTION_TAG_DEFINED - - -#include - -#include -#include - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS -namespace traits -{ - - template - struct tag< T[PointCount][DimensionCount] > - { - typedef ring_tag type; - }; - -} // namespace traits -#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS - - -}} // namespace boost::geometry - -#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_C_ARRAY_AS_RING_HPP diff --git a/include/boost/geometry/geometries/adapted/std_as_linestring.hpp b/include/boost/geometry/geometries/adapted/std_as_linestring.hpp deleted file mode 100644 index 8abf0a8bd..000000000 --- a/include/boost/geometry/geometries/adapted/std_as_linestring.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. -// Copyright (c) 2008-2011 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - -// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library -// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_LINESTRING_HPP -#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_LINESTRING_HPP - - -#ifdef BOOST_GEOMETRY_ADAPTED_STD_AS_POINT_COLLECTION_TAG_DEFINED -#error Include either "std_as_linestring" or "std_as_ring" \ - or "std_as_multi_point" to adapt the std:: containers -#endif - -#define BOOST_GEOMETRY_ADAPTED_STD_AS_POINT_COLLECTION_TAG_DEFINED - - -#include -#include -#include -#include - - -#include -#include -#include -#include - - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_DETAIL -namespace util -{ - struct std_as_linestring - { - typedef linestring_tag type; - }; - -} -#endif - - -#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS -namespace traits -{ - // specialization for an iterator pair (read only) - template struct tag< std::pair > : util::std_as_linestring {}; - - // specializations for the std:: containers: vector, deque, list - template struct tag< std::vector

> : util::std_as_linestring {}; - template struct tag< std::deque

> : util::std_as_linestring {}; - template struct tag< std::list

> : util::std_as_linestring {}; - -} -#endif - - -}} // namespace boost::geometry - - -#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_LINESTRING_HPP diff --git a/include/boost/geometry/geometries/adapted/std_as_ring.hpp b/include/boost/geometry/geometries/adapted/std_as_ring.hpp deleted file mode 100644 index 30b802430..000000000 --- a/include/boost/geometry/geometries/adapted/std_as_ring.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. -// Copyright (c) 2008-2011 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - -// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library -// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_RING_HPP -#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_RING_HPP - - -#ifdef BOOST_GEOMETRY_ADAPTED_STD_AS_POINT_COLLECTION_TAG_DEFINED -#error Include either "std_as_linestring" or "std_as_ring" \ - or "std_as_multi_point" to adapt the std:: containers -#endif - -#define BOOST_GEOMETRY_ADAPTED_STD_AS_POINT_COLLECTION_TAG_DEFINED - - -#include -#include -#include -#include - -#include - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS -namespace traits -{ - // specialization for an iterator pair - template struct tag< std::pair > { typedef ring_tag type; }; - - // specialization for the std:: containers: vector, deque, list - template struct tag< std::vector > { typedef ring_tag type; }; - template struct tag< std::deque > { typedef ring_tag type; }; - template struct tag< std::list > { typedef ring_tag type; }; -} -#endif - - -}} // namespace boost::geometry - - -#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_RING_HPP diff --git a/include/boost/geometry/geometries/geometries.hpp b/include/boost/geometry/geometries/geometries.hpp index fd766ff26..7488c29d8 100644 --- a/include/boost/geometry/geometries/geometries.hpp +++ b/include/boost/geometry/geometries/geometries.hpp @@ -14,16 +14,12 @@ #ifndef BOOST_GEOMETRY_GEOMETRIES_HPP #define BOOST_GEOMETRY_GEOMETRIES_HPP -#include -#include - #include -#include -#include #include #include #include +#include #include #endif // BOOST_GEOMETRY_GEOMETRIES_HPP diff --git a/include/boost/geometry/geometry.hpp b/include/boost/geometry/geometry.hpp index c98be8904..694659785 100644 --- a/include/boost/geometry/geometry.hpp +++ b/include/boost/geometry/geometry.hpp @@ -65,14 +65,6 @@ #include #include -// Include provided geometries -#include -#include -#include -#include -#include -#include - // Include multi a.o. because it can give weird effects // if you don't (e.g. area=0 of a multipolygon) #include diff --git a/include/boost/geometry/multi/geometries/adapted/boost_array_as_multi_point.hpp b/include/boost/geometry/multi/geometries/adapted/boost_array_as_multi_point.hpp deleted file mode 100644 index c840c9918..000000000 --- a/include/boost/geometry/multi/geometries/adapted/boost_array_as_multi_point.hpp +++ /dev/null @@ -1,56 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. -// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - -// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library -// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_MULTI_POINT_HPP -#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_MULTI_POINT_HPP - - -#ifdef BOOST_GEOMETRY_ADAPTED_BOOST_ARRAY_TAG_DEFINED -#error Include either "boost_array_as_point" or \ - "boost_array_as_linestring" or "boost_array_as_ring" \ - or "boost_array_as_multi_point" to adapt a boost_array -#endif - -#define BOOST_GEOMETRY_ADAPTED_BOOST_ARRAY_TAG_DEFINED - - -#include - -#include - -#include -#include - - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS -namespace traits -{ - - template - struct tag< boost::array > - { - typedef multi_point_tag type; - }; - -} -#endif - - -}} // namespace boost::geometry - - -#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_MULTI_POINT_HPP diff --git a/include/boost/geometry/multi/geometries/adapted/c_array_as_multi_point.hpp b/include/boost/geometry/multi/geometries/adapted/c_array_as_multi_point.hpp deleted file mode 100644 index 6cc5e2c22..000000000 --- a/include/boost/geometry/multi/geometries/adapted/c_array_as_multi_point.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. -// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - -// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library -// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_C_ARRAY_AS_MULTI_POINT_HPP -#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_C_ARRAY_AS_MULTI_POINT_HPP - - -#ifdef BOOST_GEOMETRY_ADAPTED_C_ARRAY_AS_POINT_COLLECTION_TAG_DEFINED -#error Include either "c_array_as_linestring" or "c_array_as_ring" \ - or "c_array_as_multi_point" to adapt a c array -#endif - -#define BOOST_GEOMETRY_ADAPTED_C_ARRAY_AS_POINT_COLLECTION_TAG_DEFINED - - -#include - -#include -#include - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS -namespace traits -{ - - template - struct tag< T[PointCount][DimensionCount] > - { - typedef multi_point_tag type; - }; - -} // namespace traits -#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS - - -}} // namespace boost::geometry - -#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_C_ARRAY_AS_MULTI_POINT_HPP diff --git a/include/boost/geometry/multi/geometries/adapted/std_as_multi_point.hpp b/include/boost/geometry/multi/geometries/adapted/std_as_multi_point.hpp deleted file mode 100644 index 171489f2a..000000000 --- a/include/boost/geometry/multi/geometries/adapted/std_as_multi_point.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. -// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. - -// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library -// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_MULTI_POINT_HPP -#define BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_MULTI_POINT_HPP - - -#ifdef BOOST_GEOMETRY_ADAPTED_STD_AS_POINT_COLLECTION_TAG_DEFINED -#error Include either "std_as_linestring" or "std_as_ring" \ - or "std_as_multi_point" to adapt the std:: containers -#endif - -#define BOOST_GEOMETRY_ADAPTED_STD_AS_POINT_COLLECTION_TAG_DEFINED - - -#include -#include -#include -#include - - -#include -#include -#include - - -namespace boost { namespace geometry -{ - - -#ifndef DOXYGEN_NO_DETAIL -namespace util -{ - struct std_as_multi_point - { - typedef multi_point_tag type; - }; - -} -#endif - - -#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS -namespace traits -{ - // specialization for an iterator pair (read only) - template struct tag< std::pair > : util::std_as_multi_point {}; - - // specializations for the std:: containers: vector, deque, list - template struct tag< std::vector

> : util::std_as_multi_point {}; - template struct tag< std::deque

> : util::std_as_multi_point {}; - template struct tag< std::list

> : util::std_as_multi_point {}; - -} -#endif - - -}} // namespace boost::geometry - - -#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_MULTI_POINT_HPP diff --git a/include/boost/geometry/multi/geometries/multi_geometries.hpp b/include/boost/geometry/multi/geometries/multi_geometries.hpp new file mode 100644 index 000000000..0e98b22fb --- /dev/null +++ b/include/boost/geometry/multi/geometries/multi_geometries.hpp @@ -0,0 +1,21 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. + +// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library +// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_GEOMETRY_MULTI_GEOMETRIES_MULTI_GEOMETRIES_HPP +#define BOOST_GEOMETRY_MULTI_GEOMETRIES_MULTI_GEOMETRIES_HPP + +#include +#include +#include + +#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_MULTI_GEOMETRIES_HPP diff --git a/include/boost/geometry/multi/multi.hpp b/include/boost/geometry/multi/multi.hpp index 87373cf10..b80a15112 100644 --- a/include/boost/geometry/multi/multi.hpp +++ b/include/boost/geometry/multi/multi.hpp @@ -58,9 +58,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp b/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp index 0d89c735f..bf1e7716e 100644 --- a/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp +++ b/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp @@ -15,18 +15,17 @@ #include #include -#include #include #include #include +// Helper geometry +#include + namespace boost { namespace geometry { -// Note: when calling the namespace "centroid", it sometimes, -// somehow, in gcc, gives compilation problems (confusion with function centroid). - namespace strategy { namespace centroid { diff --git a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp index 52eb4bd69..4378949ea 100644 --- a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp @@ -33,11 +33,8 @@ #include - - -// Helper geometries +// Helper geometry (projected point on line) #include -#include namespace boost { namespace geometry