Added boost header
This commit is contained in:
56
test/external/boost/geometry/multi/algorithms/area.hpp
vendored
Normal file
56
test/external/boost/geometry/multi/algorithms/area.hpp
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
// 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_ALGORITHMS_AREA_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_AREA_HPP
|
||||
|
||||
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/area.hpp>
|
||||
#include <boost/geometry/multi/core/point_type.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/multi_sum.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
template <typename MultiGeometry, typename Strategy>
|
||||
struct area<multi_polygon_tag, MultiGeometry, Strategy>
|
||||
: detail::multi_sum
|
||||
<
|
||||
typename Strategy::return_type,
|
||||
MultiGeometry,
|
||||
Strategy,
|
||||
area
|
||||
<
|
||||
polygon_tag,
|
||||
typename boost::range_value<MultiGeometry>::type,
|
||||
Strategy
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_AREA_HPP
|
||||
178
test/external/boost/geometry/multi/algorithms/centroid.hpp
vendored
Normal file
178
test/external/boost/geometry/multi/algorithms/centroid.hpp
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
// 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_ALGORITHMS_CENTROID_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_CENTROID_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/centroid.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/core/point_type.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/multi_sum.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace centroid
|
||||
{
|
||||
|
||||
|
||||
/*!
|
||||
\brief Building block of a multi-point, to be used as Policy in the
|
||||
more generec centroid_multi
|
||||
*/
|
||||
template
|
||||
<
|
||||
typename Point,
|
||||
typename Strategy
|
||||
>
|
||||
struct centroid_multi_point_state
|
||||
{
|
||||
static inline void apply(Point const& point,
|
||||
Strategy const& strategy, typename Strategy::state_type& state)
|
||||
{
|
||||
strategy.apply(point, state);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
\brief Generic implementation which calls a policy to calculate the
|
||||
centroid of the total of its single-geometries
|
||||
\details The Policy is, in general, the single-version, with state. So
|
||||
detail::centroid::centroid_polygon_state is used as a policy for this
|
||||
detail::centroid::centroid_multi
|
||||
|
||||
*/
|
||||
template
|
||||
<
|
||||
typename Multi,
|
||||
typename Point,
|
||||
typename Strategy,
|
||||
typename Policy
|
||||
>
|
||||
struct centroid_multi
|
||||
{
|
||||
static inline void apply(Multi const& multi, Point& centroid,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
// If there is nothing in any of the ranges, it is not possible
|
||||
// to calculate the centroid
|
||||
if (geometry::num_points(multi) == 0)
|
||||
{
|
||||
throw centroid_exception();
|
||||
}
|
||||
|
||||
typename Strategy::state_type state;
|
||||
|
||||
for (typename boost::range_iterator<Multi const>::type
|
||||
it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it)
|
||||
{
|
||||
Policy::apply(*it, strategy, state);
|
||||
}
|
||||
Strategy::result(state, centroid);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
}} // namespace detail::centroid
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiLinestring,
|
||||
typename Point,
|
||||
typename Strategy
|
||||
>
|
||||
struct centroid<multi_linestring_tag, MultiLinestring, Point, Strategy>
|
||||
: detail::centroid::centroid_multi
|
||||
<
|
||||
MultiLinestring,
|
||||
Point,
|
||||
Strategy,
|
||||
detail::centroid::centroid_range_state
|
||||
<
|
||||
typename boost::range_value<MultiLinestring>::type,
|
||||
closed,
|
||||
Strategy
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiPolygon,
|
||||
typename Point,
|
||||
typename Strategy
|
||||
>
|
||||
struct centroid<multi_polygon_tag, MultiPolygon, Point, Strategy>
|
||||
: detail::centroid::centroid_multi
|
||||
<
|
||||
MultiPolygon,
|
||||
Point,
|
||||
Strategy,
|
||||
detail::centroid::centroid_polygon_state
|
||||
<
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
Strategy
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiPoint,
|
||||
typename Point,
|
||||
typename Strategy
|
||||
>
|
||||
struct centroid<multi_point_tag, MultiPoint, Point, Strategy>
|
||||
: detail::centroid::centroid_multi
|
||||
<
|
||||
MultiPoint,
|
||||
Point,
|
||||
Strategy,
|
||||
detail::centroid::centroid_multi_point_state
|
||||
<
|
||||
typename boost::range_value<MultiPoint>::type,
|
||||
Strategy
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_CENTROID_HPP
|
||||
|
||||
43
test/external/boost/geometry/multi/algorithms/clear.hpp
vendored
Normal file
43
test/external/boost/geometry/multi/algorithms/clear.hpp
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
// 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_ALGORITHMS_CLEAR_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_CLEAR_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/algorithms/clear.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename Geometry>
|
||||
struct clear<multi_tag, Geometry>
|
||||
: detail::clear::collection_clear<Geometry>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_CLEAR_HPP
|
||||
133
test/external/boost/geometry/multi/algorithms/convert.hpp
vendored
Normal file
133
test/external/boost/geometry/multi/algorithms/convert.hpp
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
// 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_ALGORITHMS_CONVERT_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_CONVERT_HPP
|
||||
|
||||
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace conversion
|
||||
{
|
||||
|
||||
template <typename Single, typename Multi, typename Policy>
|
||||
struct single_to_multi
|
||||
{
|
||||
static inline void apply(Single const& single, Multi& multi)
|
||||
{
|
||||
traits::resize<Multi>::apply(multi, 1);
|
||||
Policy::apply(single, *boost::begin(multi));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <typename Multi1, typename Multi2, typename Policy>
|
||||
struct multi_to_multi
|
||||
{
|
||||
static inline void apply(Multi1 const& multi1, Multi2& multi2)
|
||||
{
|
||||
traits::resize<Multi2>::apply(multi2, boost::size(multi1));
|
||||
|
||||
typename boost::range_iterator<Multi1 const>::type it1
|
||||
= boost::begin(multi1);
|
||||
typename boost::range_iterator<Multi2>::type it2
|
||||
= boost::begin(multi2);
|
||||
|
||||
for (; it1 != boost::end(multi1); ++it1, ++it2)
|
||||
{
|
||||
Policy::apply(*it1, *it2);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::convert
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
// Dispatch for multi <-> multi, specifying their single-version as policy.
|
||||
// Note that, even if the multi-types are mutually different, their single
|
||||
// version types might be the same and therefore we call boost::is_same again
|
||||
|
||||
template <std::size_t DimensionCount, typename Multi1, typename Multi2>
|
||||
struct convert<false, multi_tag, multi_tag, DimensionCount, Multi1, Multi2>
|
||||
: detail::conversion::multi_to_multi
|
||||
<
|
||||
Multi1,
|
||||
Multi2,
|
||||
convert
|
||||
<
|
||||
boost::is_same
|
||||
<
|
||||
typename boost::range_value<Multi1>::type,
|
||||
typename boost::range_value<Multi2>::type
|
||||
>::value,
|
||||
typename single_tag_of
|
||||
<
|
||||
typename tag<Multi1>::type
|
||||
>::type,
|
||||
typename single_tag_of
|
||||
<
|
||||
typename tag<Multi2>::type
|
||||
>::type,
|
||||
DimensionCount,
|
||||
typename boost::range_value<Multi1>::type,
|
||||
typename boost::range_value<Multi2>::type
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
template <std::size_t DimensionCount, typename SingleTag, typename Single, typename Multi>
|
||||
struct convert<false, SingleTag, multi_tag, DimensionCount, Single, Multi>
|
||||
: detail::conversion::single_to_multi
|
||||
<
|
||||
Single,
|
||||
Multi,
|
||||
convert
|
||||
<
|
||||
false,
|
||||
typename tag<Single>::type,
|
||||
typename single_tag_of
|
||||
<
|
||||
typename tag<Multi>::type
|
||||
>::type,
|
||||
DimensionCount,
|
||||
Single,
|
||||
typename boost::range_value<Multi>::type
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_CONVERT_HPP
|
||||
66
test/external/boost/geometry/multi/algorithms/correct.hpp
vendored
Normal file
66
test/external/boost/geometry/multi/algorithms/correct.hpp
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
// 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_ALGORITHMS_CORRECT_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_CORRECT_HPP
|
||||
|
||||
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/correct.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/modify.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename MultiPoint>
|
||||
struct correct<multi_point_tag, MultiPoint>
|
||||
: detail::correct::correct_nop<MultiPoint>
|
||||
{};
|
||||
|
||||
|
||||
template <typename MultiLineString>
|
||||
struct correct<multi_linestring_tag, MultiLineString>
|
||||
: detail::correct::correct_nop<MultiLineString>
|
||||
{};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct correct<multi_polygon_tag, Geometry>
|
||||
: detail::multi_modify
|
||||
<
|
||||
Geometry,
|
||||
detail::correct::correct_polygon
|
||||
<
|
||||
typename boost::range_value<Geometry>::type
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_CORRECT_HPP
|
||||
68
test/external/boost/geometry/multi/algorithms/covered_by.hpp
vendored
Normal file
68
test/external/boost/geometry/multi/algorithms/covered_by.hpp
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
// 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_ALGORITHMS_COVERED_BY_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_COVERED_BY_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/multi/core/closure.hpp>
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/multi/algorithms/within.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename Point, typename MultiPolygon, typename Strategy>
|
||||
struct covered_by<point_tag, multi_polygon_tag, Point, MultiPolygon, Strategy>
|
||||
{
|
||||
static inline bool apply(Point const& point,
|
||||
MultiPolygon const& multi_polygon, Strategy const& strategy)
|
||||
{
|
||||
return detail::within::geometry_multi_within_code
|
||||
<
|
||||
Point,
|
||||
MultiPolygon,
|
||||
Strategy,
|
||||
detail::within::point_in_polygon
|
||||
<
|
||||
Point,
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
order_as_direction
|
||||
<
|
||||
geometry::point_order<MultiPolygon>::value
|
||||
>::value,
|
||||
geometry::closure<MultiPolygon>::value,
|
||||
Strategy
|
||||
>
|
||||
>::apply(point, multi_polygon, strategy) >= 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
|
||||
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_COVERED_BY_HPP
|
||||
86
test/external/boost/geometry/multi/algorithms/detail/for_each_range.hpp
vendored
Normal file
86
test/external/boost/geometry/multi/algorithms/detail/for_each_range.hpp
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
// 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_ALGORITHMS_DETAIL_FOR_EACH_RANGE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_FOR_EACH_RANGE_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/for_each_range.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace for_each
|
||||
{
|
||||
|
||||
|
||||
template <typename Multi, typename Actor, bool IsConst>
|
||||
struct fe_range_multi
|
||||
{
|
||||
static inline void apply(
|
||||
typename add_const_if_c<IsConst, Multi>::type& multi,
|
||||
Actor& actor)
|
||||
{
|
||||
for(BOOST_AUTO_TPL(it, boost::begin(multi)); it != boost::end(multi); ++it)
|
||||
{
|
||||
geometry::detail::for_each_range(*it, actor);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
}} // namespace detail::for_each
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiPoint, typename Actor, bool IsConst>
|
||||
struct for_each_range<multi_point_tag, MultiPoint, Actor, IsConst>
|
||||
: detail::for_each::fe_range_range<MultiPoint, Actor, IsConst>
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename Actor, bool IsConst>
|
||||
struct for_each_range<multi_linestring_tag, Geometry, Actor, IsConst>
|
||||
:
|
||||
detail::for_each::fe_range_multi<Geometry, Actor, IsConst>
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename Actor, bool IsConst>
|
||||
struct for_each_range<multi_polygon_tag, Geometry, Actor, IsConst>
|
||||
:
|
||||
detail::for_each::fe_range_multi<Geometry, Actor, IsConst>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_FOR_EACH_RANGE_HPP
|
||||
53
test/external/boost/geometry/multi/algorithms/detail/modify.hpp
vendored
Normal file
53
test/external/boost/geometry/multi/algorithms/detail/modify.hpp
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
// 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_ALGORITHMS_DETAIL_MODIFY_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_MODIFY_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiGeometry, typename Policy>
|
||||
struct multi_modify
|
||||
{
|
||||
static inline void apply(MultiGeometry& multi)
|
||||
{
|
||||
typedef typename boost::range_iterator<MultiGeometry>::type iterator_type;
|
||||
for (iterator_type it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it)
|
||||
{
|
||||
Policy::apply(*it);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_MODIFY_HPP
|
||||
52
test/external/boost/geometry/multi/algorithms/detail/modify_with_predicate.hpp
vendored
Normal file
52
test/external/boost/geometry/multi/algorithms/detail/modify_with_predicate.hpp
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
// 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_ALGORITHMS_DETAIL_MODIFY_WITH_PREDICATE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_MODIFY_WITH_PREDICATE_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename MultiGeometry, typename Predicate, typename Policy>
|
||||
struct multi_modify_with_predicate
|
||||
{
|
||||
static inline void apply(MultiGeometry& multi, Predicate const& predicate)
|
||||
{
|
||||
typedef typename boost::range_iterator<MultiGeometry>::type iterator_type;
|
||||
for (iterator_type it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it)
|
||||
{
|
||||
Policy::apply(*it, predicate);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_MODIFY_WITH_PREDICATE_HPP
|
||||
58
test/external/boost/geometry/multi/algorithms/detail/multi_sum.hpp
vendored
Normal file
58
test/external/boost/geometry/multi/algorithms/detail/multi_sum.hpp
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
// 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_SUM_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_SUM_HPP
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename ReturnType,
|
||||
typename MultiGeometry,
|
||||
typename Strategy,
|
||||
typename Policy
|
||||
>
|
||||
struct multi_sum
|
||||
{
|
||||
static inline ReturnType apply(MultiGeometry const& geometry, Strategy const& strategy)
|
||||
{
|
||||
ReturnType sum = ReturnType();
|
||||
for (typename boost::range_iterator
|
||||
<
|
||||
MultiGeometry const
|
||||
>::type it = boost::begin(geometry);
|
||||
it != boost::end(geometry);
|
||||
++it)
|
||||
{
|
||||
sum += Policy::apply(*it, strategy);
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
#endif
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_SUM_HPP
|
||||
101
test/external/boost/geometry/multi/algorithms/detail/overlay/copy_segment_point.hpp
vendored
Normal file
101
test/external/boost/geometry/multi/algorithms/detail/overlay/copy_segment_point.hpp
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENT_POINT_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENT_POINT_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace copy_segments
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiGeometry,
|
||||
typename SegmentIdentifier,
|
||||
typename PointOut,
|
||||
typename Policy
|
||||
>
|
||||
struct copy_segment_point_multi
|
||||
{
|
||||
static inline bool apply(MultiGeometry const& multi,
|
||||
SegmentIdentifier const& seg_id, bool second,
|
||||
PointOut& point)
|
||||
{
|
||||
|
||||
BOOST_ASSERT
|
||||
(
|
||||
seg_id.multi_index >= 0
|
||||
&& seg_id.multi_index < boost::size(multi)
|
||||
);
|
||||
|
||||
// Call the single-version
|
||||
return Policy::apply(multi[seg_id.multi_index], seg_id, second, point);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::copy_segments
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiGeometry,
|
||||
bool Reverse,
|
||||
typename SegmentIdentifier,
|
||||
typename PointOut
|
||||
>
|
||||
struct copy_segment_point
|
||||
<
|
||||
multi_polygon_tag,
|
||||
MultiGeometry,
|
||||
Reverse,
|
||||
SegmentIdentifier,
|
||||
PointOut
|
||||
>
|
||||
: detail::copy_segments::copy_segment_point_multi
|
||||
<
|
||||
MultiGeometry,
|
||||
SegmentIdentifier,
|
||||
PointOut,
|
||||
detail::copy_segments::copy_segment_point_polygon
|
||||
<
|
||||
typename boost::range_value<MultiGeometry>::type,
|
||||
Reverse,
|
||||
SegmentIdentifier,
|
||||
PointOut
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENT_POINT_HPP
|
||||
104
test/external/boost/geometry/multi/algorithms/detail/overlay/copy_segments.hpp
vendored
Normal file
104
test/external/boost/geometry/multi/algorithms/detail/overlay/copy_segments.hpp
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENTS_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENTS_HPP
|
||||
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/ring_type.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace copy_segments
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiGeometry,
|
||||
typename SegmentIdentifier,
|
||||
typename RangeOut,
|
||||
typename Policy
|
||||
>
|
||||
struct copy_segments_multi
|
||||
{
|
||||
static inline void apply(MultiGeometry const& multi_geometry,
|
||||
SegmentIdentifier const& seg_id, int to_index,
|
||||
RangeOut& current_output)
|
||||
{
|
||||
|
||||
BOOST_ASSERT
|
||||
(
|
||||
seg_id.multi_index >= 0
|
||||
&& seg_id.multi_index < boost::size(multi_geometry)
|
||||
);
|
||||
|
||||
// Call the single-version
|
||||
Policy::apply(multi_geometry[seg_id.multi_index],
|
||||
seg_id, to_index, current_output);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::copy_segments
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiPolygon,
|
||||
bool Reverse,
|
||||
typename SegmentIdentifier,
|
||||
typename RangeOut
|
||||
>
|
||||
struct copy_segments
|
||||
<
|
||||
multi_polygon_tag,
|
||||
MultiPolygon,
|
||||
Reverse,
|
||||
SegmentIdentifier,
|
||||
RangeOut
|
||||
>
|
||||
: detail::copy_segments::copy_segments_multi
|
||||
<
|
||||
MultiPolygon,
|
||||
SegmentIdentifier,
|
||||
RangeOut,
|
||||
detail::copy_segments::copy_segments_polygon
|
||||
<
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
Reverse,
|
||||
SegmentIdentifier,
|
||||
RangeOut
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENTS_HPP
|
||||
54
test/external/boost/geometry/multi/algorithms/detail/overlay/get_ring.hpp
vendored
Normal file
54
test/external/boost/geometry/multi/algorithms/detail/overlay/get_ring.hpp
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_GET_RING_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_GET_RING_HPP
|
||||
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_ring.hpp>
|
||||
#include <boost/geometry/multi/core/ring_type.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace overlay
|
||||
{
|
||||
|
||||
template<>
|
||||
struct get_ring<multi_polygon_tag>
|
||||
{
|
||||
template<typename MultiPolygon>
|
||||
static inline typename ring_type<MultiPolygon>::type const& apply(
|
||||
ring_identifier const& id,
|
||||
MultiPolygon const& multi_polygon)
|
||||
{
|
||||
BOOST_ASSERT
|
||||
(
|
||||
id.multi_index >= 0
|
||||
&& id.multi_index < boost::size(multi_polygon)
|
||||
);
|
||||
return get_ring<polygon_tag>::apply(id,
|
||||
multi_polygon[id.multi_index]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
}} // namespace detail::overlay
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_GET_RING_HPP
|
||||
111
test/external/boost/geometry/multi/algorithms/detail/overlay/get_turns.hpp
vendored
Normal file
111
test/external/boost/geometry/multi/algorithms/detail/overlay/get_turns.hpp
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_GET_TURNS_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_GET_TURNS_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/multi/core/ring_type.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/distance.hpp>
|
||||
#include <boost/geometry/multi/views/detail/range_type.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace get_turns
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename Multi, typename Box,
|
||||
bool Reverse, bool ReverseBox,
|
||||
typename Turns,
|
||||
typename TurnPolicy,
|
||||
typename InterruptPolicy
|
||||
>
|
||||
struct get_turns_multi_polygon_cs
|
||||
{
|
||||
static inline void apply(
|
||||
int source_id1, Multi const& multi,
|
||||
int source_id2, Box const& box,
|
||||
Turns& turns, InterruptPolicy& interrupt_policy)
|
||||
{
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
Multi const
|
||||
>::type iterator_type;
|
||||
|
||||
int i = 0;
|
||||
for (iterator_type it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it, ++i)
|
||||
{
|
||||
// Call its single version
|
||||
get_turns_polygon_cs
|
||||
<
|
||||
typename boost::range_value<Multi>::type, Box,
|
||||
Reverse, ReverseBox,
|
||||
Turns, TurnPolicy, InterruptPolicy
|
||||
>::apply(source_id1, *it, source_id2, box,
|
||||
turns, interrupt_policy, i);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}} // namespace detail::get_turns
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiPolygon,
|
||||
typename Box,
|
||||
bool ReverseMultiPolygon, bool ReverseBox,
|
||||
typename Turns,
|
||||
typename TurnPolicy,
|
||||
typename InterruptPolicy
|
||||
>
|
||||
struct get_turns
|
||||
<
|
||||
multi_polygon_tag, box_tag,
|
||||
MultiPolygon, Box,
|
||||
ReverseMultiPolygon, ReverseBox,
|
||||
Turns,
|
||||
TurnPolicy, InterruptPolicy
|
||||
>
|
||||
: detail::get_turns::get_turns_multi_polygon_cs
|
||||
<
|
||||
MultiPolygon, Box,
|
||||
ReverseMultiPolygon, ReverseBox,
|
||||
Turns,
|
||||
TurnPolicy, InterruptPolicy
|
||||
>
|
||||
{};
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_GET_TURNS_HPP
|
||||
62
test/external/boost/geometry/multi/algorithms/detail/overlay/select_rings.hpp
vendored
Normal file
62
test/external/boost/geometry/multi/algorithms/detail/overlay/select_rings.hpp
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_SELECT_RINGS_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_SELECT_RINGS_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/select_rings.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace overlay
|
||||
{
|
||||
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename Multi>
|
||||
struct select_rings<multi_polygon_tag, Multi>
|
||||
{
|
||||
template <typename Geometry, typename Map>
|
||||
static inline void apply(Multi const& multi, Geometry const& geometry,
|
||||
ring_identifier id, Map& map, bool midpoint)
|
||||
{
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
Multi const
|
||||
>::type iterator_type;
|
||||
|
||||
typedef select_rings<polygon_tag, typename boost::range_value<Multi>::type> per_polygon;
|
||||
|
||||
id.multi_index = 0;
|
||||
for (iterator_type it = boost::begin(multi); it != boost::end(multi); ++it)
|
||||
{
|
||||
id.ring_index = -1;
|
||||
per_polygon::apply(*it, geometry, id, map, midpoint);
|
||||
id.multi_index++;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}} // namespace detail::overlay
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_SELECT_RINGS_HPP
|
||||
56
test/external/boost/geometry/multi/algorithms/detail/overlay/self_turn_points.hpp
vendored
Normal file
56
test/external/boost/geometry/multi/algorithms/detail/overlay/self_turn_points.hpp
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_SELF_TURN_POINTS_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_SELF_TURN_POINTS_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiPolygon,
|
||||
typename Turns,
|
||||
typename TurnPolicy,
|
||||
typename InterruptPolicy
|
||||
>
|
||||
struct self_get_turn_points
|
||||
<
|
||||
multi_polygon_tag, MultiPolygon,
|
||||
Turns,
|
||||
TurnPolicy, InterruptPolicy
|
||||
>
|
||||
: detail::self_get_turn_points::get_turns
|
||||
<
|
||||
MultiPolygon,
|
||||
Turns,
|
||||
TurnPolicy,
|
||||
InterruptPolicy
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_OVERLAY_SELF_TURN_POINTS_HPP
|
||||
95
test/external/boost/geometry/multi/algorithms/detail/point_on_border.hpp
vendored
Normal file
95
test/external/boost/geometry/multi/algorithms/detail/point_on_border.hpp
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
// 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_ALGORITHMS_DETAIL_POINT_ON_BORDER_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_POINT_ON_BORDER_HPP
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/algorithms/detail/point_on_border.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace point_on_border
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiGeometry,
|
||||
typename Point,
|
||||
typename Policy
|
||||
>
|
||||
struct point_on_multi
|
||||
{
|
||||
static inline bool apply(MultiGeometry const& multi, Point& point)
|
||||
{
|
||||
// Take a point on the first multi-geometry
|
||||
// (i.e. the first that is not empty)
|
||||
for (typename boost::range_iterator
|
||||
<
|
||||
MultiGeometry const
|
||||
>::type it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it)
|
||||
{
|
||||
if (Policy::apply(*it, point))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}} // namespace detail::point_on_border
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template<typename Multi, typename Point>
|
||||
struct point_on_border<multi_polygon_tag, Multi, Point>
|
||||
: detail::point_on_border::point_on_multi
|
||||
<
|
||||
Multi,
|
||||
Point,
|
||||
detail::point_on_border::point_on_polygon
|
||||
<
|
||||
typename boost::range_value<Multi>::type,
|
||||
Point
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_POINT_ON_BORDER_HPP
|
||||
90
test/external/boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp
vendored
Normal file
90
test/external/boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
// 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_ALGORITHMS_DETAIL_SECTIONS_RANGE_BY_SECTION_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_SECTIONS_RANGE_BY_SECTION_HPP
|
||||
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/multi/core/ring_type.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/range_by_section.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace section
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiGeometry,
|
||||
typename Section,
|
||||
typename Policy
|
||||
>
|
||||
struct full_section_multi
|
||||
{
|
||||
static inline typename ring_return_type<MultiGeometry const>::type apply(
|
||||
MultiGeometry const& multi, Section const& section)
|
||||
{
|
||||
BOOST_ASSERT
|
||||
(
|
||||
section.ring_id.multi_index >= 0
|
||||
&& section.ring_id.multi_index < boost::size(multi)
|
||||
);
|
||||
|
||||
return Policy::apply(multi[section.ring_id.multi_index], section);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::section
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiPolygon, typename Section>
|
||||
struct range_by_section<multi_polygon_tag, MultiPolygon, Section>
|
||||
: detail::section::full_section_multi
|
||||
<
|
||||
MultiPolygon,
|
||||
Section,
|
||||
detail::section::full_section_polygon
|
||||
<
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
Section
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_SECTIONS_RANGE_BY_SECTION_HPP
|
||||
95
test/external/boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp
vendored
Normal file
95
test/external/boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
// 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_ALGORITHMS_DETAIL_SECTIONS_SECTIONALIZE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_SECTIONS_SECTIONALIZE_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/concept/requires.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace sectionalize
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiGeometry, typename Sections, std::size_t DimensionCount, typename Policy>
|
||||
struct sectionalize_multi
|
||||
{
|
||||
static inline void apply(MultiGeometry const& multi, Sections& sections, ring_identifier ring_id)
|
||||
{
|
||||
ring_id.multi_index = 0;
|
||||
for (typename boost::range_iterator<MultiGeometry const>::type
|
||||
it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it, ++ring_id.multi_index)
|
||||
{
|
||||
Policy::apply(*it, sections, ring_id);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::sectionalize
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiPolygon,
|
||||
bool Reverse,
|
||||
typename Sections,
|
||||
std::size_t DimensionCount,
|
||||
std::size_t MaxCount
|
||||
>
|
||||
struct sectionalize<multi_polygon_tag, MultiPolygon, Reverse, Sections, DimensionCount, MaxCount>
|
||||
: detail::sectionalize::sectionalize_multi
|
||||
<
|
||||
MultiPolygon,
|
||||
Sections,
|
||||
DimensionCount,
|
||||
detail::sectionalize::sectionalize_polygon
|
||||
<
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
Reverse,
|
||||
Sections,
|
||||
DimensionCount,
|
||||
MaxCount
|
||||
>
|
||||
>
|
||||
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DETAIL_SECTIONS_SECTIONALIZE_HPP
|
||||
130
test/external/boost/geometry/multi/algorithms/distance.hpp
vendored
Normal file
130
test/external/boost/geometry/multi/algorithms/distance.hpp
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
// 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_ALGORITHMS_DISTANCE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_DISTANCE_HPP
|
||||
|
||||
|
||||
#include <boost/numeric/conversion/bounds.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/multi/core/geometry_id.hpp>
|
||||
#include <boost/geometry/multi/core/point_type.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/distance.hpp>
|
||||
#include <boost/geometry/util/select_coordinate_type.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace distance
|
||||
{
|
||||
|
||||
|
||||
template<typename Geometry, typename MultiGeometry, typename Strategy>
|
||||
struct distance_single_to_multi
|
||||
{
|
||||
typedef typename strategy::distance::services::return_type<Strategy>::type return_type;
|
||||
|
||||
static inline return_type apply(Geometry const& geometry,
|
||||
MultiGeometry const& multi,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
bool first = true;
|
||||
return_type mindist;
|
||||
|
||||
for(typename range_iterator<MultiGeometry const>::type it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it)
|
||||
{
|
||||
return_type dist = geometry::distance(geometry, *it);
|
||||
if (first || dist < mindist)
|
||||
{
|
||||
mindist = dist;
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
||||
return mindist;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Multi1, typename Multi2, typename Strategy>
|
||||
struct distance_multi_to_multi
|
||||
{
|
||||
typedef typename strategy::distance::services::return_type<Strategy>::type return_type;
|
||||
|
||||
static inline return_type apply(Multi1 const& multi1,
|
||||
Multi2 const& multi2, Strategy const& strategy)
|
||||
{
|
||||
bool first = true;
|
||||
return_type mindist;
|
||||
|
||||
for(typename range_iterator<Multi1 const>::type it = boost::begin(multi1);
|
||||
it != boost::end(multi1);
|
||||
++it)
|
||||
{
|
||||
return_type dist = distance_single_to_multi
|
||||
<
|
||||
typename range_value<Multi1>::type,
|
||||
Multi2,
|
||||
Strategy
|
||||
>::apply(*it, multi2, strategy);
|
||||
if (first || dist < mindist)
|
||||
{
|
||||
mindist = dist;
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
||||
return mindist;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::distance
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename SingleGeometryTag,
|
||||
typename G1,
|
||||
typename G2,
|
||||
typename Strategy
|
||||
>
|
||||
struct distance<SingleGeometryTag, multi_tag, G1, G2, strategy_tag_distance_point_point, Strategy>
|
||||
: detail::distance::distance_single_to_multi<G1, G2, Strategy>
|
||||
{};
|
||||
|
||||
template <typename G1, typename G2, typename Strategy>
|
||||
struct distance<multi_tag, multi_tag, G1, G2, strategy_tag_distance_point_point, Strategy>
|
||||
: detail::distance::distance_multi_to_multi<G1, G2, Strategy>
|
||||
{};
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_DISTANCE_HPP
|
||||
117
test/external/boost/geometry/multi/algorithms/envelope.hpp
vendored
Normal file
117
test/external/boost/geometry/multi/algorithms/envelope.hpp
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
// 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_ALGORITHMS_ENVELOPE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_ENVELOPE_HPP
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/core/exterior_ring.hpp>
|
||||
#include <boost/geometry/algorithms/envelope.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/point_type.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
|
||||
namespace detail { namespace envelope
|
||||
{
|
||||
|
||||
|
||||
template<typename MultiLinestring, typename Box>
|
||||
struct envelope_multi_linestring
|
||||
{
|
||||
static inline void apply(MultiLinestring const& mp, Box& mbr)
|
||||
{
|
||||
assign_inverse(mbr);
|
||||
for (typename boost::range_iterator<MultiLinestring const>::type
|
||||
it = mp.begin();
|
||||
it != mp.end();
|
||||
++it)
|
||||
{
|
||||
envelope_range_additional(*it, mbr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// version for multi_polygon: outer ring's of all polygons
|
||||
template<typename MultiPolygon, typename Box>
|
||||
struct envelope_multi_polygon
|
||||
{
|
||||
static inline void apply(MultiPolygon const& mp, Box& mbr)
|
||||
{
|
||||
assign_inverse(mbr);
|
||||
for (typename boost::range_const_iterator<MultiPolygon>::type
|
||||
it = mp.begin();
|
||||
it != mp.end();
|
||||
++it)
|
||||
{
|
||||
envelope_range_additional(exterior_ring(*it), mbr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::envelope
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename Multi, typename Box,
|
||||
typename StrategyLess, typename StrategyGreater
|
||||
>
|
||||
struct envelope<multi_point_tag, box_tag, Multi, Box, StrategyLess, StrategyGreater>
|
||||
: detail::envelope::envelope_range<Multi, Box>
|
||||
{};
|
||||
|
||||
template
|
||||
<
|
||||
typename Multi, typename Box,
|
||||
typename StrategyLess, typename StrategyGreater
|
||||
>
|
||||
struct envelope<multi_linestring_tag, box_tag, Multi, Box, StrategyLess, StrategyGreater>
|
||||
: detail::envelope::envelope_multi_linestring<Multi, Box>
|
||||
{};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Multi, typename Box,
|
||||
typename StrategyLess, typename StrategyGreater
|
||||
>
|
||||
struct envelope<multi_polygon_tag, box_tag, Multi, Box, StrategyLess, StrategyGreater>
|
||||
: detail::envelope::envelope_multi_polygon<Multi, Box>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_ENVELOPE_HPP
|
||||
70
test/external/boost/geometry/multi/algorithms/equals.hpp
vendored
Normal file
70
test/external/boost/geometry/multi/algorithms/equals.hpp
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
// 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_ALGORITHMS_EQUALS_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_EQUALS_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/multi/core/geometry_id.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/equals.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiPolygon1, typename MultiPolygon2>
|
||||
struct equals
|
||||
<
|
||||
multi_polygon_tag, multi_polygon_tag,
|
||||
MultiPolygon1, MultiPolygon2,
|
||||
2
|
||||
>
|
||||
: detail::equals::equals_by_collection
|
||||
<
|
||||
MultiPolygon1, MultiPolygon2,
|
||||
detail::equals::area_check
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template <typename Polygon, typename MultiPolygon>
|
||||
struct equals
|
||||
<
|
||||
polygon_tag, multi_polygon_tag,
|
||||
Polygon, MultiPolygon,
|
||||
2
|
||||
>
|
||||
: detail::equals::equals_by_collection
|
||||
<
|
||||
Polygon, MultiPolygon,
|
||||
detail::equals::area_check
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_EQUALS_HPP
|
||||
|
||||
129
test/external/boost/geometry/multi/algorithms/for_each.hpp
vendored
Normal file
129
test/external/boost/geometry/multi/algorithms/for_each.hpp
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
// 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_ALGORITHMS_FOR_EACH_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_FOR_EACH_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/multi/core/point_type.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/algorithms/for_each.hpp>
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace for_each
|
||||
{
|
||||
|
||||
// Implementation of multi, for both point and segment,
|
||||
// just calling the single version.
|
||||
template
|
||||
<
|
||||
typename MultiGeometry,
|
||||
typename Functor,
|
||||
bool IsConst,
|
||||
typename Policy
|
||||
>
|
||||
struct for_each_multi
|
||||
{
|
||||
static inline Functor apply(
|
||||
typename add_const_if_c<IsConst, MultiGeometry>::type& multi,
|
||||
Functor f)
|
||||
{
|
||||
for(BOOST_AUTO_TPL(it, boost::begin(multi)); it != boost::end(multi); ++it)
|
||||
{
|
||||
f = Policy::apply(*it, f);
|
||||
}
|
||||
return f;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::for_each
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiGeometry,
|
||||
typename Functor,
|
||||
bool IsConst
|
||||
>
|
||||
struct for_each_point<multi_tag, MultiGeometry, Functor, IsConst>
|
||||
: detail::for_each::for_each_multi
|
||||
<
|
||||
MultiGeometry,
|
||||
Functor,
|
||||
IsConst,
|
||||
// Specify the dispatch of the single-version as policy
|
||||
for_each_point
|
||||
<
|
||||
typename single_tag_of
|
||||
<
|
||||
typename tag<MultiGeometry>::type
|
||||
>::type,
|
||||
typename boost::range_value<MultiGeometry>::type,
|
||||
Functor,
|
||||
IsConst
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiGeometry,
|
||||
typename Functor,
|
||||
bool IsConst
|
||||
>
|
||||
struct for_each_segment<multi_tag, MultiGeometry, Functor, IsConst>
|
||||
: detail::for_each::for_each_multi
|
||||
<
|
||||
MultiGeometry,
|
||||
Functor,
|
||||
IsConst,
|
||||
// Specify the dispatch of the single-version as policy
|
||||
for_each_segment
|
||||
<
|
||||
typename single_tag_of
|
||||
<
|
||||
typename tag<MultiGeometry>::type
|
||||
>::type,
|
||||
typename boost::range_value<MultiGeometry>::type,
|
||||
Functor,
|
||||
IsConst
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_FOR_EACH_HPP
|
||||
232
test/external/boost/geometry/multi/algorithms/intersection.hpp
vendored
Normal file
232
test/external/boost/geometry/multi/algorithms/intersection.hpp
vendored
Normal file
@@ -0,0 +1,232 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_MULTI_ALGORITHMS_INTERSECTION_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_INTERSECTION_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/multi/core/closure.hpp>
|
||||
#include <boost/geometry/multi/core/geometry_id.hpp>
|
||||
#include <boost/geometry/multi/core/is_areal.hpp>
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/algorithms/envelope.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/get_ring.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/get_turns.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/copy_segments.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/copy_segment_point.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/select_rings.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/intersection.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace intersection
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiLinestring1, typename MultiLinestring2,
|
||||
typename OutputIterator, typename PointOut,
|
||||
typename Strategy
|
||||
>
|
||||
struct intersection_multi_linestring_multi_linestring_point
|
||||
{
|
||||
static inline OutputIterator apply(MultiLinestring1 const& ml1,
|
||||
MultiLinestring2 const& ml2, OutputIterator out,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
// Note, this loop is quadratic w.r.t. number of linestrings per input.
|
||||
// Future Enhancement: first do the sections of each, then intersect.
|
||||
for (typename boost::range_iterator
|
||||
<
|
||||
MultiLinestring1 const
|
||||
>::type it1 = boost::begin(ml1);
|
||||
it1 != boost::end(ml1);
|
||||
++it1)
|
||||
{
|
||||
for (typename boost::range_iterator
|
||||
<
|
||||
MultiLinestring2 const
|
||||
>::type it2 = boost::begin(ml2);
|
||||
it2 != boost::end(ml2);
|
||||
++it2)
|
||||
{
|
||||
out = intersection_linestring_linestring_point
|
||||
<
|
||||
typename boost::range_value<MultiLinestring1>::type,
|
||||
typename boost::range_value<MultiLinestring2>::type,
|
||||
OutputIterator, PointOut, Strategy
|
||||
>::apply(*it1, *it2, out, strategy);
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Linestring, typename MultiLinestring,
|
||||
typename OutputIterator, typename PointOut,
|
||||
typename Strategy
|
||||
>
|
||||
struct intersection_linestring_multi_linestring_point
|
||||
{
|
||||
static inline OutputIterator apply(Linestring const& linestring,
|
||||
MultiLinestring const& ml, OutputIterator out,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
for (typename boost::range_iterator
|
||||
<
|
||||
MultiLinestring const
|
||||
>::type it = boost::begin(ml);
|
||||
it != boost::end(ml);
|
||||
++it)
|
||||
{
|
||||
out = intersection_linestring_linestring_point
|
||||
<
|
||||
Linestring,
|
||||
typename boost::range_value<MultiLinestring>::type,
|
||||
OutputIterator, PointOut, Strategy
|
||||
>::apply(linestring, *it, out, strategy);
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiLinestring, typename Box,
|
||||
typename OutputIterator, typename LinestringOut,
|
||||
typename Strategy
|
||||
>
|
||||
struct clip_multi_linestring
|
||||
{
|
||||
static inline OutputIterator apply(MultiLinestring const& multi_linestring,
|
||||
Box const& box, OutputIterator out, Strategy const& strategy)
|
||||
{
|
||||
typedef typename point_type<LinestringOut>::type point_type;
|
||||
strategy::intersection::liang_barsky<Box, point_type> lb_strategy;
|
||||
for (typename boost::range_iterator<MultiLinestring const>::type it
|
||||
= boost::begin(multi_linestring);
|
||||
it != boost::end(multi_linestring); ++it)
|
||||
{
|
||||
out = detail::intersection::clip_range_with_box
|
||||
<LinestringOut>(box, *it, out, lb_strategy);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::intersection
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
// Linear
|
||||
template
|
||||
<
|
||||
typename MultiLinestring1, typename MultiLinestring2,
|
||||
bool Reverse1, bool Reverse2, bool ReverseOut,
|
||||
typename OutputIterator, typename GeometryOut,
|
||||
overlay_type OverlayType,
|
||||
typename Strategy
|
||||
>
|
||||
struct intersection_insert
|
||||
<
|
||||
multi_linestring_tag, multi_linestring_tag, point_tag,
|
||||
false, false, false,
|
||||
MultiLinestring1, MultiLinestring2,
|
||||
Reverse1, Reverse2, ReverseOut,
|
||||
OutputIterator, GeometryOut,
|
||||
OverlayType,
|
||||
Strategy
|
||||
> : detail::intersection::intersection_multi_linestring_multi_linestring_point
|
||||
<
|
||||
MultiLinestring1, MultiLinestring2,
|
||||
OutputIterator, GeometryOut,
|
||||
Strategy
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Linestring, typename MultiLinestring,
|
||||
typename OutputIterator, typename GeometryOut,
|
||||
bool Reverse1, bool Reverse2, bool ReverseOut,
|
||||
overlay_type OverlayType,
|
||||
typename Strategy
|
||||
>
|
||||
struct intersection_insert
|
||||
<
|
||||
linestring_tag, multi_linestring_tag, point_tag,
|
||||
false, false, false,
|
||||
Linestring, MultiLinestring,
|
||||
Reverse1, Reverse2, ReverseOut,
|
||||
OutputIterator, GeometryOut,
|
||||
OverlayType,
|
||||
Strategy
|
||||
> : detail::intersection::intersection_linestring_multi_linestring_point
|
||||
<
|
||||
Linestring, MultiLinestring,
|
||||
OutputIterator, GeometryOut,
|
||||
Strategy
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename MultiLinestring, typename Box,
|
||||
bool Reverse1, bool Reverse2, bool ReverseOut,
|
||||
typename OutputIterator, typename GeometryOut,
|
||||
overlay_type OverlayType,
|
||||
typename Strategy
|
||||
>
|
||||
struct intersection_insert
|
||||
<
|
||||
multi_linestring_tag, box_tag, linestring_tag,
|
||||
false, true, false,
|
||||
MultiLinestring, Box,
|
||||
Reverse1, Reverse2, ReverseOut,
|
||||
OutputIterator, GeometryOut,
|
||||
OverlayType,
|
||||
Strategy
|
||||
> : detail::intersection::clip_multi_linestring
|
||||
<
|
||||
MultiLinestring, Box,
|
||||
OutputIterator, GeometryOut,
|
||||
Strategy
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_INTERSECTION_HPP
|
||||
|
||||
56
test/external/boost/geometry/multi/algorithms/length.hpp
vendored
Normal file
56
test/external/boost/geometry/multi/algorithms/length.hpp
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
// 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_ALGORITHMS_LENGTH_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_LENGTH_HPP
|
||||
|
||||
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/length.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/multi_sum.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename MultiLinestring, typename Strategy>
|
||||
struct length<multi_linestring_tag, MultiLinestring, Strategy>
|
||||
: detail::multi_sum
|
||||
<
|
||||
typename default_length_result<MultiLinestring>::type,
|
||||
MultiLinestring,
|
||||
Strategy,
|
||||
detail::length::range_length
|
||||
<
|
||||
typename boost::range_value<MultiLinestring>::type,
|
||||
Strategy,
|
||||
closed // no need to close it explicitly
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_LENGTH_HPP
|
||||
51
test/external/boost/geometry/multi/algorithms/num_geometries.hpp
vendored
Normal file
51
test/external/boost/geometry/multi/algorithms/num_geometries.hpp
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
// 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_ALGORITHMS_NUM_GEOMETRIES_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_NUM_GEOMETRIES_HPP
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_geometries.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename MultiGeometry>
|
||||
struct num_geometries<multi_tag, MultiGeometry>
|
||||
{
|
||||
static inline std::size_t apply(MultiGeometry const& multi_geometry)
|
||||
{
|
||||
return boost::size(multi_geometry);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_NUM_GEOMETRIES_HPP
|
||||
61
test/external/boost/geometry/multi/algorithms/num_interior_rings.hpp
vendored
Normal file
61
test/external/boost/geometry/multi/algorithms/num_interior_rings.hpp
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
// 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_ALGORITHMS_NUM_INTERIOR_RINGS_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_NUM_INTERIOR_RINGS_HPP
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_interior_rings.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiPolygon>
|
||||
struct num_interior_rings<multi_polygon_tag, MultiPolygon>
|
||||
{
|
||||
static inline std::size_t apply(MultiPolygon const& multi_polygon)
|
||||
{
|
||||
std::size_t n = 0;
|
||||
for (typename boost::range_iterator<MultiPolygon const>::type
|
||||
it = boost::begin(multi_polygon);
|
||||
it != boost::end(multi_polygon);
|
||||
++it)
|
||||
{
|
||||
n += geometry::num_interior_rings(*it);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_NUM_INTERIOR_RINGS_HPP
|
||||
81
test/external/boost/geometry/multi/algorithms/num_points.hpp
vendored
Normal file
81
test/external/boost/geometry/multi/algorithms/num_points.hpp
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
// 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_ALGORITHMS_NUM_POINTS_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_NUM_POINTS_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/algorithms/num_points.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace num_points
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiGeometry>
|
||||
struct multi_count
|
||||
{
|
||||
static inline size_t apply(MultiGeometry const& geometry, bool add_for_open)
|
||||
{
|
||||
typedef typename boost::range_value<MultiGeometry>::type geometry_type;
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
MultiGeometry const
|
||||
>::type iterator_type;
|
||||
|
||||
std::size_t n = 0;
|
||||
for (iterator_type it = boost::begin(geometry);
|
||||
it != boost::end(geometry);
|
||||
++it)
|
||||
{
|
||||
n += dispatch::num_points
|
||||
<
|
||||
typename tag<geometry_type>::type,
|
||||
geometry_type
|
||||
>::apply(*it, add_for_open);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::num_points
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct num_points<multi_tag, Geometry>
|
||||
: detail::num_points::multi_count<Geometry> {};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_NUM_POINTS_HPP
|
||||
55
test/external/boost/geometry/multi/algorithms/perimeter.hpp
vendored
Normal file
55
test/external/boost/geometry/multi/algorithms/perimeter.hpp
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
// 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_ALGORITHMS_PERIMETER_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_PERIMETER_HPP
|
||||
|
||||
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/perimeter.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/detail/multi_sum.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
template <typename MultiPolygon, typename Strategy>
|
||||
struct perimeter<multi_polygon_tag, MultiPolygon, Strategy>
|
||||
: detail::multi_sum
|
||||
<
|
||||
typename default_length_result<MultiPolygon>::type,
|
||||
MultiPolygon,
|
||||
Strategy,
|
||||
perimeter
|
||||
<
|
||||
polygon_tag,
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
Strategy
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_PERIMETER_HPP
|
||||
69
test/external/boost/geometry/multi/algorithms/reverse.hpp
vendored
Normal file
69
test/external/boost/geometry/multi/algorithms/reverse.hpp
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
// 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_ALGORITHMS_REVERSE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_REVERSE_HPP
|
||||
|
||||
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/reverse.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/modify.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct reverse<multi_linestring_tag, Geometry>
|
||||
: detail::multi_modify
|
||||
<
|
||||
Geometry,
|
||||
detail::reverse::range_reverse
|
||||
<
|
||||
typename boost::range_value<Geometry>::type
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct reverse<multi_polygon_tag, Geometry>
|
||||
: detail::multi_modify
|
||||
<
|
||||
Geometry,
|
||||
detail::reverse::polygon_reverse
|
||||
<
|
||||
typename boost::range_value<Geometry>::type
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_REVERSE_HPP
|
||||
117
test/external/boost/geometry/multi/algorithms/simplify.hpp
vendored
Normal file
117
test/external/boost/geometry/multi/algorithms/simplify.hpp
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
// 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_ALGORITHMS_SIMPLIFY_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_SIMPLIFY_HPP
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/core/mutable_range.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/multi/algorithms/clear.hpp>
|
||||
#include <boost/geometry/algorithms/simplify.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace simplify
|
||||
{
|
||||
|
||||
template<typename MultiGeometry, typename Strategy, typename Policy>
|
||||
struct simplify_multi
|
||||
{
|
||||
static inline void apply(MultiGeometry const& multi, MultiGeometry& out,
|
||||
double max_distance, Strategy const& strategy)
|
||||
{
|
||||
traits::resize<MultiGeometry>::apply(out, boost::size(multi));
|
||||
|
||||
typename boost::range_iterator<MultiGeometry>::type it_out
|
||||
= boost::begin(out);
|
||||
for (typename boost::range_iterator<MultiGeometry const>::type it_in
|
||||
= boost::begin(multi);
|
||||
it_in != boost::end(multi);
|
||||
++it_in, ++it_out)
|
||||
{
|
||||
Policy::apply(*it_in, *it_out, max_distance, strategy);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
}} // namespace detail::simplify
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename MultiPoint, typename Strategy>
|
||||
struct simplify<multi_point_tag, MultiPoint, Strategy>
|
||||
: detail::simplify::simplify_copy
|
||||
<
|
||||
MultiPoint,
|
||||
Strategy
|
||||
>
|
||||
|
||||
{};
|
||||
|
||||
|
||||
template <typename MultiLinestring, typename Strategy>
|
||||
struct simplify<multi_linestring_tag, MultiLinestring, Strategy>
|
||||
: detail::simplify::simplify_multi
|
||||
<
|
||||
MultiLinestring,
|
||||
Strategy,
|
||||
detail::simplify::simplify_range
|
||||
<
|
||||
typename boost::range_value<MultiLinestring>::type,
|
||||
Strategy,
|
||||
2
|
||||
>
|
||||
>
|
||||
|
||||
{};
|
||||
|
||||
|
||||
template <typename MultiPolygon, typename Strategy>
|
||||
struct simplify<multi_polygon_tag, MultiPolygon, Strategy>
|
||||
: detail::simplify::simplify_multi
|
||||
<
|
||||
MultiPolygon,
|
||||
Strategy,
|
||||
detail::simplify::simplify_polygon
|
||||
<
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
Strategy
|
||||
>
|
||||
>
|
||||
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_SIMPLIFY_HPP
|
||||
102
test/external/boost/geometry/multi/algorithms/transform.hpp
vendored
Normal file
102
test/external/boost/geometry/multi/algorithms/transform.hpp
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
// 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_ALGORITHMS_TRANSFORM_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_TRANSFORM_HPP
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/core/mutable_range.hpp>
|
||||
#include <boost/geometry/algorithms/transform.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace transform
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief Is able to transform any multi-geometry, calling the single-version as policy
|
||||
*/
|
||||
template <typename Multi1, typename Multi2, typename Policy>
|
||||
struct transform_multi
|
||||
{
|
||||
template <typename S>
|
||||
static inline bool apply(Multi1 const& multi1, Multi2& multi2, S const& strategy)
|
||||
{
|
||||
traits::resize<Multi2>::apply(multi2, boost::size(multi1));
|
||||
|
||||
typename boost::range_iterator<Multi1 const>::type it1
|
||||
= boost::begin(multi1);
|
||||
typename boost::range_iterator<Multi2>::type it2
|
||||
= boost::begin(multi2);
|
||||
|
||||
for (; it1 != boost::end(multi1); ++it1, ++it2)
|
||||
{
|
||||
if (! Policy::apply(*it1, *it2, strategy))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::transform
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename Multi1, typename Multi2, typename Strategy>
|
||||
struct transform
|
||||
<
|
||||
multi_tag, multi_tag,
|
||||
Multi1, Multi2,
|
||||
Strategy
|
||||
>
|
||||
: detail::transform::transform_multi
|
||||
<
|
||||
Multi1,
|
||||
Multi2,
|
||||
transform
|
||||
<
|
||||
typename single_tag_of
|
||||
<
|
||||
typename tag<Multi1>::type
|
||||
>::type,
|
||||
typename single_tag_of
|
||||
<
|
||||
typename tag<Multi2>::type
|
||||
>::type,
|
||||
typename boost::range_value<Multi1>::type,
|
||||
typename boost::range_value<Multi2>::type,
|
||||
Strategy
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_TRANSFORM_HPP
|
||||
102
test/external/boost/geometry/multi/algorithms/unique.hpp
vendored
Normal file
102
test/external/boost/geometry/multi/algorithms/unique.hpp
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
// 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_ALGORITHMS_UNIQUE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_UNIQUE_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/unique.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace unique
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiGeometry, typename ComparePolicy, typename Policy>
|
||||
struct multi_unique
|
||||
{
|
||||
static inline void apply(MultiGeometry& multi, ComparePolicy const& compare)
|
||||
{
|
||||
for (typename boost::range_iterator<MultiGeometry>::type
|
||||
it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it)
|
||||
{
|
||||
Policy::apply(*it, compare);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::unique
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
// For points, unique is not applicable and does nothing
|
||||
// (Note that it is not "spatially unique" but that it removes duplicate coordinates,
|
||||
// like std::unique does). Spatially unique is "dissolve" which can (or will be)
|
||||
// possible for multi-points as well, removing points at the same location.
|
||||
|
||||
|
||||
template <typename MultiLineString, typename ComparePolicy>
|
||||
struct unique<multi_linestring_tag, MultiLineString, ComparePolicy>
|
||||
: detail::unique::multi_unique
|
||||
<
|
||||
MultiLineString,
|
||||
ComparePolicy,
|
||||
detail::unique::range_unique
|
||||
<
|
||||
typename boost::range_value<MultiLineString>::type,
|
||||
ComparePolicy
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template <typename MultiPolygon, typename ComparePolicy>
|
||||
struct unique<multi_polygon_tag, MultiPolygon, ComparePolicy>
|
||||
: detail::unique::multi_unique
|
||||
<
|
||||
MultiPolygon,
|
||||
ComparePolicy,
|
||||
detail::unique::polygon_unique
|
||||
<
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
ComparePolicy
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_UNIQUE_HPP
|
||||
103
test/external/boost/geometry/multi/algorithms/within.hpp
vendored
Normal file
103
test/external/boost/geometry/multi/algorithms/within.hpp
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
// 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_ALGORITHMS_WITHIN_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_WITHIN_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/within.hpp>
|
||||
#include <boost/geometry/multi/core/closure.hpp>
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace within
|
||||
{
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename MultiGeometry,
|
||||
typename Strategy,
|
||||
typename Policy
|
||||
>
|
||||
struct geometry_multi_within_code
|
||||
{
|
||||
static inline int apply(Geometry const& geometry,
|
||||
MultiGeometry const& multi,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
for (typename boost::range_iterator<MultiGeometry const>::type it
|
||||
= boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it)
|
||||
{
|
||||
// Geometry coding on multi: 1 (within) if within one of them;
|
||||
// 0 (touch) if on border of one of them
|
||||
int const code = Policy::apply(geometry, *it, strategy);
|
||||
if (code != -1)
|
||||
{
|
||||
return code;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::within
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
template <typename Point, typename MultiPolygon, typename Strategy>
|
||||
struct within<point_tag, multi_polygon_tag, Point, MultiPolygon, Strategy>
|
||||
{
|
||||
static inline bool apply(Point const& point,
|
||||
MultiPolygon const& multi_polygon, Strategy const& strategy)
|
||||
{
|
||||
return detail::within::geometry_multi_within_code
|
||||
<
|
||||
Point,
|
||||
MultiPolygon,
|
||||
Strategy,
|
||||
detail::within::point_in_polygon
|
||||
<
|
||||
Point,
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
order_as_direction
|
||||
<
|
||||
geometry::point_order<MultiPolygon>::value
|
||||
>::value,
|
||||
geometry::closure<MultiPolygon>::value,
|
||||
Strategy
|
||||
>
|
||||
>::apply(point, multi_polygon, strategy) == 1;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_ALGORITHMS_WITHIN_HPP
|
||||
58
test/external/boost/geometry/multi/core/closure.hpp
vendored
Normal file
58
test/external/boost/geometry/multi/core/closure.hpp
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
// 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_CORE_CLOSURE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_CORE_CLOSURE_HPP
|
||||
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
#include <boost/geometry/core/closure.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch
|
||||
{
|
||||
|
||||
template <typename Multi>
|
||||
struct closure<multi_point_tag, Multi> : public core_detail::closure::closed {};
|
||||
|
||||
template <typename Multi>
|
||||
struct closure<multi_linestring_tag, Multi> : public core_detail::closure::closed {};
|
||||
|
||||
// Specialization for polygon: the closure is the closure of its rings
|
||||
template <typename MultiPolygon>
|
||||
struct closure<multi_polygon_tag, MultiPolygon>
|
||||
{
|
||||
static const closure_selector value = core_dispatch::closure
|
||||
<
|
||||
polygon_tag,
|
||||
typename boost::range_value<MultiPolygon>::type
|
||||
>::value ;
|
||||
};
|
||||
|
||||
|
||||
} // namespace core_dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_CORE_CLOSURE_HPP
|
||||
56
test/external/boost/geometry/multi/core/geometry_id.hpp
vendored
Normal file
56
test/external/boost/geometry/multi/core/geometry_id.hpp
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
// 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_CORE_GEOMETRY_ID_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_CORE_GEOMETRY_ID_HPP
|
||||
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/core/geometry_id.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch
|
||||
{
|
||||
|
||||
template <>
|
||||
struct geometry_id<multi_point_tag> : boost::mpl::int_<4> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<multi_linestring_tag> : boost::mpl::int_<5> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<multi_polygon_tag> : boost::mpl::int_<6> {};
|
||||
|
||||
|
||||
} // namespace core_dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_CORE_GEOMETRY_ID_HPP
|
||||
55
test/external/boost/geometry/multi/core/interior_rings.hpp
vendored
Normal file
55
test/external/boost/geometry/multi/core/interior_rings.hpp
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
// 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_CORE_INTERIOR_RINGS_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_CORE_INTERIOR_RINGS_HPP
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/core/interior_rings.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiPolygon>
|
||||
struct interior_type<multi_polygon_tag, MultiPolygon>
|
||||
{
|
||||
typedef typename core_dispatch::interior_type
|
||||
<
|
||||
polygon_tag,
|
||||
typename boost::range_value<MultiPolygon>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace core_dispatch
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_CORE_INTERIOR_RINGS_HPP
|
||||
43
test/external/boost/geometry/multi/core/is_areal.hpp
vendored
Normal file
43
test/external/boost/geometry/multi/core/is_areal.hpp
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
// 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_CORE_IS_AREAL_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_CORE_IS_AREAL_HPP
|
||||
|
||||
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/core/is_areal.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch
|
||||
{
|
||||
|
||||
template <> struct is_areal<multi_polygon_tag> : boost::true_type {};
|
||||
|
||||
} // namespace core_dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_CORE_IS_AREAL_HPP
|
||||
57
test/external/boost/geometry/multi/core/point_order.hpp
vendored
Normal file
57
test/external/boost/geometry/multi/core/point_order.hpp
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
// 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_CORE_POINT_ORDER_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_CORE_POINT_ORDER_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch
|
||||
{
|
||||
|
||||
template <typename Multi>
|
||||
struct point_order<multi_point_tag, Multi>
|
||||
: public detail::point_order::clockwise {};
|
||||
|
||||
template <typename Multi>
|
||||
struct point_order<multi_linestring_tag, Multi>
|
||||
: public detail::point_order::clockwise {};
|
||||
|
||||
|
||||
// Specialization for multi_polygon: the order is the order of its polygons
|
||||
template <typename MultiPolygon>
|
||||
struct point_order<multi_polygon_tag, MultiPolygon>
|
||||
{
|
||||
static const order_selector value = core_dispatch::point_order
|
||||
<
|
||||
polygon_tag,
|
||||
typename boost::range_value<MultiPolygon>::type
|
||||
>::value ;
|
||||
};
|
||||
|
||||
} // namespace core_dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_CORE_POINT_ORDER_HPP
|
||||
64
test/external/boost/geometry/multi/core/point_type.hpp
vendored
Normal file
64
test/external/boost/geometry/multi/core/point_type.hpp
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
// 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_CORE_POINT_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_CORE_POINT_TYPE_HPP
|
||||
|
||||
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch
|
||||
{
|
||||
|
||||
template <typename MultiPoint>
|
||||
struct point_type<multi_point_tag, MultiPoint>
|
||||
{
|
||||
typedef typename boost::range_value<MultiPoint>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename MultiLinestring>
|
||||
struct point_type<multi_linestring_tag, MultiLinestring>
|
||||
{
|
||||
typedef typename point_type<linestring_tag,
|
||||
typename boost::range_value<MultiLinestring>::type>::type type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <typename MultiPolygon>
|
||||
struct point_type<multi_polygon_tag, MultiPolygon>
|
||||
{
|
||||
typedef typename point_type<polygon_tag,
|
||||
typename boost::range_value<MultiPolygon>::type>::type type;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_CORE_POINT_TYPE_HPP
|
||||
66
test/external/boost/geometry/multi/core/ring_type.hpp
vendored
Normal file
66
test/external/boost/geometry/multi/core/ring_type.hpp
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
// 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_CORE_RING_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_CORE_RING_TYPE_HPP
|
||||
|
||||
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch
|
||||
{
|
||||
|
||||
template <typename MultiPolygon>
|
||||
struct ring_return_type<multi_polygon_tag, MultiPolygon>
|
||||
{
|
||||
typedef typename ring_return_type
|
||||
<
|
||||
polygon_tag,
|
||||
typename mpl::if_
|
||||
<
|
||||
boost::is_const<MultiPolygon>,
|
||||
typename boost::range_value<MultiPolygon>::type const,
|
||||
typename boost::range_value<MultiPolygon>::type
|
||||
>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename MultiPolygon>
|
||||
struct ring_type<multi_polygon_tag, MultiPolygon>
|
||||
{
|
||||
typedef typename boost::remove_reference
|
||||
<
|
||||
typename ring_return_type<multi_polygon_tag, MultiPolygon>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace core_dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_CORE_RING_TYPE_HPP
|
||||
71
test/external/boost/geometry/multi/core/tags.hpp
vendored
Normal file
71
test/external/boost/geometry/multi/core/tags.hpp
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
// 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_CORE_TAGS_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_CORE_TAGS_HPP
|
||||
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
/// OGC Multi point identifying tag
|
||||
struct multi_point_tag : multi_tag, pointlike_tag {};
|
||||
|
||||
/// OGC Multi linestring identifying tag
|
||||
struct multi_linestring_tag : multi_tag, linear_tag {};
|
||||
|
||||
/// OGC Multi polygon identifying tag
|
||||
struct multi_polygon_tag : multi_tag, polygonal_tag {};
|
||||
|
||||
/// OGC Geometry Collection identifying tag
|
||||
struct geometry_collection_tag : multi_tag {};
|
||||
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
\brief Meta-function to get for a tag of a multi-geometry
|
||||
the tag of the corresponding single-geometry
|
||||
*/
|
||||
template <typename Tag>
|
||||
struct single_tag_of
|
||||
{};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
|
||||
template <>
|
||||
struct single_tag_of<multi_point_tag>
|
||||
{
|
||||
typedef point_tag type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct single_tag_of<multi_linestring_tag>
|
||||
{
|
||||
typedef linestring_tag type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct single_tag_of<multi_polygon_tag>
|
||||
{
|
||||
typedef polygon_tag type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_CORE_TAGS_HPP
|
||||
52
test/external/boost/geometry/multi/core/topological_dimension.hpp
vendored
Normal file
52
test/external/boost/geometry/multi/core/topological_dimension.hpp
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
// 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_TOPOLOGICAL_DIMENSION_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_TOPOLOGICAL_DIMENSION_HPP
|
||||
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/core/topological_dimension.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch
|
||||
{
|
||||
|
||||
template <>
|
||||
struct top_dim<multi_point_tag> : boost::mpl::int_<0> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct top_dim<multi_linestring_tag> : boost::mpl::int_<1> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct top_dim<multi_polygon_tag> : boost::mpl::int_<2> {};
|
||||
|
||||
|
||||
} // namespace core_dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif
|
||||
83
test/external/boost/geometry/multi/geometries/concepts/check.hpp
vendored
Normal file
83
test/external/boost/geometry/multi/geometries/concepts/check.hpp
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
// 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_CONCEPTS_CHECK_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_CHECK_HPP
|
||||
|
||||
|
||||
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
#include <boost/geometry/multi/geometries/concepts/multi_point_concept.hpp>
|
||||
#include <boost/geometry/multi/geometries/concepts/multi_linestring_concept.hpp>
|
||||
#include <boost/geometry/multi/geometries/concepts/multi_polygon_concept.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct check<multi_point_tag, Geometry, true>
|
||||
: detail::concept_check::check<concept::ConstMultiPoint<Geometry> >
|
||||
{};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct check<multi_point_tag, Geometry, false>
|
||||
: detail::concept_check::check<concept::MultiPoint<Geometry> >
|
||||
{};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct check<multi_linestring_tag, Geometry, true>
|
||||
: detail::concept_check::check<concept::ConstMultiLinestring<Geometry> >
|
||||
{};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct check<multi_linestring_tag, Geometry, false>
|
||||
: detail::concept_check::check<concept::MultiLinestring<Geometry> >
|
||||
{};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct check<multi_polygon_tag, Geometry, true>
|
||||
: detail::concept_check::check<concept::ConstMultiPolygon<Geometry> >
|
||||
{};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct check<multi_polygon_tag, Geometry, false>
|
||||
: detail::concept_check::check<concept::MultiPolygon<Geometry> >
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_CHECK_HPP
|
||||
86
test/external/boost/geometry/multi/geometries/concepts/multi_linestring_concept.hpp
vendored
Normal file
86
test/external/boost/geometry/multi/geometries/concepts/multi_linestring_concept.hpp
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
// 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_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
|
||||
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/geometries/concepts/linestring_concept.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace concept
|
||||
{
|
||||
|
||||
|
||||
/*!
|
||||
\brief multi-linestring concept
|
||||
\ingroup concepts
|
||||
\par Formal definition:
|
||||
The multi linestring concept is defined as following:
|
||||
- there must be a specialization of traits::tag defining multi_linestring_tag as
|
||||
type
|
||||
- it must behave like a Boost.Range
|
||||
- its range value must fulfil the Linestring concept
|
||||
|
||||
*/
|
||||
template <typename Geometry>
|
||||
class MultiLinestring
|
||||
{
|
||||
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
||||
typedef typename boost::range_value<Geometry>::type linestring_type;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (concept::Linestring<linestring_type>) );
|
||||
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
|
||||
|
||||
|
||||
public :
|
||||
|
||||
BOOST_CONCEPT_USAGE(MultiLinestring)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
\brief concept for multi-linestring (const version)
|
||||
\ingroup const_concepts
|
||||
*/
|
||||
template <typename Geometry>
|
||||
class ConstMultiLinestring
|
||||
{
|
||||
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
||||
typedef typename boost::range_value<Geometry>::type linestring_type;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (concept::ConstLinestring<linestring_type>) );
|
||||
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
|
||||
|
||||
|
||||
public :
|
||||
|
||||
BOOST_CONCEPT_USAGE(ConstMultiLinestring)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::concept
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
|
||||
85
test/external/boost/geometry/multi/geometries/concepts/multi_point_concept.hpp
vendored
Normal file
85
test/external/boost/geometry/multi/geometries/concepts/multi_point_concept.hpp
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
// 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_CONCEPTS_MULTI_POINT_CONCEPT_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP
|
||||
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/geometries/concepts/point_concept.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace concept
|
||||
{
|
||||
|
||||
|
||||
/*!
|
||||
\brief MultiPoint concept
|
||||
\ingroup concepts
|
||||
\par Formal definition:
|
||||
The multi point concept is defined as following:
|
||||
- there must be a specialization of traits::tag defining multi_point_tag as type
|
||||
- it must behave like a Boost.Range
|
||||
- its range value must fulfil the Point concept
|
||||
|
||||
*/
|
||||
template <typename Geometry>
|
||||
class MultiPoint
|
||||
{
|
||||
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
||||
typedef typename boost::range_value<Geometry>::type point_type;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
|
||||
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
|
||||
|
||||
|
||||
public :
|
||||
|
||||
BOOST_CONCEPT_USAGE(MultiPoint)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
\brief concept for multi-point (const version)
|
||||
\ingroup const_concepts
|
||||
*/
|
||||
template <typename Geometry>
|
||||
class ConstMultiPoint
|
||||
{
|
||||
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
||||
typedef typename boost::range_value<Geometry>::type point_type;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (concept::ConstPoint<point_type>) );
|
||||
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
|
||||
|
||||
|
||||
public :
|
||||
|
||||
BOOST_CONCEPT_USAGE(ConstMultiPoint)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::concept
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP
|
||||
86
test/external/boost/geometry/multi/geometries/concepts/multi_polygon_concept.hpp
vendored
Normal file
86
test/external/boost/geometry/multi/geometries/concepts/multi_polygon_concept.hpp
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
// 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_CONCEPTS_MULTI_POLYGON_CONCEPT_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_POLYGON_CONCEPT_HPP
|
||||
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/polygon_concept.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace concept
|
||||
{
|
||||
|
||||
|
||||
/*!
|
||||
\brief multi-polygon concept
|
||||
\ingroup concepts
|
||||
\par Formal definition:
|
||||
The multi polygon concept is defined as following:
|
||||
- there must be a specialization of traits::tag defining multi_polygon_tag
|
||||
as type
|
||||
- it must behave like a Boost.Range
|
||||
- its range value must fulfil the Polygon concept
|
||||
|
||||
*/
|
||||
template <typename Geometry>
|
||||
class MultiPolygon
|
||||
{
|
||||
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
||||
typedef typename boost::range_value<Geometry>::type polygon_type;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (concept::Polygon<polygon_type>) );
|
||||
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
|
||||
|
||||
|
||||
public :
|
||||
|
||||
BOOST_CONCEPT_USAGE(MultiPolygon)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
\brief concept for multi-polygon (const version)
|
||||
\ingroup const_concepts
|
||||
*/
|
||||
template <typename Geometry>
|
||||
class ConstMultiPolygon
|
||||
{
|
||||
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
|
||||
typedef typename boost::range_value<Geometry>::type polygon_type;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (concept::ConstPolygon<polygon_type>) );
|
||||
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
|
||||
|
||||
|
||||
public :
|
||||
|
||||
BOOST_CONCEPT_USAGE(ConstMultiPolygon)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::concept
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_CONCEPTS_MULTI_POLYGON_CONCEPT_HPP
|
||||
80
test/external/boost/geometry/multi/geometries/multi_linestring.hpp
vendored
Normal file
80
test/external/boost/geometry/multi/geometries/multi_linestring.hpp
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
// 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_LINESTRING_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_LINESTRING_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/concept/requires.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/linestring_concept.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
namespace model
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief multi_line, a collection of linestring
|
||||
\details Multi-linestring can be used to group lines belonging to each other,
|
||||
e.g. a highway (with interruptions)
|
||||
\ingroup geometries
|
||||
|
||||
\qbk{before.synopsis,
|
||||
[heading Model of]
|
||||
[link geometry.reference.concepts.concept_multi_linestring MultiLineString Concept]
|
||||
}
|
||||
*/
|
||||
template
|
||||
<
|
||||
typename LineString,
|
||||
template<typename, typename> class Container = std::vector,
|
||||
template<typename> class Allocator = std::allocator
|
||||
>
|
||||
class multi_linestring : public Container<LineString, Allocator<LineString> >
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT( (concept::Linestring<LineString>) );
|
||||
};
|
||||
|
||||
|
||||
} // namespace model
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
namespace traits
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename LineString,
|
||||
template<typename, typename> class Container,
|
||||
template<typename> class Allocator
|
||||
>
|
||||
struct tag< model::multi_linestring<LineString, Container, Allocator> >
|
||||
{
|
||||
typedef multi_linestring_tag type;
|
||||
};
|
||||
|
||||
} // namespace traits
|
||||
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_LINESTRING_HPP
|
||||
94
test/external/boost/geometry/multi/geometries/multi_point.hpp
vendored
Normal file
94
test/external/boost/geometry/multi/geometries/multi_point.hpp
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
// 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_POINT_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_MULTI_POINT_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/concept/requires.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/point_concept.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace model
|
||||
{
|
||||
|
||||
|
||||
/*!
|
||||
\brief multi_point, a collection of points
|
||||
\ingroup geometries
|
||||
\tparam Point \tparam_point
|
||||
\tparam Container \tparam_container
|
||||
\tparam Allocator \tparam_allocator
|
||||
\details Multipoint can be used to group points belonging to each other,
|
||||
e.g. a constellation, or the result set of an intersection
|
||||
\qbk{before.synopsis,
|
||||
[heading Model of]
|
||||
[link geometry.reference.concepts.concept_multi_point MultiPoint Concept]
|
||||
}
|
||||
*/
|
||||
template
|
||||
<
|
||||
typename Point,
|
||||
template<typename, typename> class Container = std::vector,
|
||||
template<typename> class Allocator = std::allocator
|
||||
>
|
||||
class multi_point : public Container<Point, Allocator<Point> >
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
|
||||
|
||||
typedef Container<Point, Allocator<Point> > base_type;
|
||||
|
||||
public :
|
||||
/// \constructor_default{multi_point}
|
||||
inline multi_point()
|
||||
: base_type()
|
||||
{}
|
||||
|
||||
/// \constructor_begin_end{multi_point}
|
||||
template <typename Iterator>
|
||||
inline multi_point(Iterator begin, Iterator end)
|
||||
: base_type(begin, end)
|
||||
{}
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
namespace traits
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename Point,
|
||||
template<typename, typename> class Container,
|
||||
template<typename> class Allocator
|
||||
>
|
||||
struct tag< model::multi_point<Point, Container, Allocator> >
|
||||
{
|
||||
typedef multi_point_tag type;
|
||||
};
|
||||
|
||||
} // namespace traits
|
||||
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_MULTI_POINT_HPP
|
||||
78
test/external/boost/geometry/multi/geometries/multi_polygon.hpp
vendored
Normal file
78
test/external/boost/geometry/multi/geometries/multi_polygon.hpp
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
// 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_POLYGON_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_MULTI_POLYGON_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/concept/requires.hpp>
|
||||
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/polygon_concept.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace model
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief multi_polygon, a collection of polygons
|
||||
\details Multi-polygon can be used to group polygons belonging to each other,
|
||||
e.g. Hawaii
|
||||
\ingroup geometries
|
||||
|
||||
\qbk{before.synopsis,
|
||||
[heading Model of]
|
||||
[link geometry.reference.concepts.concept_multi_polygon MultiPolygon Concept]
|
||||
}
|
||||
*/
|
||||
template
|
||||
<
|
||||
typename Polygon,
|
||||
template<typename, typename> class Container = std::vector,
|
||||
template<typename> class Allocator = std::allocator
|
||||
>
|
||||
class multi_polygon : public Container<Polygon, Allocator<Polygon> >
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT( (concept::Polygon<Polygon>) );
|
||||
};
|
||||
|
||||
|
||||
} // namespace model
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
namespace traits
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename Polygon,
|
||||
template<typename, typename> class Container,
|
||||
template<typename> class Allocator
|
||||
>
|
||||
struct tag< model::multi_polygon<Polygon, Container, Allocator> >
|
||||
{
|
||||
typedef multi_polygon_tag type;
|
||||
};
|
||||
|
||||
} // namespace traits
|
||||
#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_MULTI_POLYGON_HPP
|
||||
59
test/external/boost/geometry/multi/geometries/register/multi_linestring.hpp
vendored
Normal file
59
test/external/boost/geometry/multi/geometries/register/multi_linestring.hpp
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
// 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_REGISTER_MULTI_LINESTRING_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_REGISTER_MULTI_LINESTRING_HPP
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
/*!
|
||||
\brief \brief_macro{multi_linestring}
|
||||
\ingroup register
|
||||
\details \details_macro{BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING, multi_linestring} The
|
||||
multi_linestring may contain template parameters, which must be specified then.
|
||||
\param MultiLineString \param_macro_type{multi_linestring}
|
||||
|
||||
\qbk{
|
||||
[heading Example]
|
||||
[register_multi_linestring]
|
||||
[register_multi_linestring_output]
|
||||
}
|
||||
*/
|
||||
#define BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING(MultiLineString) \
|
||||
namespace boost { namespace geometry { namespace traits { \
|
||||
template<> struct tag<MultiLineString> { typedef multi_linestring_tag type; }; \
|
||||
}}}
|
||||
|
||||
|
||||
/*!
|
||||
\brief \brief_macro{templated multi_linestring}
|
||||
\ingroup register
|
||||
\details \details_macro{BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING_TEMPLATED, templated multi_linestring}
|
||||
\details_macro_templated{multi_linestring, linestring}
|
||||
\param MultiLineString \param_macro_type{multi_linestring (without template parameters)}
|
||||
|
||||
\qbk{
|
||||
[heading Example]
|
||||
[register_multi_linestring_templated]
|
||||
[register_multi_linestring_templated_output]
|
||||
}
|
||||
*/
|
||||
#define BOOST_GEOMETRY_REGISTER_MULTI_LINESTRING_TEMPLATED(MultiLineString) \
|
||||
namespace boost { namespace geometry { namespace traits { \
|
||||
template<typename LineString> struct tag< MultiLineString<LineString> > { typedef multi_linestring_tag type; }; \
|
||||
}}}
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_REGISTER_MULTI_LINESTRING_HPP
|
||||
59
test/external/boost/geometry/multi/geometries/register/multi_point.hpp
vendored
Normal file
59
test/external/boost/geometry/multi/geometries/register/multi_point.hpp
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
// 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_REGISTER_MULTI_POINT_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_REGISTER_MULTI_POINT_HPP
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
/*!
|
||||
\brief \brief_macro{multi_point}
|
||||
\ingroup register
|
||||
\details \details_macro{BOOST_GEOMETRY_REGISTER_MULTI_POINT, multi_point} The
|
||||
multi_point may contain template parameters, which must be specified then.
|
||||
\param MultiPoint \param_macro_type{multi_point}
|
||||
|
||||
\qbk{
|
||||
[heading Example]
|
||||
[register_multi_point]
|
||||
[register_multi_point_output]
|
||||
}
|
||||
*/
|
||||
#define BOOST_GEOMETRY_REGISTER_MULTI_POINT(MultiPoint) \
|
||||
namespace boost { namespace geometry { namespace traits { \
|
||||
template<> struct tag<MultiPoint> { typedef multi_point_tag type; }; \
|
||||
}}}
|
||||
|
||||
|
||||
/*!
|
||||
\brief \brief_macro{templated multi_point}
|
||||
\ingroup register
|
||||
\details \details_macro{BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED, templated multi_point}
|
||||
\details_macro_templated{multi_point, point}
|
||||
\param MultiPoint \param_macro_type{multi_point (without template parameters)}
|
||||
|
||||
\qbk{
|
||||
[heading Example]
|
||||
[register_multi_point_templated]
|
||||
[register_multi_point_templated_output]
|
||||
}
|
||||
*/
|
||||
#define BOOST_GEOMETRY_REGISTER_MULTI_POINT_TEMPLATED(MultiPoint) \
|
||||
namespace boost { namespace geometry { namespace traits { \
|
||||
template<typename Point> struct tag< MultiPoint<Point> > { typedef multi_point_tag type; }; \
|
||||
}}}
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_REGISTER_MULTI_POINT_HPP
|
||||
59
test/external/boost/geometry/multi/geometries/register/multi_polygon.hpp
vendored
Normal file
59
test/external/boost/geometry/multi/geometries/register/multi_polygon.hpp
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
// 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_REGISTER_MULTI_POLYGON_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_GEOMETRIES_REGISTER_MULTI_POLYGON_HPP
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
|
||||
/*!
|
||||
\brief \brief_macro{multi_polygon}
|
||||
\ingroup register
|
||||
\details \details_macro{BOOST_GEOMETRY_REGISTER_MULTI_POLYGON, multi_polygon} The
|
||||
multi_polygon may contain template parameters, which must be specified then.
|
||||
\param MultiPolygon \param_macro_type{multi_polygon}
|
||||
|
||||
\qbk{
|
||||
[heading Example]
|
||||
[register_multi_polygon]
|
||||
[register_multi_polygon_output]
|
||||
}
|
||||
*/
|
||||
#define BOOST_GEOMETRY_REGISTER_MULTI_POLYGON(MultiPolygon) \
|
||||
namespace boost { namespace geometry { namespace traits { \
|
||||
template<> struct tag<MultiPolygon> { typedef multi_polygon_tag type; }; \
|
||||
}}}
|
||||
|
||||
|
||||
/*!
|
||||
\brief \brief_macro{templated multi_polygon}
|
||||
\ingroup register
|
||||
\details \details_macro{BOOST_GEOMETRY_REGISTER_MULTI_POLYGON_TEMPLATED, templated multi_polygon}
|
||||
\details_macro_templated{multi_polygon, polygon}
|
||||
\param MultiPolygon \param_macro_type{multi_polygon (without template parameters)}
|
||||
|
||||
\qbk{
|
||||
[heading Example]
|
||||
[register_multi_polygon_templated]
|
||||
[register_multi_polygon_templated_output]
|
||||
}
|
||||
*/
|
||||
#define BOOST_GEOMETRY_REGISTER_MULTI_POLYGON_TEMPLATED(MultiPolygon) \
|
||||
namespace boost { namespace geometry { namespace traits { \
|
||||
template<typename Polygon> struct tag< MultiPolygon<Polygon> > { typedef multi_polygon_tag type; }; \
|
||||
}}}
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_GEOMETRIES_REGISTER_MULTI_POLYGON_HPP
|
||||
73
test/external/boost/geometry/multi/multi.hpp
vendored
Normal file
73
test/external/boost/geometry/multi/multi.hpp
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
// 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_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/multi/core/closure.hpp>
|
||||
#include <boost/geometry/multi/core/geometry_id.hpp>
|
||||
#include <boost/geometry/multi/core/is_areal.hpp>
|
||||
#include <boost/geometry/multi/core/interior_rings.hpp>
|
||||
#include <boost/geometry/multi/core/point_order.hpp>
|
||||
#include <boost/geometry/multi/core/point_type.hpp>
|
||||
#include <boost/geometry/multi/core/ring_type.hpp>
|
||||
#include <boost/geometry/multi/core/tags.hpp>
|
||||
#include <boost/geometry/multi/core/topological_dimension.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/multi/algorithms/area.hpp>
|
||||
#include <boost/geometry/multi/algorithms/centroid.hpp>
|
||||
#include <boost/geometry/multi/algorithms/clear.hpp>
|
||||
#include <boost/geometry/multi/algorithms/correct.hpp>
|
||||
#include <boost/geometry/multi/algorithms/distance.hpp>
|
||||
#include <boost/geometry/multi/algorithms/envelope.hpp>
|
||||
#include <boost/geometry/multi/algorithms/equals.hpp>
|
||||
#include <boost/geometry/multi/algorithms/for_each.hpp>
|
||||
#include <boost/geometry/multi/algorithms/intersection.hpp>
|
||||
#include <boost/geometry/multi/algorithms/length.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_geometries.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_interior_rings.hpp>
|
||||
#include <boost/geometry/multi/algorithms/num_points.hpp>
|
||||
#include <boost/geometry/multi/algorithms/perimeter.hpp>
|
||||
#include <boost/geometry/multi/algorithms/reverse.hpp>
|
||||
#include <boost/geometry/multi/algorithms/simplify.hpp>
|
||||
#include <boost/geometry/multi/algorithms/transform.hpp>
|
||||
#include <boost/geometry/multi/algorithms/unique.hpp>
|
||||
#include <boost/geometry/multi/algorithms/within.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/detail/modify_with_predicate.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/multi_sum.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
|
||||
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/copy_segment_point.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/copy_segments.hpp>
|
||||
#include <boost/geometry/multi/algorithms/detail/overlay/get_ring.hpp>
|
||||
#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/concepts/check.hpp>
|
||||
#include <boost/geometry/multi/geometries/concepts/multi_point_concept.hpp>
|
||||
#include <boost/geometry/multi/geometries/concepts/multi_linestring_concept.hpp>
|
||||
#include <boost/geometry/multi/geometries/concepts/multi_polygon_concept.hpp>
|
||||
|
||||
#include <boost/geometry/multi/views/detail/range_type.hpp>
|
||||
#include <boost/geometry/multi/strategies/cartesian/centroid_average.hpp>
|
||||
|
||||
#include <boost/geometry/multi/util/write_dsv.hpp>
|
||||
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_HPP
|
||||
116
test/external/boost/geometry/multi/strategies/cartesian/centroid_average.hpp
vendored
Normal file
116
test/external/boost/geometry/multi/strategies/cartesian/centroid_average.hpp
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
// 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_STRATEGIES_CARTESIAN_CENTROID_AVERAGE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_STRATEGIES_CARTESIAN_CENTROID_AVERAGE_HPP
|
||||
|
||||
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/strategies/centroid.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace strategy { namespace centroid
|
||||
{
|
||||
|
||||
|
||||
/*!
|
||||
\brief Centroid calculation taking average of points
|
||||
\ingroup strategies
|
||||
*/
|
||||
template
|
||||
<
|
||||
typename PointCentroid,
|
||||
typename Point = PointCentroid
|
||||
>
|
||||
class average
|
||||
{
|
||||
private :
|
||||
|
||||
/*! subclass to keep state */
|
||||
class sum
|
||||
{
|
||||
friend class average;
|
||||
int count;
|
||||
PointCentroid centroid;
|
||||
|
||||
public :
|
||||
inline sum()
|
||||
: count(0)
|
||||
{
|
||||
assign_zero(centroid);
|
||||
}
|
||||
};
|
||||
|
||||
public :
|
||||
typedef sum state_type;
|
||||
typedef PointCentroid centroid_point_type;
|
||||
typedef Point point_type;
|
||||
|
||||
static inline void apply(Point const& p, sum& state)
|
||||
{
|
||||
add_point(state.centroid, p);
|
||||
state.count++;
|
||||
}
|
||||
|
||||
static inline void result(sum const& state, PointCentroid& centroid)
|
||||
{
|
||||
centroid = state.centroid;
|
||||
divide_value(centroid, state.count);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
|
||||
|
||||
|
||||
namespace services
|
||||
{
|
||||
|
||||
template <typename Point, std::size_t DimensionCount, typename Geometry>
|
||||
struct default_strategy
|
||||
<
|
||||
cartesian_tag,
|
||||
pointlike_tag,
|
||||
DimensionCount,
|
||||
Point,
|
||||
Geometry
|
||||
>
|
||||
{
|
||||
typedef average
|
||||
<
|
||||
Point,
|
||||
typename point_type<Geometry>::type
|
||||
> type;
|
||||
};
|
||||
|
||||
} // namespace services
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace strategy::centroid
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_STRATEGIES_CARTESIAN_CENTROID_AVERAGE_HPP
|
||||
78
test/external/boost/geometry/multi/util/write_dsv.hpp
vendored
Normal file
78
test/external/boost/geometry/multi/util/write_dsv.hpp
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
// 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_UTIL_WRITE_DSV_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_UTIL_WRITE_DSV_HPP
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/util/write_dsv.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace dsv
|
||||
{
|
||||
|
||||
|
||||
template <typename MultiGeometry>
|
||||
struct dsv_multi
|
||||
{
|
||||
template <typename Char, typename Traits>
|
||||
static inline void apply(std::basic_ostream<Char, Traits>& os,
|
||||
MultiGeometry const& multi,
|
||||
dsv_settings const& settings)
|
||||
{
|
||||
os << settings.list_open;
|
||||
|
||||
typedef typename boost::range_iterator
|
||||
<
|
||||
MultiGeometry const
|
||||
>::type iterator;
|
||||
for(iterator it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it)
|
||||
{
|
||||
os << geometry::dsv(*it);
|
||||
}
|
||||
os << settings.list_close;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}} // namespace detail::dsv
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct dsv<multi_tag, Geometry>
|
||||
: detail::dsv::dsv_multi<Geometry>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_UTIL_WRITE_DSV_HPP
|
||||
62
test/external/boost/geometry/multi/views/detail/range_type.hpp
vendored
Normal file
62
test/external/boost/geometry/multi/views/detail/range_type.hpp
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
// 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_VIEWS_DETAIL_RANGE_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_MULTI_VIEWS_DETAIL_RANGE_TYPE_HPP
|
||||
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/views/detail/range_type.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace dispatch
|
||||
{
|
||||
|
||||
// multi-point acts itself as a range
|
||||
template <typename Geometry>
|
||||
struct range_type<multi_point_tag, Geometry>
|
||||
{
|
||||
typedef Geometry type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct range_type<multi_linestring_tag, Geometry>
|
||||
{
|
||||
typedef typename boost::range_value<Geometry>::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct range_type<multi_polygon_tag, Geometry>
|
||||
{
|
||||
// Call its single-version
|
||||
typedef typename geometry::detail::range_type
|
||||
<
|
||||
typename boost::range_value<Geometry>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace dispatch
|
||||
#endif // DOXYGEN_NO_DISPATCH
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_MULTI_VIEWS_DETAIL_RANGE_TYPE_HPP
|
||||
Reference in New Issue
Block a user