From 8971967651e60b7864bb9398c8463fd5cd77a089 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 4 Sep 2017 22:31:23 +0300 Subject: [PATCH] Added missing files [#CLICKHOUSE-3276]. --- .../boost/geometry/core/access.hpp | 399 ++++++++++++++++++ .../boost/geometry/core/assert.hpp | 43 ++ .../boost/geometry/core/closure.hpp | 202 +++++++++ .../geometry/core/coordinate_dimension.hpp | 127 ++++++ .../boost/geometry/core/coordinate_system.hpp | 100 +++++ .../boost/geometry/core/coordinate_type.hpp | 108 +++++ .../boost_1_65_0/boost/geometry/core/cs.hpp | 269 ++++++++++++ .../boost/geometry/core/exception.hpp | 89 ++++ .../boost/geometry/core/exterior_ring.hpp | 145 +++++++ .../boost/geometry/core/geometry_id.hpp | 103 +++++ .../boost/geometry/core/interior_rings.hpp | 150 +++++++ .../boost/geometry/core/interior_type.hpp | 164 +++++++ .../boost/geometry/core/is_areal.hpp | 59 +++ .../boost/geometry/core/mutable_range.hpp | 98 +++++ .../boost/geometry/core/point_order.hpp | 187 ++++++++ .../boost/geometry/core/point_type.hpp | 162 +++++++ .../boost/geometry/core/radian_access.hpp | 263 ++++++++++++ .../boost/geometry/core/radius.hpp | 251 +++++++++++ .../boost/geometry/core/reverse_dispatch.hpp | 66 +++ .../boost/geometry/core/ring_type.hpp | 226 ++++++++++ .../boost_1_65_0/boost/geometry/core/srs.hpp | 196 +++++++++ .../boost_1_65_0/boost/geometry/core/tag.hpp | 69 +++ .../boost/geometry/core/tag_cast.hpp | 84 ++++ .../boost_1_65_0/boost/geometry/core/tags.hpp | 150 +++++++ .../geometry/core/topological_dimension.hpp | 101 +++++ 25 files changed, 3811 insertions(+) create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/access.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/assert.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/closure.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_dimension.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_system.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_type.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/cs.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/exception.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/exterior_ring.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/geometry_id.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/interior_rings.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/interior_type.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/is_areal.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/mutable_range.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/point_order.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/point_type.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/radian_access.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/radius.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/reverse_dispatch.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/ring_type.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/srs.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/tag.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/tag_cast.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/tags.hpp create mode 100644 contrib/libboost/boost_1_65_0/boost/geometry/core/topological_dimension.hpp diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/access.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/access.hpp new file mode 100644 index 0000000000..866fb19a4d --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/access.hpp @@ -0,0 +1,399 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2009-2012 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_CORE_ACCESS_HPP +#define BOOST_GEOMETRY_CORE_ACCESS_HPP + + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + + +namespace boost { namespace geometry +{ + +/// Index of minimum corner of the box. +int const min_corner = 0; + +/// Index of maximum corner of the box. +int const max_corner = 1; + +namespace traits +{ + +/*! +\brief Traits class which gives access (get,set) to points. +\ingroup traits +\par Geometries: +/// @li point +\par Specializations should provide, per Dimension +/// @li static inline T get(G const&) +/// @li static inline void set(G&, T const&) +\tparam Geometry geometry-type +\tparam Dimension dimension to access +*/ +template +struct access +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE, (types) + ); +}; + + +/*! +\brief Traits class defining "get" and "set" to get + and set point coordinate values +\tparam Geometry geometry (box, segment) +\tparam Index index (min_corner/max_corner for box, 0/1 for segment) +\tparam Dimension dimension +\par Geometries: + - box + - segment +\par Specializations should provide: + - static inline T get(G const&) + - static inline void set(G&, T const&) +\ingroup traits +*/ +template +struct indexed_access {}; + + +} // namespace traits + +#ifndef DOXYGEN_NO_DETAIL +namespace detail +{ + +template +< + typename Geometry, + typename CoordinateType, + std::size_t Index, + std::size_t Dimension +> +struct indexed_access_non_pointer +{ + static inline CoordinateType get(Geometry const& geometry) + { + return traits::indexed_access::get(geometry); + } + static inline void set(Geometry& b, CoordinateType const& value) + { + traits::indexed_access::set(b, value); + } +}; + +template +< + typename Geometry, + typename CoordinateType, + std::size_t Index, + std::size_t Dimension +> +struct indexed_access_pointer +{ + static inline CoordinateType get(Geometry const* geometry) + { + return traits::indexed_access::type, Index, Dimension>::get(*geometry); + } + static inline void set(Geometry* geometry, CoordinateType const& value) + { + traits::indexed_access::type, Index, Dimension>::set(*geometry, value); + } +}; + + +} // namespace detail +#endif // DOXYGEN_NO_DETAIL + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +< + typename Tag, + typename Geometry, + typename + CoordinateType, + std::size_t Dimension, + typename IsPointer +> +struct access +{ + //static inline T get(G const&) {} + //static inline void set(G& g, T const& value) {} +}; + +template +< + typename Tag, + typename Geometry, + typename CoordinateType, + std::size_t Index, + std::size_t Dimension, + typename IsPointer +> +struct indexed_access +{ + //static inline T get(G const&) {} + //static inline void set(G& g, T const& value) {} +}; + +template +struct access +{ + static inline CoordinateType get(Point const& point) + { + return traits::access::get(point); + } + static inline void set(Point& p, CoordinateType const& value) + { + traits::access::set(p, value); + } +}; + +template +struct access +{ + static inline CoordinateType get(Point const* point) + { + return traits::access::type, Dimension>::get(*point); + } + static inline void set(Point* p, CoordinateType const& value) + { + traits::access::type, Dimension>::set(*p, value); + } +}; + + +template +< + typename Box, + typename CoordinateType, + std::size_t Index, + std::size_t Dimension +> +struct indexed_access + : detail::indexed_access_non_pointer +{}; + +template +< + typename Box, + typename CoordinateType, + std::size_t Index, + std::size_t Dimension +> +struct indexed_access + : detail::indexed_access_pointer +{}; + + +template +< + typename Segment, + typename CoordinateType, + std::size_t Index, + std::size_t Dimension +> +struct indexed_access + : detail::indexed_access_non_pointer +{}; + + +template +< + typename Segment, + typename CoordinateType, + std::size_t Index, + std::size_t Dimension +> +struct indexed_access + : detail::indexed_access_pointer +{}; + +} // namespace core_dispatch +#endif // DOXYGEN_NO_DISPATCH + + +#ifndef DOXYGEN_NO_DETAIL +namespace detail +{ + +// Two dummy tags to distinguish get/set variants below. +// They don't have to be specified by the user. The functions are distinguished +// by template signature also, but for e.g. GCC this is not enough. So give them +// a different signature. +struct signature_getset_dimension {}; +struct signature_getset_index_dimension {}; + +} // namespace detail +#endif // DOXYGEN_NO_DETAIL + + +/*! +\brief Get coordinate value of a geometry (usually a point) +\details \details_get_set +\ingroup get +\tparam Dimension \tparam_dimension_required +\tparam Geometry \tparam_geometry (usually a Point Concept) +\param geometry \param_geometry (usually a point) +\return The coordinate value of specified dimension of specified geometry + +\qbk{[include reference/core/get_point.qbk]} +*/ +template +inline typename coordinate_type::type get(Geometry const& geometry +#ifndef DOXYGEN_SHOULD_SKIP_THIS + , detail::signature_getset_dimension* dummy = 0 +#endif + ) +{ + boost::ignore_unused(dummy); + + typedef core_dispatch::access + < + typename tag::type, + typename geometry::util::bare_type::type, + typename coordinate_type::type, + Dimension, + typename boost::is_pointer::type + > coord_access_type; + + return coord_access_type::get(geometry); +} + + +/*! +\brief Set coordinate value of a geometry (usually a point) +\details \details_get_set +\tparam Dimension \tparam_dimension_required +\tparam Geometry \tparam_geometry (usually a Point Concept) +\param geometry geometry to assign coordinate to +\param geometry \param_geometry (usually a point) +\param value The coordinate value to set +\ingroup set + +\qbk{[include reference/core/set_point.qbk]} +*/ +template +inline void set(Geometry& geometry + , typename coordinate_type::type const& value +#ifndef DOXYGEN_SHOULD_SKIP_THIS + , detail::signature_getset_dimension* dummy = 0 +#endif + ) +{ + boost::ignore_unused(dummy); + + typedef core_dispatch::access + < + typename tag::type, + typename geometry::util::bare_type::type, + typename coordinate_type::type, + Dimension, + typename boost::is_pointer::type + > coord_access_type; + + coord_access_type::set(geometry, value); +} + + +/*! +\brief get coordinate value of a Box or Segment +\details \details_get_set +\tparam Index \tparam_index_required +\tparam Dimension \tparam_dimension_required +\tparam Geometry \tparam_box_or_segment +\param geometry \param_geometry +\return coordinate value +\ingroup get + +\qbk{distinguish,with index} +\qbk{[include reference/core/get_box.qbk]} +*/ +template +inline typename coordinate_type::type get(Geometry const& geometry +#ifndef DOXYGEN_SHOULD_SKIP_THIS + , detail::signature_getset_index_dimension* dummy = 0 +#endif + ) +{ + boost::ignore_unused(dummy); + + typedef core_dispatch::indexed_access + < + typename tag::type, + typename geometry::util::bare_type::type, + typename coordinate_type::type, + Index, + Dimension, + typename boost::is_pointer::type + > coord_access_type; + + return coord_access_type::get(geometry); +} + +/*! +\brief set coordinate value of a Box / Segment +\details \details_get_set +\tparam Index \tparam_index_required +\tparam Dimension \tparam_dimension_required +\tparam Geometry \tparam_box_or_segment +\param geometry geometry to assign coordinate to +\param geometry \param_geometry +\param value The coordinate value to set +\ingroup set + +\qbk{distinguish,with index} +\qbk{[include reference/core/set_box.qbk]} +*/ +template +inline void set(Geometry& geometry + , typename coordinate_type::type const& value +#ifndef DOXYGEN_SHOULD_SKIP_THIS + , detail::signature_getset_index_dimension* dummy = 0 +#endif + ) +{ + boost::ignore_unused(dummy); + + typedef core_dispatch::indexed_access + < + typename tag::type, + typename geometry::util::bare_type::type, + typename coordinate_type::type, + Index, + Dimension, + typename boost::is_pointer::type + > coord_access_type; + + coord_access_type::set(geometry, value); +} + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_CORE_ACCESS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/assert.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/assert.hpp new file mode 100644 index 0000000000..0f3ae6baea --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/assert.hpp @@ -0,0 +1,43 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2007, 2014 Peter Dimov +// Copyright (c) Beman Dawes 2011 +// Copyright (c) 2015 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// 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_CORE_ASSERT_HPP +#define BOOST_GEOMETRY_CORE_ASSERT_HPP + +#include + +#undef BOOST_GEOMETRY_ASSERT +#undef BOOST_GEOMETRY_ASSERT_MSG + +#if defined(BOOST_GEOMETRY_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_GEOMETRY_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) ) + +#include // for BOOST_LIKELY +#include + +namespace boost { namespace geometry +{ + void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined + void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined +}} // namespace boost::geometry + +#define BOOST_GEOMETRY_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::geometry::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) +#define BOOST_GEOMETRY_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::geometry::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) + +#else + +#define BOOST_GEOMETRY_ASSERT(expr) BOOST_ASSERT(expr) +#define BOOST_GEOMETRY_ASSERT_MSG(expr, msg) BOOST_ASSERT_MSG(expr, msg) + +#endif + +#endif // BOOST_GEOMETRY_CORE_EXCEPTION_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/closure.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/closure.hpp new file mode 100644 index 0000000000..405a5a5f35 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/closure.hpp @@ -0,0 +1,202 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2014. +// Modifications copyright (c) 2014 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// 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_CORE_CLOSURE_HPP +#define BOOST_GEOMETRY_CORE_CLOSURE_HPP + +#include +#include +#include + +#include +#include +#include +#include + +namespace boost { namespace geometry +{ + + +/*! +\brief Enumerates options for defining if polygons are open or closed +\ingroup enum +\details The enumeration closure_selector describes options for if a polygon is + open or closed. In a closed polygon the very first point (per ring) should + be equal to the very last point. + The specific closing property of a polygon type is defined by the closure + metafunction. The closure metafunction defines a value, which is one of the + values enumerated in the closure_selector + +\qbk{ +[heading See also] +[link geometry.reference.core.closure The closure metafunction] +} +*/ +enum closure_selector +{ + /// Rings are open: first point and last point are different, algorithms + /// close them explicitly on the fly + open = 0, + /// Rings are closed: first point and last point must be the same + closed = 1, + /// (Not yet implemented): algorithms first figure out if ring must be + /// closed on the fly + closure_undertermined = -1 +}; + +namespace traits +{ + +/*! + \brief Traits class indicating if points within a + ring or (multi)polygon are closed (last point == first point), + open or not known. + \ingroup traits + \par Geometries: + - ring + \tparam G geometry +*/ +template +struct closure +{ + static const closure_selector value = closed; +}; + + +} // namespace traits + + +#ifndef DOXYGEN_NO_DETAIL +namespace core_detail { namespace closure +{ + +struct closed +{ + static const closure_selector value = geometry::closed; +}; + + +/// Metafunction to define the minimum size of a ring: +/// 3 for open rings, 4 for closed rings +template +struct minimum_ring_size {}; + +template <> +struct minimum_ring_size : boost::mpl::size_t<4> {}; + +template <> +struct minimum_ring_size : boost::mpl::size_t<3> {}; + + +}} // namespace detail::point_order +#endif // DOXYGEN_NO_DETAIL + + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +struct closure +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + +template +struct closure : public core_detail::closure::closed {}; + +template +struct closure : public core_detail::closure::closed {}; + +template +struct closure : public core_detail::closure::closed {}; + +template +struct closure + : public core_detail::closure::closed {}; + + +template +struct closure +{ + static const closure_selector value + = geometry::traits::closure::value; +}; + +// Specialization for Polygon: the closure is the closure of its rings +template +struct closure +{ + static const closure_selector value = core_dispatch::closure + < + ring_tag, + typename ring_type::type + >::value ; +}; + +template +struct closure + : public core_detail::closure::closed {}; + +template +struct closure + : public core_detail::closure::closed {}; + +// Specialization for MultiPolygon: the closure is the closure of Polygon's rings +template +struct closure +{ + static const closure_selector value = core_dispatch::closure + < + polygon_tag, + typename boost::range_value::type + >::value ; +}; + +} // namespace core_dispatch +#endif // DOXYGEN_NO_DISPATCH + + +/*! +\brief \brief_meta{value, closure (clockwise\, counterclockwise), + \meta_geometry_type} +\tparam Geometry \tparam_geometry +\ingroup core + +\qbk{[include reference/core/closure.qbk]} +*/ +template +struct closure +{ + static const closure_selector value = core_dispatch::closure + < + typename tag::type, + typename util::bare_type::type + >::value; +}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_CLOSURE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_dimension.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_dimension.hpp new file mode 100644 index 0000000000..19022f2fd2 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_dimension.hpp @@ -0,0 +1,127 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2009-2012 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_CORE_COORDINATE_DIMENSION_HPP +#define BOOST_GEOMETRY_CORE_COORDINATE_DIMENSION_HPP + + +#include + +#include +#include + +#include +#include + +namespace boost { namespace geometry +{ + +namespace traits +{ + +/*! +\brief Traits class indicating the number of dimensions of a point +\par Geometries: + - point +\par Specializations should provide: + - value (should be derived from boost::mpl::int_ +\ingroup traits +*/ +template +struct dimension +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE, (types) + ); +}; + +} // namespace traits + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +// Base class derive from its own specialization of point-tag +template +struct dimension : dimension::type> {}; + +template +struct dimension + : traits::dimension::type> +{ + BOOST_MPL_ASSERT_MSG( + (traits::dimension::type>::value > 0), + INVALID_DIMENSION_VALUE, + (traits::dimension::type>) + ); +}; + +} // namespace core_dispatch +#endif + +/*! +\brief \brief_meta{value, number of coordinates (the number of axes of any geometry), \meta_point_type} +\tparam Geometry \tparam_geometry +\ingroup core + +\qbk{[include reference/core/coordinate_dimension.qbk]} +*/ +template +struct dimension + : core_dispatch::dimension + < + typename tag::type, + typename geometry::util::bare_type::type + > +{}; + +/*! +\brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected +\ingroup utility +*/ +template +inline void assert_dimension() +{ + BOOST_STATIC_ASSERT(( static_cast(dimension::value) == Dimensions )); +} + +/*! +\brief assert_dimension, enables compile-time checking if coordinate dimensions are as expected +\ingroup utility +*/ +template +inline void assert_dimension_less_equal() +{ + BOOST_STATIC_ASSERT(( static_cast(dimension::type::value) <= Dimensions )); +} + +template +inline void assert_dimension_greater_equal() +{ + BOOST_STATIC_ASSERT(( static_cast(dimension::type::value) >= Dimensions )); +} + +/*! +\brief assert_dimension_equal, enables compile-time checking if coordinate dimensions of two geometries are equal +\ingroup utility +*/ +template +inline void assert_dimension_equal() +{ + BOOST_STATIC_ASSERT(( static_cast(dimension::type::value) == static_cast(dimension::type::value) )); +} + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_CORE_COORDINATE_DIMENSION_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_system.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_system.hpp new file mode 100644 index 0000000000..d33353f4b4 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_system.hpp @@ -0,0 +1,100 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2009-2012 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_CORE_COORDINATE_SYSTEM_HPP +#define BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP + + +#include + +#include +#include + + +namespace boost { namespace geometry +{ + + +namespace traits +{ + +/*! +\brief Traits class defining the coordinate system of a point, important for strategy selection +\ingroup traits +\par Geometries: + - point +\par Specializations should provide: + - typedef CS type; (cs::cartesian, cs::spherical, etc) +*/ +template +struct coordinate_system +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE, (types) + ); +}; + +} // namespace traits + + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + template + struct coordinate_system + { + typedef typename point_type::type P; + + // Call its own specialization on point-tag + typedef typename coordinate_system::type type; + }; + + + template + struct coordinate_system + { + typedef typename traits::coordinate_system + < + typename geometry::util::bare_type::type + >::type type; + }; + + +} // namespace core_dispatch +#endif + + +/*! +\brief \brief_meta{type, coordinate system (cartesian\, spherical\, etc), \meta_point_type} +\tparam Geometry \tparam_geometry +\ingroup core + +\qbk{[include reference/core/coordinate_system.qbk]} +*/ +template +struct coordinate_system +{ + typedef typename core_dispatch::coordinate_system + < + typename tag::type, + typename geometry::util::bare_type::type + >::type type; +}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_COORDINATE_SYSTEM_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_type.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_type.hpp new file mode 100644 index 0000000000..47c028fec2 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/coordinate_type.hpp @@ -0,0 +1,108 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2009-2012 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_CORE_COORDINATE_TYPE_HPP +#define BOOST_GEOMETRY_CORE_COORDINATE_TYPE_HPP + + +#include + +#include +#include +#include +#include + + +namespace boost { namespace geometry +{ + +namespace traits +{ + +/*! +\brief Traits class which indicate the coordinate type (double,float,...) of a point +\ingroup traits +\par Geometries: + - point +\par Specializations should provide: + - typedef T type; (double,float,int,etc) +*/ +template +struct coordinate_type +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE, (types) + ); +}; + +} // namespace traits + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +struct coordinate_type +{ + typedef typename point_type::type point_type; + + // Call its own specialization on point-tag + typedef typename coordinate_type::type type; +}; + +template +struct coordinate_type +{ + typedef typename traits::coordinate_type + < + typename geometry::util::bare_type::type + >::type type; +}; + + +} // namespace core_dispatch +#endif // DOXYGEN_NO_DISPATCH + + +/*! +\brief \brief_meta{type, coordinate type (int\, float\, double\, etc), \meta_point_type} +\tparam Geometry \tparam_geometry +\ingroup core + +\qbk{[include reference/core/coordinate_type.qbk]} +*/ +template +struct coordinate_type +{ + typedef typename core_dispatch::coordinate_type + < + typename tag::type, + typename geometry::util::bare_type::type + >::type type; +}; + +template +struct fp_coordinate_type +{ + typedef typename promote_floating_point + < + typename coordinate_type::type + >::type type; +}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_COORDINATE_TYPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/cs.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/cs.hpp new file mode 100644 index 0000000000..301fb6b76f --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/cs.hpp @@ -0,0 +1,269 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2014 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2014 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2014. +// Modifications copyright (c) 2014, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle + +// 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_CORE_CS_HPP +#define BOOST_GEOMETRY_CORE_CS_HPP + +#include + +#include +#include + +#include +#include + + +namespace boost { namespace geometry +{ + +/*! +\brief Unit of plane angle: Degrees +\details Tag defining the unit of plane angle for spherical coordinate systems. + This tag specifies that coordinates are defined in degrees (-180 .. 180). + It has to be specified for some coordinate systems. +\qbk{[include reference/core/degree_radian.qbk]} +*/ +struct degree {}; + + +/*! +\brief Unit of plane angle: Radians +\details Tag defining the unit of plane angle for spherical coordinate systems. + This tag specifies that coordinates are defined in radians (-PI .. PI). + It has to be specified for some coordinate systems. +\qbk{[include reference/core/degree_radian.qbk]} +*/ +struct radian {}; + + +#ifndef DOXYGEN_NO_DETAIL +namespace core_detail +{ + +template +struct coordinate_system_units +{ + BOOST_MPL_ASSERT_MSG + ((false), + COORDINATE_SYSTEM_UNITS_MUST_BE_DEGREES_OR_RADIANS, + (types)); +}; + +template <> +struct coordinate_system_units +{ + typedef geometry::degree units; +}; + +template <> +struct coordinate_system_units +{ + typedef geometry::radian units; +}; + +} // namespace core_detail +#endif // DOXYGEN_NO_DETAIL + + +namespace cs +{ + +/*! +\brief Cartesian coordinate system +\details Defines the Cartesian or rectangular coordinate system + where points are defined in 2 or 3 (or more) +dimensions and usually (but not always) known as x,y,z +\see http://en.wikipedia.org/wiki/Cartesian_coordinate_system +\ingroup cs +*/ +struct cartesian {}; + + + + +/*! +\brief Geographic coordinate system, in degree or in radian +\details Defines the geographic coordinate system where points + are defined in two angles and usually +known as lat,long or lo,la or phi,lambda +\see http://en.wikipedia.org/wiki/Geographic_coordinate_system +\ingroup cs +\note might be moved to extensions/gis/geographic +*/ +template +struct geographic +{ + typedef typename core_detail::coordinate_system_units + < + DegreeOrRadian + >::units units; +}; + + + +/*! +\brief Spherical (polar) coordinate system, in degree or in radian +\details Defines the spherical coordinate system where points are + defined in two angles + and an optional radius usually known as r, theta, phi +\par Coordinates: +- coordinate 0: + 0 <= phi < 2pi is the angle between the positive x-axis and the + line from the origin to the P projected onto the xy-plane. +- coordinate 1: + 0 <= theta <= pi is the angle between the positive z-axis and the + line formed between the origin and P. +- coordinate 2 (if specified): + r >= 0 is the distance from the origin to a given point P. + +\see http://en.wikipedia.org/wiki/Spherical_coordinates +\ingroup cs +*/ +template +struct spherical +{ + typedef typename core_detail::coordinate_system_units + < + DegreeOrRadian + >::units units; +}; + + +/*! +\brief Spherical equatorial coordinate system, in degree or in radian +\details This one resembles the geographic coordinate system, and has latitude + up from zero at the equator, to 90 at the pole + (opposite to the spherical(polar) coordinate system). + Used in astronomy and in GIS (but there is also the geographic) + +\see http://en.wikipedia.org/wiki/Spherical_coordinates +\ingroup cs +*/ +template +struct spherical_equatorial +{ + typedef typename core_detail::coordinate_system_units + < + DegreeOrRadian + >::units units; +}; + + + +/*! +\brief Polar coordinate system +\details Defines the polar coordinate system "in which each point + on a plane is determined by an angle and a distance" +\see http://en.wikipedia.org/wiki/Polar_coordinates +\ingroup cs +*/ +template +struct polar +{ + typedef typename core_detail::coordinate_system_units + < + DegreeOrRadian + >::units units; +}; + + +} // namespace cs + + +namespace traits +{ + +/*! +\brief Traits class defining coordinate system tag, bound to coordinate system +\ingroup traits +\tparam CoordinateSystem coordinate system +*/ +template +struct cs_tag +{ +}; + + +#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS + +template +struct cs_tag > +{ + typedef geographic_tag type; +}; + +template +struct cs_tag > +{ + typedef spherical_polar_tag type; +}; + +template +struct cs_tag > +{ + typedef spherical_equatorial_tag type; +}; + + +template<> +struct cs_tag +{ + typedef cartesian_tag type; +}; + + +#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS +} // namespace traits + +/*! +\brief Meta-function returning coordinate system tag (cs family) of any geometry +\tparam Geometry \tparam_geometry +\ingroup core +*/ +template +struct cs_tag +{ + typedef typename traits::cs_tag + < + typename geometry::coordinate_system::type + >::type type; +}; + + +/*! +\brief Meta-function to verify if a coordinate system is radian +\tparam CoordinateSystem Any coordinate system. +\ingroup core +*/ +template +struct is_radian : boost::true_type {}; + + +#ifndef DOXYGEN_NO_SPECIALIZATIONS + +// Specialization for any degree coordinate systems +template class CoordinateSystem> +struct is_radian< CoordinateSystem > : boost::false_type +{ +}; + +#endif // DOXYGEN_NO_SPECIALIZATIONS + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_CORE_CS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/exception.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/exception.hpp new file mode 100644 index 0000000000..21abbd577b --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/exception.hpp @@ -0,0 +1,89 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2015 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2015. +// Modifications copyright (c) 2015 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// 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_CORE_EXCEPTION_HPP +#define BOOST_GEOMETRY_CORE_EXCEPTION_HPP + +#include + +namespace boost { namespace geometry +{ + +/*! +\brief Base exception class for Boost.Geometry algorithms +\ingroup core +\details This class is never thrown. All exceptions thrown in Boost.Geometry + are derived from exception, so it might be convenient to catch it. +*/ +class exception : public std::exception +{ +public: + virtual char const* what() const throw() + { + return "Boost.Geometry exception"; + } +}; + +/*! +\brief Invalid Input Exception +\ingroup core +\details The invalid_input_exception is thrown if an invalid attribute + is passed into a function, e.g. a DE-9IM mask string code containing + invalid characters passed into a de9im::mask constructor. + */ +class invalid_input_exception : public geometry::exception +{ +public: + + inline invalid_input_exception() {} + + virtual char const* what() const throw() + { + return "Boost.Geometry Invalid-Input exception"; + } +}; + +/*! +\brief Empty Input Exception +\ingroup core +\details The empty_input_exception is thrown if free functions, e.g. distance, + are called with empty geometries, e.g. a linestring + without points, a polygon without points, an empty multi-geometry. +\qbk{ +[heading See also] +\* [link geometry.reference.algorithms.area the area function] +\* [link geometry.reference.algorithms.distance the distance function] +\* [link geometry.reference.algorithms.length the length function] +} + */ +class empty_input_exception : public geometry::invalid_input_exception +{ +public: + + inline empty_input_exception() {} + + virtual char const* what() const throw() + { + return "Boost.Geometry Empty-Input exception"; + } +}; + + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_CORE_EXCEPTION_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/exterior_ring.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/exterior_ring.hpp new file mode 100644 index 0000000000..fa5a0a2b98 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/exterior_ring.hpp @@ -0,0 +1,145 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_EXTERIOR_RING_HPP +#define BOOST_GEOMETRY_CORE_EXTERIOR_RING_HPP + + +#include +#include +#include + + +#include +#include +#include +#include + + +namespace boost { namespace geometry +{ + +namespace traits +{ + + +/*! + \brief Traits class defining access to exterior_ring of a polygon + \details Should define const and non const access + \ingroup traits + \tparam Polygon the polygon type + \par Geometries: + - polygon + \par Specializations should provide: + - static inline RING& get(POLY& ) + - static inline RING const& get(POLY const& ) +*/ +template +struct exterior_ring +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_POLYGON_TYPE + , (types) + ); +}; + + +} // namespace traits + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + + +template +struct exterior_ring +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + + +template +struct exterior_ring +{ + static + typename geometry::ring_return_type::type + apply(typename add_const_if_c + < + boost::is_const::type::value, + Polygon + >::type& polygon) + { + return traits::exterior_ring + < + typename boost::remove_const::type + >::get(polygon); + } +}; + + +} // namespace core_dispatch +#endif // DOXYGEN_NO_DISPATCH + + +/*! + \brief Function to get the exterior_ring ring of a polygon + \ingroup exterior_ring + \note OGC compliance: instead of ExteriorRing + \tparam Polygon polygon type + \param polygon the polygon to get the exterior ring from + \return a reference to the exterior ring +*/ +template +inline typename ring_return_type::type exterior_ring(Polygon& polygon) +{ + return core_dispatch::exterior_ring + < + typename tag::type, + Polygon + >::apply(polygon); +} + + +/*! +\brief Function to get the exterior ring of a polygon (const version) +\ingroup exterior_ring +\note OGC compliance: instead of ExteriorRing +\tparam Polygon polygon type +\param polygon the polygon to get the exterior ring from +\return a const reference to the exterior ring + +\qbk{distinguish,const version} +*/ +template +inline typename ring_return_type::type exterior_ring( + Polygon const& polygon) +{ + return core_dispatch::exterior_ring + < + typename tag::type, + Polygon const + >::apply(polygon); +} + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_EXTERIOR_RING_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/geometry_id.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/geometry_id.hpp new file mode 100644 index 0000000000..5fc5a80050 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/geometry_id.hpp @@ -0,0 +1,103 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_GEOMETRY_ID_HPP +#define BOOST_GEOMETRY_CORE_GEOMETRY_ID_HPP + + +#include +#include + +#include +#include + + +namespace boost { namespace geometry +{ + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +struct geometry_id +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + + +template <> +struct geometry_id : boost::mpl::int_<1> {}; + + +template <> +struct geometry_id : boost::mpl::int_<2> {}; + + +template <> +struct geometry_id : boost::mpl::int_<3> {}; + + +template <> +struct geometry_id : boost::mpl::int_<4> {}; + + +template <> +struct geometry_id : boost::mpl::int_<5> {}; + + +template <> +struct geometry_id : boost::mpl::int_<6> {}; + + +template <> +struct geometry_id : boost::mpl::int_<92> {}; + + +template <> +struct geometry_id : boost::mpl::int_<93> {}; + + +template <> +struct geometry_id : boost::mpl::int_<94> {}; + + +} // namespace core_dispatch +#endif + + + +/*! +\brief Meta-function returning the id of a geometry type +\details The meta-function geometry_id defines a numerical ID (based on + boost::mpl::int_<...> ) for each geometry concept. A numerical ID is + sometimes useful, and within Boost.Geometry it is used for the + reverse_dispatch metafuntion. +\note Used for e.g. reverse meta-function +\ingroup core +*/ +template +struct geometry_id : core_dispatch::geometry_id::type> +{}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_GEOMETRY_ID_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/interior_rings.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/interior_rings.hpp new file mode 100644 index 0000000000..798f415779 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/interior_rings.hpp @@ -0,0 +1,150 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_INTERIOR_RINGS_HPP +#define BOOST_GEOMETRY_CORE_INTERIOR_RINGS_HPP + +#include + +#include +#include +#include + +#include +#include +#include + +namespace boost { namespace geometry +{ + +namespace traits +{ + + +/*! + \brief Traits class defining access to interior_rings of a polygon + \details defines access (const and non const) to interior ring + \ingroup traits + \par Geometries: + - polygon + \par Specializations should provide: + - static inline INTERIOR& get(POLY&) + - static inline const INTERIOR& get(POLY const&) + \tparam Geometry geometry +*/ +template +struct interior_rings +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + + +} // namespace traits + + + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +< + typename GeometryTag, + typename Geometry +> +struct interior_rings {}; + + +template +struct interior_rings +{ + static inline + typename geometry::interior_return_type::type + apply(Polygon& polygon) + { + return traits::interior_rings + < + typename boost::remove_const::type + >::get(polygon); + } +}; + + +template +struct interior_type +{ + typedef typename core_dispatch::interior_type + < + polygon_tag, + typename boost::range_value::type + >::type type; +}; + + +} // namespace core_dispatch +#endif + + + +/*! +\brief Function to get the interior rings of a polygon (non const version) +\ingroup interior_rings +\note OGC compliance: instead of InteriorRingN +\tparam Polygon polygon type +\param polygon the polygon to get the interior rings from +\return the interior rings (possibly a reference) +*/ + +template +inline typename interior_return_type::type interior_rings(Polygon& polygon) +{ + return core_dispatch::interior_rings + < + typename tag::type, + Polygon + >::apply(polygon); +} + + +/*! +\brief Function to get the interior rings of a polygon (const version) +\ingroup interior_rings +\note OGC compliance: instead of InteriorRingN +\tparam Polygon polygon type +\param polygon the polygon to get the interior rings from +\return the interior rings (possibly a const reference) + +\qbk{distinguish,const version} +*/ +template +inline typename interior_return_type::type interior_rings( + Polygon const& polygon) +{ + return core_dispatch::interior_rings + < + typename tag::type, + Polygon const + >::apply(polygon); +} + + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_INTERIOR_RINGS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/interior_type.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/interior_type.hpp new file mode 100644 index 0000000000..66544b79af --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/interior_type.hpp @@ -0,0 +1,164 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_INTERIOR_TYPE_HPP +#define BOOST_GEOMETRY_CORE_INTERIOR_TYPE_HPP + + +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { namespace geometry +{ + +namespace traits +{ + +/*! +\brief Traits class indicating interior container type of a polygon +\details defines inner container type, so the container containing + the interior rings +\ingroup traits +\par Geometries: + - polygon +\par Specializations should provide: + - typedef X type ( e.g. std::vector<myring<P>> ) +\tparam Geometry geometry +*/ +template +struct interior_const_type +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + +template +struct interior_mutable_type +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + + +} // namespace traits + + + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + + +template +struct interior_return_type +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + + +template +struct interior_return_type +{ + typedef typename boost::remove_const::type nc_polygon_type; + + typedef typename boost::mpl::if_ + < + boost::is_const, + typename traits::interior_const_type::type, + typename traits::interior_mutable_type::type + >::type type; +}; + + + + +template +struct interior_type +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + + +template +struct interior_type +{ + typedef typename boost::remove_reference + < + typename interior_return_type::type + >::type type; +}; + + +} // namespace core_dispatch +#endif + + +/*! +\brief \brief_meta{type, interior_type (container type + of inner rings), \meta_geometry_type} +\details Interior rings should be organized as a container + (std::vector, std::deque, boost::array) with + Boost.Range support. This metafunction defines the type + of the container. +\tparam Geometry A type fullfilling the Polygon or MultiPolygon concept. +\ingroup core + +\qbk{[include reference/core/interior_type.qbk]} +*/ +template +struct interior_type +{ + typedef typename core_dispatch::interior_type + < + typename tag::type, + Geometry + >::type type; +}; + +template +struct interior_return_type +{ + typedef typename core_dispatch::interior_return_type + < + typename tag::type, + Geometry + >::type type; +}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_INTERIOR_TYPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/is_areal.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/is_areal.hpp new file mode 100644 index 0000000000..23858605f4 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/is_areal.hpp @@ -0,0 +1,59 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_IS_AREAL_HPP +#define BOOST_GEOMETRY_CORE_IS_AREAL_HPP + + +#include + +#include +#include + + +namespace boost { namespace geometry +{ + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template struct is_areal : boost::false_type {}; + +template <> struct is_areal : boost::true_type {}; +template <> struct is_areal : boost::true_type {}; +template <> struct is_areal : boost::true_type {}; +template <> struct is_areal : boost::true_type {}; + +} // namespace core_dispatch +#endif + + + +/*! + \brief Meta-function defining "true" for areal types (box, (multi)polygon, ring), + \note Used for tag dispatching and meta-function finetuning + \note Also a "ring" has areal properties within Boost.Geometry + \ingroup core +*/ +template +struct is_areal : core_dispatch::is_areal::type> +{}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_IS_AREAL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/mutable_range.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/mutable_range.hpp new file mode 100644 index 0000000000..7cb5137830 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/mutable_range.hpp @@ -0,0 +1,98 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_MUTABLE_RANGE_HPP +#define BOOST_GEOMETRY_CORE_MUTABLE_RANGE_HPP + + +#include + +#include +#include + + +namespace boost { namespace geometry +{ + + +namespace traits +{ + +/*! +\brief Metafunction to define the argument passed to the three + traits classes clear, push_back and resize +\ingroup mutable_range + */ +template +struct rvalue_type +{ + typedef typename boost::remove_reference::type& type; +}; + + +/*! +\brief Traits class to clear a geometry +\ingroup mutable_range + */ +template +struct clear +{ + static inline void apply(typename rvalue_type::type range) + { + range.clear(); + } +}; + + +/*! +\brief Traits class to append a point to a range (ring, linestring, multi*) +\ingroup mutable_range + */ +template +struct push_back +{ + typedef typename boost::range_value + < + typename boost::remove_reference::type + >::type item_type; + + static inline void apply(typename rvalue_type::type range, + item_type const& item) + { + range.push_back(item); + } +}; + + +/*! +\brief Traits class to append a point to a range (ring, linestring, multi*) +\ingroup mutable_range + */ +template +struct resize +{ + static inline void apply(typename rvalue_type::type range, + std::size_t new_size) + { + range.resize(new_size); + } +}; + + +} // namespace traits + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_MUTABLE_RANGE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/point_order.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/point_order.hpp new file mode 100644 index 0000000000..df6d4bbfff --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/point_order.hpp @@ -0,0 +1,187 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2014. +// Modifications copyright (c) 2014 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// 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_CORE_POINT_ORDER_HPP +#define BOOST_GEOMETRY_CORE_POINT_ORDER_HPP + + +#include +#include + +#include +#include +#include +#include + +namespace boost { namespace geometry +{ + +/*! +\brief Enumerates options for the order of points within polygons +\ingroup enum +\details The enumeration order_selector describes options for the order of + points within a polygon. Polygons can be ordered either clockwise or + counterclockwise. The specific order of a polygon type is defined by the + point_order metafunction. The point_order metafunction defines a value, + which is one of the values enumerated in the order_selector + +\qbk{ +[heading See also] +[link geometry.reference.core.point_order The point_order metafunction] +} +*/ +enum order_selector +{ + /// Points are ordered clockwise + clockwise = 1, + /// Points are ordered counter clockwise + counterclockwise = 2, + /// Points might be stored in any order, algorithms will determine it on the + /// fly (not yet supported) + order_undetermined = 0 +}; + +namespace traits +{ + +/*! +\brief Traits class indicating the order of contained points within a + ring or (multi)polygon, clockwise, counter clockwise or not known. +\ingroup traits +\tparam Ring ring +*/ +template +struct point_order +{ + static const order_selector value = clockwise; +}; + + +} // namespace traits + + +#ifndef DOXYGEN_NO_DETAIL +namespace detail { namespace point_order +{ + +struct clockwise +{ + static const order_selector value = geometry::clockwise; +}; + + +}} // namespace detail::point_order +#endif // DOXYGEN_NO_DETAIL + + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +struct point_order +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + +template +struct point_order + : public detail::point_order::clockwise {}; + +template +struct point_order + : public detail::point_order::clockwise {}; + + +template +struct point_order + : public detail::point_order::clockwise {}; + +template +struct point_order + : public detail::point_order::clockwise {}; + + +template +struct point_order +{ + static const order_selector value + = geometry::traits::point_order::value; +}; + +// Specialization for polygon: the order is the order of its rings +template +struct point_order +{ + static const order_selector value = core_dispatch::point_order + < + ring_tag, + typename ring_type::type + >::value ; +}; + +template +struct point_order + : public detail::point_order::clockwise {}; + +template +struct point_order + : public detail::point_order::clockwise {}; + + +// Specialization for multi_polygon: the order is the order of its polygons +template +struct point_order +{ + static const order_selector value = core_dispatch::point_order + < + polygon_tag, + typename boost::range_value::type + >::value ; +}; + +} // namespace core_dispatch +#endif // DOXYGEN_NO_DISPATCH + + +/*! +\brief \brief_meta{value, point order (clockwise\, counterclockwise), + \meta_geometry_type} +\tparam Geometry \tparam_geometry +\ingroup core + +\qbk{[include reference/core/point_order.qbk]} +*/ +template +struct point_order +{ + static const order_selector value = core_dispatch::point_order + < + typename tag::type, + typename util::bare_type::type + >::value; +}; + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_CORE_POINT_ORDER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/point_type.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/point_type.hpp new file mode 100644 index 0000000000..f70e1fedd5 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/point_type.hpp @@ -0,0 +1,162 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_POINT_TYPE_HPP +#define BOOST_GEOMETRY_CORE_POINT_TYPE_HPP + + +#include +#include +#include + +#include +#include +#include +#include + +namespace boost { namespace geometry +{ + +namespace traits +{ + +/*! +\brief Traits class indicating the type of contained points +\ingroup traits +\par Geometries: + - all geometries except point +\par Specializations should provide: + - typedef P type (where P should fulfil the Point concept) +\tparam Geometry geometry +*/ +template +struct point_type +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_POINT_TYPE, (types) + ); +}; + + +} // namespace traits + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +struct point_type +{ + // Default: call traits to get point type + typedef typename boost::remove_const + < + typename traits::point_type::type + >::type type; +}; + + +// Specialization for point: the point itself +template +struct point_type +{ + typedef Point type; +}; + + +// Specializations for linestring/ring, via boost::range +template +struct point_type +{ + typedef typename boost::range_value::type type; +}; + + +template +struct point_type +{ + typedef typename boost::range_value::type type; +}; + + +// Specialization for polygon: the point-type is the point-type of its rings +template +struct point_type +{ + typedef typename point_type + < + ring_tag, + typename ring_type::type + >::type type; +}; + + +template +struct point_type +{ + typedef typename boost::range_value + < + MultiPoint + >::type type; +}; + + +template +struct point_type +{ + typedef typename point_type + < + linestring_tag, + typename boost::range_value::type + >::type type; +}; + + +template +struct point_type +{ + typedef typename point_type + < + polygon_tag, + typename boost::range_value::type + >::type type; +}; + + +} // namespace core_dispatch +#endif // DOXYGEN_NO_DISPATCH + + +/*! +\brief \brief_meta{type, point_type, \meta_geometry_type} +\tparam Geometry \tparam_geometry +\ingroup core + +\qbk{[include reference/core/point_type.qbk]} +*/ +template +struct point_type +{ + typedef typename core_dispatch::point_type + < + typename tag::type, + typename boost::geometry::util::bare_type::type + >::type type; +}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_POINT_TYPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/radian_access.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/radian_access.hpp new file mode 100644 index 0000000000..993a6cc4c4 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/radian_access.hpp @@ -0,0 +1,263 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2015 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2015. +// Modifications copyright (c) 2015, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle + +// 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_CORE_RADIAN_ACCESS_HPP +#define BOOST_GEOMETRY_CORE_RADIAN_ACCESS_HPP + + +#include + +#include + +#include +#include +#include + + +#include + + + +namespace boost { namespace geometry +{ + + +#ifndef DOXYGEN_NO_DETAIL +namespace detail +{ + +template +struct degree_radian_converter +{ + typedef typename fp_coordinate_type::type coordinate_type; + + static inline coordinate_type get(Geometry const& geometry) + { + return boost::numeric_cast + < + coordinate_type + >(geometry::get(geometry) + * math::d2r()); + } + + static inline void set(Geometry& geometry, coordinate_type const& radians) + { + geometry::set(geometry, boost::numeric_cast + < + coordinate_type + >(radians * math::r2d())); + } + +}; + + +// Default, radian (or any other coordinate system) just works like "get" +template +struct radian_access +{ + typedef typename fp_coordinate_type::type coordinate_type; + + static inline coordinate_type get(Geometry const& geometry) + { + return geometry::get(geometry); + } + + static inline void set(Geometry& geometry, coordinate_type const& radians) + { + geometry::set(geometry, radians); + } +}; + +// Specialize, any "degree" coordinate system will be converted to radian +// but only for dimension 0,1 (so: dimension 2 and heigher are untouched) + +template +< + typename Geometry, + template class CoordinateSystem +> +struct radian_access<0, Geometry, CoordinateSystem > + : degree_radian_converter<0, Geometry> +{}; + + +template +< + typename Geometry, + template class CoordinateSystem +> +struct radian_access<1, Geometry, CoordinateSystem > + : degree_radian_converter<1, Geometry> +{}; + + +template +struct degree_radian_converter_box_segment +{ + typedef typename fp_coordinate_type::type coordinate_type; + + static inline coordinate_type get(Geometry const& geometry) + { + return boost::numeric_cast + < + coordinate_type + >(geometry::get(geometry) + * math::d2r()); + } + + static inline void set(Geometry& geometry, coordinate_type const& radians) + { + geometry::set(geometry, boost::numeric_cast + < + coordinate_type + >(radians * math::r2d())); + } + +}; + + +// Default, radian (or any other coordinate system) just works like "get" +template +struct radian_access_box_segment +{ + typedef typename fp_coordinate_type::type coordinate_type; + + static inline coordinate_type get(Geometry const& geometry) + { + return geometry::get(geometry); + } + + static inline void set(Geometry& geometry, coordinate_type const& radians) + { + geometry::set(geometry, radians); + } +}; + +// Specialize, any "degree" coordinate system will be converted to radian +// but only for dimension 0,1 (so: dimension 2 and heigher are untouched) + +template +< + typename Geometry, + template class CoordinateSystem, + std::size_t Index +> +struct radian_access_box_segment > + : degree_radian_converter_box_segment +{}; + + +template +< + typename Geometry, + template class CoordinateSystem, + std::size_t Index +> +struct radian_access_box_segment > + : degree_radian_converter_box_segment +{}; + +} // namespace detail +#endif // DOXYGEN_NO_DETAIL + + +/*! +\brief get coordinate value of a point, result is in Radian +\details Result is in Radian, even if source coordinate system + is in Degrees +\return coordinate value +\ingroup get +\tparam Dimension dimension +\tparam Geometry geometry +\param geometry geometry to get coordinate value from +\note Only applicable to coordinate systems templatized by units, + e.g. spherical or geographic coordinate systems +*/ +template +inline typename fp_coordinate_type::type get_as_radian(Geometry const& geometry) +{ + return detail::radian_access::type>::get(geometry); +} + +/*! +\brief set coordinate value (in radian) to a point +\details Coordinate value will be set correctly, if coordinate system of + point is in Degree, Radian value will be converted to Degree +\ingroup set +\tparam Dimension dimension +\tparam Geometry geometry +\param geometry geometry to assign coordinate to +\param radians coordinate value to assign +\note Only applicable to coordinate systems templatized by units, + e.g. spherical or geographic coordinate systems +*/ +template +inline void set_from_radian(Geometry& geometry, + typename fp_coordinate_type::type const& radians) +{ + detail::radian_access::type>::set(geometry, radians); +} + +/*! +\brief get coordinate value of a segment or box, result is in Radian +\details Result is in Radian, even if source coordinate system + is in Degrees +\return coordinate value +\ingroup get +\tparam Index index +\tparam Dimension dimension +\tparam Geometry geometry +\param geometry geometry to get coordinate value from +\note Only applicable to coordinate systems templatized by units, + e.g. spherical or geographic coordinate systems +*/ +template +inline typename fp_coordinate_type::type get_as_radian(Geometry const& geometry) +{ + return detail::radian_access_box_segment::type>::get(geometry); +} + +/*! +\brief set coordinate value (in radian) to a segment or box +\details Coordinate value will be set correctly, if coordinate system of + point is in Degree, Radian value will be converted to Degree +\ingroup set +\tparam Index index +\tparam Dimension dimension +\tparam Geometry geometry +\param geometry geometry to assign coordinate to +\param radians coordinate value to assign +\note Only applicable to coordinate systems templatized by units, + e.g. spherical or geographic coordinate systems +*/ +template +inline void set_from_radian(Geometry& geometry, + typename fp_coordinate_type::type const& radians) +{ + detail::radian_access_box_segment::type>::set(geometry, radians); +} + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_RADIAN_ACCESS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/radius.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/radius.hpp new file mode 100644 index 0000000000..6cbf6ac8f2 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/radius.hpp @@ -0,0 +1,251 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2014. +// Modifications copyright (c) 2014 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// 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_CORE_RADIUS_HPP +#define BOOST_GEOMETRY_CORE_RADIUS_HPP + + +#include + +#include +#include + +#include +#include +#include + + +namespace boost { namespace geometry +{ + +namespace traits +{ + +/*! + \brief Traits class to get/set radius of a circle/sphere/(ellipse) + \details the radius access meta-functions give read/write access to the radius of a circle or a sphere, + or to the major/minor axis or an ellipse, or to one of the 3 equatorial radii of an ellipsoid. + + It should be specialized per geometry, in namespace core_dispatch. Those specializations should + forward the call via traits to the geometry class, which could be specified by the user. + + There is a corresponding generic radius_get and radius_set function + \par Geometries: + - n-sphere (circle,sphere) + - upcoming ellipse + \par Specializations should provide: + - inline static T get(Geometry const& geometry) + - inline static void set(Geometry& geometry, T const& radius) + \ingroup traits +*/ +template +struct radius_access {}; + + +/*! + \brief Traits class indicating the type (double,float,...) of the radius of a circle or a sphere + \par Geometries: + - n-sphere (circle,sphere) + - upcoming ellipse + \par Specializations should provide: + - typedef T type (double,float,int,etc) + \ingroup traits +*/ +template +struct radius_type {}; + +} // namespace traits + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +struct radius_type +{ + //typedef core_dispatch_specialization_required type; +}; + +/*! + \brief radius access meta-functions, used by concept n-sphere and upcoming ellipse. +*/ +template +struct radius_access +{ + //static inline CoordinateType get(Geometry const& ) {} + //static inline void set(Geometry& g, CoordinateType const& value) {} +}; + +} // namespace core_dispatch +#endif // DOXYGEN_NO_DISPATCH + + +/*! + \brief Metafunction to get the type of radius of a circle / sphere / ellipse / etc. + \ingroup access + \tparam Geometry the type of geometry +*/ +template +struct radius_type +{ + typedef typename core_dispatch::radius_type + < + typename tag::type, + typename util::bare_type::type + >::type type; +}; + +/*! + \brief Function to get radius of a circle / sphere / ellipse / etc. + \return radius The radius for a given axis + \ingroup access + \param geometry the geometry to get the radius from + \tparam I index of the axis +*/ +template +inline typename radius_type::type get_radius(Geometry const& geometry) +{ + return core_dispatch::radius_access + < + typename tag::type, + typename util::bare_type::type, + I, + typename boost::is_pointer::type + >::get(geometry); +} + +/*! + \brief Function to set the radius of a circle / sphere / ellipse / etc. + \ingroup access + \tparam I index of the axis + \param geometry the geometry to change + \param radius the radius to set +*/ +template +inline void set_radius(Geometry& geometry, + typename radius_type::type const& radius) +{ + core_dispatch::radius_access + < + typename tag::type, + typename util::bare_type::type, + I, + typename boost::is_pointer::type + >::set(geometry, radius); +} + + + +#ifndef DOXYGEN_NO_DETAIL +namespace detail +{ + +template +struct radius_access +{ + static inline typename radius_type::type get(Geometry const& geometry) + { + return traits::radius_access::get(geometry); + } + static inline void set(Geometry& geometry, + typename radius_type::type const& value) + { + traits::radius_access::set(geometry, value); + } +}; + +} // namespace detail +#endif // DOXYGEN_NO_DETAIL + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +struct radius_access +{ + typedef typename geometry::radius_type::type radius_type; + + static inline radius_type get(const Geometry * geometry) + { + return radius_access + < + Tag, + Geometry, + Dimension, + typename boost::is_pointer::type + >::get(*geometry); + } + + static inline void set(Geometry * geometry, radius_type const& value) + { + return radius_access + < + Tag, + Geometry, + Dimension, + typename boost::is_pointer::type + >::set(*geometry, value); + } +}; + + +template +struct radius_type +{ + typedef typename traits::radius_type::type type; +}; + +template +struct radius_access + : detail::radius_access +{ + BOOST_STATIC_ASSERT(Dimension == 0); + //BOOST_STATIC_ASSERT(Dimension < 3); +}; + +template +struct radius_type +{ + typedef typename traits::radius_type::type type; +}; + +template +struct radius_access + : detail::radius_access +{ + BOOST_STATIC_ASSERT(Dimension == 0 || Dimension == 2); + //BOOST_STATIC_ASSERT(Dimension < 3); +}; + +} // namespace core_dispatch +#endif // DOXYGEN_NO_DISPATCH + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_RADIUS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/reverse_dispatch.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/reverse_dispatch.hpp new file mode 100644 index 0000000000..c95182a34d --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/reverse_dispatch.hpp @@ -0,0 +1,66 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_REVERSE_DISPATCH_HPP +#define BOOST_GEOMETRY_CORE_REVERSE_DISPATCH_HPP + + +#include + +#include +#include + +#include + + +namespace boost { namespace geometry +{ + + +#ifndef DOXYGEN_NO_DETAIL +namespace detail +{ + +// Different geometries: reverse_dispatch if second ID < first ID +template +struct reverse_dispatch : boost::mpl::if_c + < + (GeometryId1 > GeometryId2), + boost::true_type, + boost::false_type + > +{}; + + +// Same geometry: never reverse_dispatch +template +struct reverse_dispatch : boost::false_type {}; + + +} // namespace detail +#endif // DOXYGEN_NO_DETAIL + + +template +struct reverse_dispatch : detail::reverse_dispatch + < + geometry_id::type::value, + geometry_id::type::value + > +{}; + + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_CORE_REVERSE_DISPATCH_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/ring_type.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/ring_type.hpp new file mode 100644 index 0000000000..c007931126 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/ring_type.hpp @@ -0,0 +1,226 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2015 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2015. +// Modifications copyright (c) 2015, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle + +// 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_CORE_RING_TYPE_HPP +#define BOOST_GEOMETRY_CORE_RING_TYPE_HPP + + +#include +#include +#include +#include +#include +#include + +#include +#include + + +namespace boost { namespace geometry +{ + +namespace traits +{ + + +/*! +\brief Traits class to indicate ring-type of a polygon's exterior ring/interior rings +\ingroup traits +\par Geometries: + - polygon +\par Specializations should provide: + - typedef XXX type ( e.g. ring

) +\tparam Geometry geometry +*/ +template +struct ring_const_type +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + +template +struct ring_mutable_type +{ + BOOST_MPL_ASSERT_MSG + ( + false, NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE + , (types) + ); +}; + + +} // namespace traits + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + +template +struct ring_return_type +{}; + + +template +struct ring_return_type +{ + typedef LineString& type; +}; + + +template +struct ring_return_type +{ + typedef Ring& type; +}; + + +template +struct ring_return_type +{ + typedef typename boost::remove_const::type nc_polygon_type; + + typedef typename boost::mpl::if_ + < + boost::is_const, + typename traits::ring_const_type::type, + typename traits::ring_mutable_type::type + >::type type; +}; + + +template +struct ring_return_type +{ + typedef typename ring_return_type + < + linestring_tag, + typename boost::mpl::if_ + < + boost::is_const, + typename boost::range_value::type const, + typename boost::range_value::type + >::type + >::type type; +}; + + +template +struct ring_return_type +{ + typedef typename ring_return_type + < + polygon_tag, + typename boost::mpl::if_ + < + boost::is_const, + typename boost::range_value::type const, + typename boost::range_value::type + >::type + >::type type; +}; + + +template +struct ring_type +{}; + + +template +struct ring_type +{ + typedef Ring type; +}; + + +template +struct ring_type +{ + typedef typename boost::remove_reference + < + typename ring_return_type::type + >::type type; +}; + + +template +struct ring_type +{ + typedef typename boost::remove_reference + < + typename ring_return_type::type + >::type type; +}; + + +template +struct ring_type +{ + typedef typename boost::remove_reference + < + typename ring_return_type::type + >::type type; +}; + + +} // namespace core_dispatch +#endif + + +/*! +\brief \brief_meta{type, ring_type, \meta_geometry_type} +\details A polygon contains one exterior ring + and zero or more interior rings (holes). + This metafunction retrieves the type of the rings. + Exterior ring and each of the interior rings all have the same ring_type. +\tparam Geometry A type fullfilling the Ring, Polygon or MultiPolygon concept. +\ingroup core + +\qbk{[include reference/core/ring_type.qbk]} +*/ +template +struct ring_type +{ + typedef typename core_dispatch::ring_type + < + typename tag::type, + Geometry + >::type type; +}; + + +template +struct ring_return_type +{ + typedef typename core_dispatch::ring_return_type + < + typename tag::type, + Geometry + >::type type; +}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_RING_TYPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/srs.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/srs.hpp new file mode 100644 index 0000000000..5c78b9f1fc --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/srs.hpp @@ -0,0 +1,196 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2014, 2016, 2017. +// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// 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_CORE_SRS_HPP +#define BOOST_GEOMETRY_CORE_SRS_HPP + + +#include + +#include + +#include +#include +#include + + +namespace boost { namespace geometry +{ + +namespace srs +{ + +/*! + \brief Defines spheroid radius values for use in geographical CS calculations + \note See http://en.wikipedia.org/wiki/Figure_of_the_Earth + and http://en.wikipedia.org/wiki/World_Geodetic_System#A_new_World_Geodetic_System:_WGS84 +*/ +template +class spheroid +{ +public: + spheroid(RadiusType const& a, RadiusType const& b) + : m_a(a) + , m_b(b) + {} + + spheroid() + : m_a(RadiusType(6378137.0)) + , m_b(RadiusType(6356752.3142451793)) + {} + + template + RadiusType get_radius() const + { + BOOST_STATIC_ASSERT(I < 3); + + return I < 2 ? m_a : m_b; + } + + template + void set_radius(RadiusType const& radius) + { + BOOST_STATIC_ASSERT(I < 3); + + (I < 2 ? m_a : m_b) = radius; + } + +private: + RadiusType m_a, m_b; // equatorial radius, polar radius +}; + +} // namespace srs + +// Traits specializations for spheroid +#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS +namespace traits +{ + +template +struct tag< srs::spheroid > +{ + typedef srs_spheroid_tag type; +}; + +template +struct radius_type< srs::spheroid > +{ + typedef RadiusType type; +}; + +template +struct radius_access, Dimension> +{ + typedef srs::spheroid spheroid_type; + + static inline RadiusType get(spheroid_type const& s) + { + return s.template get_radius(); + } + + static inline void set(spheroid_type& s, RadiusType const& value) + { + s.template set_radius(value); + } +}; + +} // namespace traits +#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS + + +namespace srs +{ + +/*! + \brief Defines sphere radius value for use in spherical CS calculations +*/ +template +class sphere +{ +public: + explicit sphere(RadiusType const& r) + : m_r(r) + {} + + sphere() + : m_r(RadiusType((2.0 * 6378137.0 + 6356752.3142451793) / 3.0)) + {} + + template + RadiusType get_radius() const + { + BOOST_STATIC_ASSERT(I < 3); + + return m_r; + } + + template + void set_radius(RadiusType const& radius) + { + BOOST_STATIC_ASSERT(I < 3); + + m_r = radius; + } + +private: + RadiusType m_r; // radius +}; + +} // namespace srs + +// Traits specializations for sphere +#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS +namespace traits +{ + +template +struct tag< srs::sphere > +{ + typedef srs_sphere_tag type; +}; + +template +struct radius_type< srs::sphere > +{ + typedef RadiusType type; +}; + +template +struct radius_access, Dimension> +{ + typedef srs::sphere sphere_type; + + static inline RadiusType get(sphere_type const& s) + { + return s.template get_radius(); + } + + static inline void set(sphere_type& s, RadiusType const& value) + { + s.template set_radius(value); + } +}; + +} // namespace traits +#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_SRS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/tag.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/tag.hpp new file mode 100644 index 0000000000..14a2242708 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/tag.hpp @@ -0,0 +1,69 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_TAG_HPP +#define BOOST_GEOMETRY_CORE_TAG_HPP + + +#include +#include + + +namespace boost { namespace geometry +{ + +namespace traits +{ + +/*! +\brief Traits class to attach a tag to a geometry +\details All geometries should implement a traits::tag::type metafunction to indicate their + own geometry type. +\ingroup traits +\par Geometries: + - all geometries +\par Specializations should provide: + - typedef XXX_tag type; (point_tag, box_tag, ...) +\tparam Geometry geometry +*/ +template +struct tag +{ + typedef void type; +}; + +} // namespace traits + + + +/*! +\brief \brief_meta{type, tag, \meta_geometry_type} +\details With Boost.Geometry, tags are the driving force of the tag dispatching + mechanism. The tag metafunction is therefore used in every free function. +\tparam Geometry \tparam_geometry +\ingroup core + +\qbk{[include reference/core/tag.qbk]} +*/ +template +struct tag +{ + typedef typename traits::tag + < + typename geometry::util::bare_type::type + >::type type; +}; + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_CORE_TAG_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/tag_cast.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/tag_cast.hpp new file mode 100644 index 0000000000..e03d841f49 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/tag_cast.hpp @@ -0,0 +1,84 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_TAG_CAST_HPP +#define BOOST_GEOMETRY_CORE_TAG_CAST_HPP + + +#include +#include + +namespace boost { namespace geometry +{ + +/*! +\brief Metafunction defining a type being either the specified tag, or one + of the specified basetags if the type inherits from them. +\details Tags can inherit each other. A multi_point inherits, for example, + both the multi_tag and the pointlike_tag. Often behaviour can be shared + between different geometry types. A tag, found by the metafunction tag, + can be casted to a more basic tag, and then dispatched by that tag. +\ingroup core +\tparam Tag The tag to be casted to one of the base tags +\tparam BaseTag First base tag +\tparam BaseTag2 Optional second base tag +\tparam BaseTag3 Optional third base tag +\tparam BaseTag4 Optional fourth base tag +\tparam BaseTag5 Optional fifth base tag +\tparam BaseTag6 Optional sixth base tag +\tparam BaseTag7 Optional seventh base tag + +\qbk{[include reference/core/tag_cast.qbk]} +*/ +template +< + typename Tag, + typename BaseTag, + typename BaseTag2 = void, + typename BaseTag3 = void, + typename BaseTag4 = void, + typename BaseTag5 = void, + typename BaseTag6 = void, + typename BaseTag7 = void +> +struct tag_cast +{ + typedef typename boost::mpl::if_ + < + typename boost::is_base_of::type, + BaseTag, + // Try next one in line: + typename tag_cast + < + Tag, BaseTag2, BaseTag3, BaseTag4, + BaseTag5, BaseTag6, BaseTag7, void + >::type + >::type type; +}; + +#ifndef DOXYGEN_NO_SPECIALIZATIONS + +// Specialization for last one +template +struct tag_cast +{ + // If not found, take specified tag, so do not cast + typedef Tag type; +}; + +#endif // DOXYGEN_NO_SPECIALIZATIONS + + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_CORE_TAG_CAST_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/tags.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/tags.hpp new file mode 100644 index 0000000000..5d6acb1878 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/tags.hpp @@ -0,0 +1,150 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2014. +// Modifications copyright (c) 2014 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// 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_CORE_TAGS_HPP +#define BOOST_GEOMETRY_CORE_TAGS_HPP + + +namespace boost { namespace geometry +{ + +// Tags defining strategies linked to coordinate systems + +/// Tag used for casting spherical/geographic coordinate systems +struct spherical_tag {}; + + +/// Tag indicating Cartesian coordinate system family (cartesian,epsg) +struct cartesian_tag {}; + +/// Tag indicating Spherical polar coordinate system family +struct spherical_polar_tag : spherical_tag {}; + +/// Tag indicating Spherical equatorial coordinate system family +struct spherical_equatorial_tag : spherical_tag {}; + +/// Tag indicating Geographic coordinate system family (geographic) +struct geographic_tag : spherical_tag {}; + + +// Tags defining coordinate systems reference models + +/// For reference spheroid defining parameters of geographical coordinate system +struct srs_spheroid_tag {}; + +/// For reference sphere defining parameters of spherical coordinate system +struct srs_sphere_tag : srs_spheroid_tag {}; + + +// Tags defining tag hierarchy + +/// For single-geometries (point, linestring, polygon, box, ring, segment) +struct single_tag {}; + + +/// For multiple-geometries (multi_point, multi_linestring, multi_polygon) +struct multi_tag {}; + +/// For point-like types (point, multi_point) +struct pointlike_tag {}; + +/// For linear types (linestring, multi-linestring, segment) +struct linear_tag {}; + +/// For areal types (polygon, multi_polygon, box, ring) +struct areal_tag {}; + +// Subset of areal types (polygon, multi_polygon, ring) +struct polygonal_tag : areal_tag {}; + +/// For volume types (also box (?), polyhedron) +struct volumetric_tag {}; + + +// Tags defining geometry types + + +/// "default" tag +struct geometry_not_recognized_tag {}; + +/// OGC Point identifying tag +struct point_tag : single_tag, pointlike_tag {}; + +/// OGC Linestring identifying tag +struct linestring_tag : single_tag, linear_tag {}; + +/// OGC Polygon identifying tag +struct polygon_tag : single_tag, polygonal_tag {}; + +/// Convenience (linear) ring identifying tag +struct ring_tag : single_tag, polygonal_tag {}; + +/// Convenience 2D or 3D box (mbr / aabb) identifying tag +struct box_tag : single_tag, areal_tag {}; + +/// Convenience segment (2-points) identifying tag +struct segment_tag : single_tag, linear_tag {}; + + +/// 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 +struct single_tag_of +{}; + +#ifndef DOXYGEN_NO_DETAIL + +template <> +struct single_tag_of +{ + typedef point_tag type; +}; + +template <> +struct single_tag_of +{ + typedef linestring_tag type; +}; + +template <> +struct single_tag_of +{ + typedef polygon_tag type; +}; + +#endif + + +}} // namespace boost::geometry + +#endif // BOOST_GEOMETRY_CORE_TAGS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/geometry/core/topological_dimension.hpp b/contrib/libboost/boost_1_65_0/boost/geometry/core/topological_dimension.hpp new file mode 100644 index 0000000000..22ed676fc6 --- /dev/null +++ b/contrib/libboost/boost_1_65_0/boost/geometry/core/topological_dimension.hpp @@ -0,0 +1,101 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2012 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_CORE_TOPOLOGICAL_DIMENSION_HPP +#define BOOST_GEOMETRY_CORE_TOPOLOGICAL_DIMENSION_HPP + + +#include + + +#include +#include + + +namespace boost { namespace geometry +{ + + +#ifndef DOXYGEN_NO_DISPATCH +namespace core_dispatch +{ + + +template +struct top_dim {}; + + +template <> +struct top_dim : boost::mpl::int_<0> {}; + + +template <> +struct top_dim : boost::mpl::int_<1> {}; + + +template <> +struct top_dim : boost::mpl::int_<1> {}; + + +// ring: topological dimension of two, but some people say: 1 !! +// NOTE: This is not OGC LinearRing! +template <> +struct top_dim : boost::mpl::int_<2> {}; + + +// TODO: This is wrong! Boxes may have various topological dimensions +template <> +struct top_dim : boost::mpl::int_<2> {}; + + +template <> +struct top_dim : boost::mpl::int_<2> {}; + + +template <> +struct top_dim : boost::mpl::int_<0> {}; + + +template <> +struct top_dim : boost::mpl::int_<1> {}; + + +template <> +struct top_dim : boost::mpl::int_<2> {}; + + +} // namespace core_dispatch +#endif + + + + + +/*! + \brief Meta-function returning the topological dimension of a geometry + \details The topological dimension defines a point as 0-dimensional, + a linestring as 1-dimensional, + and a ring or polygon as 2-dimensional. + \see http://www.math.okstate.edu/mathdept/dynamics/lecnotes/node36.html + \ingroup core +*/ +template +struct topological_dimension + : core_dispatch::top_dim::type> {}; + + +}} // namespace boost::geometry + + +#endif // BOOST_GEOMETRY_CORE_TOPOLOGICAL_DIMENSION_HPP