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]
This commit is contained in:
Barend Gehrels 2011-05-08 15:55:43 +00:00
parent 1dc67c1bf5
commit c821efcc2b
27 changed files with 67 additions and 590 deletions

View File

@ -16,6 +16,8 @@
#include <boost/geometry/algorithms/detail/overlay/get_ring.hpp>
#include <boost/geometry/algorithms/detail/overlay/within_util.hpp>
#include <boost/geometry/geometries/box.hpp>
namespace boost { namespace geometry
{

View File

@ -15,6 +15,8 @@
#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
#include <boost/geometry/geometries/segment.hpp>
namespace boost { namespace geometry
{

View File

@ -17,6 +17,8 @@
#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
#include <boost/geometry/geometries/segment.hpp>
namespace boost { namespace geometry
{

View File

@ -36,6 +36,7 @@
#include <boost/geometry/views/detail/range_type.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/segment.hpp>
#include <boost/geometry/iterators/ever_circling_iterator.hpp>

View File

@ -11,11 +11,12 @@
#include <algorithm>
#include <boost/geometry/algorithms/detail/ring_identifier.hpp>
#include <boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp>
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
#include <boost/geometry/geometries/segment.hpp>
namespace boost { namespace geometry
{

View File

@ -21,6 +21,8 @@
#include <boost/geometry/algorithms/detail/disjoint.hpp>
#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
#include <boost/geometry/geometries/box.hpp>
namespace boost { namespace geometry
{

View File

@ -22,6 +22,8 @@
#include <boost/geometry/extensions/algorithms/buffer/line_line_intersection.hpp>
#include <boost/geometry/extensions/algorithms/buffer/intersecting_inserter.hpp>
#include <boost/geometry/geometries/segment.hpp>

View File

@ -31,6 +31,8 @@
#include <boost/geometry/algorithms/distance.hpp>
#include <boost/geometry/algorithms/perimeter.hpp>
#include <boost/geometry/geometries/box.hpp>
/*
Mark spikes in a ring/polygon.

View File

@ -18,6 +18,7 @@
#include <boost/geometry/algorithms/detail/disjoint.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/geometries/segment.hpp>
namespace boost { namespace geometry
{

View File

@ -36,6 +36,9 @@
#include <boost/geometry/iterators/ever_circling_iterator.hpp>
#include <boost/geometry/geometries/ring.hpp>
/*
Remove spikes from a ring/polygon.
Ring (having 8 vertices, including closing vertex)

View File

@ -37,28 +37,33 @@
#include <boost/geometry/strategies/transform/map_transformer.hpp>
#include <boost/geometry/views/segment_view.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/multi/core/tags.hpp>
#include <boost/geometry/multi/algorithms/envelope.hpp>
#include <boost/geometry/multi/algorithms/num_points.hpp>
#include <boost/geometry/extensions/io/svg/write_svg.hpp>
// Helper geometries (all points are transformed to integer-points)
#include <boost/geometry/geometries/geometries.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_DETAIL
namespace detail { namespace svg
{
typedef model::point<int, 2, cs::cartesian> svg_point_type;
}}
#endif
#ifndef DOXYGEN_NO_DISPATCH
namespace dispatch
{
template <typename GeometryTag, typename Geometry>
struct svg_map
{
@ -78,7 +83,7 @@ struct svg_map<point_tag, Point>
std::string const& style, int size,
Point const& point, TransformStrategy const& strategy)
{
model::d2::point_xy<int> 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<box_tag, Box>
std::string const& style, int size,
Box const& box, TransformStrategy const& strategy)
{
model::box<model::d2::point_xy<int> > ibox;
model::box<detail::svg::svg_point_type> ibox;
geometry::transform(box, ibox, strategy);
stream << geometry::svg(ibox, style, size) << std::endl;
@ -127,7 +132,7 @@ struct svg_map<segment_tag, Segment>
svg_map_range
<
view_type,
model::linestring<model::d2::point_xy<int> >
model::linestring<detail::svg::svg_point_type>
>::apply(stream, style, size, range, strategy);
}
};
@ -135,13 +140,13 @@ struct svg_map<segment_tag, Segment>
template <typename Ring>
struct svg_map<ring_tag, Ring>
: svg_map_range<Ring, model::ring<model::d2::point_xy<int> > >
: svg_map_range<Ring, model::ring<detail::svg::svg_point_type> >
{};
template <typename Linestring>
struct svg_map<linestring_tag, Linestring>
: svg_map_range<Linestring, model::linestring<model::d2::point_xy<int> > >
: svg_map_range<Linestring, model::linestring<detail::svg::svg_point_type> >
{};
@ -153,7 +158,7 @@ struct svg_map<polygon_tag, Polygon>
std::string const& style, int size,
Polygon const& polygon, TransformStrategy const& strategy)
{
model::polygon<model::d2::point_xy<int> > ipoly;
model::polygon<detail::svg::svg_point_type> 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 <typename Point, bool SameScale = true>
class svg_mapper : boost::noncopyable
{
typedef model::d2::point_xy<int> 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
<< "<text style=\"" << style << "\""

View File

@ -24,6 +24,8 @@
#include <boost/iterator/iterator_categories.hpp>
#include <boost/geometry/algorithms/equals.hpp>
// Helper geometry
#include <boost/geometry/geometries/segment.hpp>
namespace boost { namespace geometry

View File

@ -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 <cstddef>
#include <boost/mpl/assert.hpp>
#include <boost/array.hpp>
#include <boost/geometry/core/mutable_range.hpp>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/core/tags.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
namespace traits
{
template <typename Point, std::size_t PointCount>
struct tag< boost::array<Point, PointCount> >
{
typedef linestring_tag type;
};
// boost::array is immutable with respect to size
// Therefore, prohibit compilation
template <typename Point, std::size_t PointCount>
struct clear< boost::array<Point, PointCount> >
{
BOOST_MPL_ASSERT_MSG
(
false, NOT_IMPLEMENTED_FOR_BOOST_ARRAY_OF, (types<Point>)
);
};
template <typename Point, std::size_t PointCount>
struct resize< boost::array<Point, PointCount> >
{
BOOST_MPL_ASSERT_MSG
(
false, NOT_IMPLEMENTED_FOR_BOOST_ARRAY_OF, (types<Point>)
);
};
template <typename Point, std::size_t PointCount>
struct push_back< boost::array<Point, PointCount> >
{
BOOST_MPL_ASSERT_MSG
(
false, NOT_IMPLEMENTED_FOR_BOOST_ARRAY_OF, (types<Point>)
);
};
}
#endif
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_LINESTRING_HPP

View File

@ -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 <cstddef>
#include <boost/array.hpp>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/core/tags.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
namespace traits
{
template <typename PointType, std::size_t DimensionCount>
struct tag< boost::array<PointType, DimensionCount> >
{
typedef ring_tag type;
};
}
#endif
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_RING_HPP

View File

@ -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 <cstddef>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/core/tags.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
namespace traits
{
template <typename T, std::size_t PointCount, std::size_t DimensionCount>
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

View File

@ -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 <cstddef>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/core/tags.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
namespace traits
{
template <typename T, std::size_t PointCount, std::size_t DimensionCount>
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

View File

@ -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 <vector>
#include <deque>
#include <list>
#include <utility>
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/mutable_range.hpp>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/core/tags.hpp>
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 <typename P> struct tag< std::pair<P, P> > : util::std_as_linestring {};
// specializations for the std:: containers: vector, deque, list
template <typename P> struct tag< std::vector<P> > : util::std_as_linestring {};
template <typename P> struct tag< std::deque<P> > : util::std_as_linestring {};
template <typename P> struct tag< std::list<P> > : util::std_as_linestring {};
}
#endif
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_LINESTRING_HPP

View File

@ -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 <vector>
#include <deque>
#include <list>
#include <utility>
#include <boost/geometry/core/tags.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
namespace traits
{
// specialization for an iterator pair
template <typename T> struct tag< std::pair<T, T> > { typedef ring_tag type; };
// specialization for the std:: containers: vector, deque, list
template <typename T> struct tag< std::vector<T> > { typedef ring_tag type; };
template <typename T> struct tag< std::deque<T> > { typedef ring_tag type; };
template <typename T> struct tag< std::list<T> > { typedef ring_tag type; };
}
#endif
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_RING_HPP

View File

@ -14,16 +14,12 @@
#ifndef BOOST_GEOMETRY_GEOMETRIES_HPP
#define BOOST_GEOMETRY_GEOMETRIES_HPP
#include <boost/geometry/geometries/adapted/c_array.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/geometries/segment.hpp>
#endif // BOOST_GEOMETRY_GEOMETRIES_HPP

View File

@ -65,14 +65,6 @@
#include <boost/geometry/algorithms/unique.hpp>
#include <boost/geometry/algorithms/within.hpp>
// Include provided geometries
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/segment.hpp>
#include <boost/geometry/geometries/box.hpp>
// Include multi a.o. because it can give weird effects
// if you don't (e.g. area=0 of a multipolygon)
#include <boost/geometry/multi/multi.hpp>

View File

@ -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 <cstddef>
#include <boost/array.hpp>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/multi/core/tags.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
namespace traits
{
template <typename PointType, std::size_t DimensionCount>
struct tag< boost::array<PointType, DimensionCount> >
{
typedef multi_point_tag type;
};
}
#endif
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_BOOST_ARRAY_AS_MULTI_POINT_HPP

View File

@ -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 <cstddef>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/multi/core/tags.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
namespace traits
{
template <typename T, std::size_t PointCount, std::size_t DimensionCount>
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

View File

@ -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 <vector>
#include <deque>
#include <list>
#include <utility>
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/core/tags.hpp>
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 <typename P> struct tag< std::pair<P, P> > : util::std_as_multi_point {};
// specializations for the std:: containers: vector, deque, list
template <typename P> struct tag< std::vector<P> > : util::std_as_multi_point {};
template <typename P> struct tag< std::deque<P> > : util::std_as_multi_point {};
template <typename P> struct tag< std::list<P> > : util::std_as_multi_point {};
}
#endif
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_AS_MULTI_POINT_HPP

View File

@ -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 <boost/geometry/multi/geometries/multi_point.hpp>
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_MULTI_GEOMETRIES_HPP

View File

@ -58,9 +58,6 @@
#include <boost/geometry/multi/algorithms/detail/overlay/get_turns.hpp>
#include <boost/geometry/multi/algorithms/detail/overlay/self_turn_points.hpp>
#include <boost/geometry/multi/geometries/multi_point.hpp>
#include <boost/geometry/multi/geometries/multi_linestring.hpp>
#include <boost/geometry/multi/geometries/multi_polygon.hpp>
#include <boost/geometry/multi/geometries/concepts/check.hpp>
#include <boost/geometry/multi/geometries/concepts/multi_point_concept.hpp>
#include <boost/geometry/multi/geometries/concepts/multi_linestring_concept.hpp>

View File

@ -15,18 +15,17 @@
#include <boost/geometry/algorithms/distance.hpp>
#include <boost/geometry/arithmetic/arithmetic.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/util/select_most_precise.hpp>
#include <boost/geometry/strategies/centroid.hpp>
#include <boost/geometry/strategies/default_distance_result.hpp>
// Helper geometry
#include <boost/geometry/geometries/point.hpp>
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
{

View File

@ -33,11 +33,8 @@
#include <boost/geometry/util/select_coordinate_type.hpp>
// Helper geometries
// Helper geometry (projected point on line)
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/segment.hpp>
namespace boost { namespace geometry