add boost on mac

This commit is contained in:
Bassem Girgis
2019-08-10 16:38:17 -05:00
parent 861b918727
commit be945cb63b
14105 changed files with 2714968 additions and 0 deletions

View File

@@ -0,0 +1,193 @@
// 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.
// This file was modified by Oracle on 2013, 2014.
// Modifications copyright (c) 2013, 2014, Oracle and/or its affiliates.
// 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)
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_RANGE_BY_SECTION_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_RANGE_BY_SECTION_HPP
#include <boost/mpl/assert.hpp>
#include <boost/range.hpp>
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/assert.hpp>
#include <boost/geometry/core/closure.hpp>
#include <boost/geometry/core/exterior_ring.hpp>
#include <boost/geometry/core/interior_rings.hpp>
#include <boost/geometry/core/ring_type.hpp>
#include <boost/geometry/core/tags.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/util/range.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_DETAIL
namespace detail { namespace section
{
template <typename Range, typename Section>
struct full_section_range
{
static inline Range const& apply(Range const& range, Section const& )
{
return range;
}
};
template <typename Polygon, typename Section>
struct full_section_polygon
{
static inline typename ring_return_type<Polygon const>::type apply(Polygon const& polygon, Section const& section)
{
return section.ring_id.ring_index < 0
? geometry::exterior_ring(polygon)
: range::at(geometry::interior_rings(polygon),
static_cast<std::size_t>(section.ring_id.ring_index));
}
};
template
<
typename MultiGeometry,
typename Section,
typename Policy
>
struct full_section_multi
{
static inline typename ring_return_type<MultiGeometry const>::type apply(
MultiGeometry const& multi, Section const& section)
{
typedef typename boost::range_size<MultiGeometry>::type size_type;
BOOST_GEOMETRY_ASSERT
(
section.ring_id.multi_index >= 0
&& size_type(section.ring_id.multi_index) < boost::size(multi)
);
return Policy::apply(range::at(multi, size_type(section.ring_id.multi_index)), section);
}
};
}} // namespace detail::section
#endif
#ifndef DOXYGEN_NO_DISPATCH
namespace dispatch
{
template
<
typename Tag,
typename Geometry,
typename Section
>
struct range_by_section
{
BOOST_MPL_ASSERT_MSG
(
false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
, (types<Geometry>)
);
};
template <typename LineString, typename Section>
struct range_by_section<linestring_tag, LineString, Section>
: detail::section::full_section_range<LineString, Section>
{};
template <typename Ring, typename Section>
struct range_by_section<ring_tag, Ring, Section>
: detail::section::full_section_range<Ring, Section>
{};
template <typename Polygon, typename Section>
struct range_by_section<polygon_tag, Polygon, Section>
: detail::section::full_section_polygon<Polygon, Section>
{};
template <typename MultiPolygon, typename Section>
struct range_by_section<multi_polygon_tag, MultiPolygon, Section>
: detail::section::full_section_multi
<
MultiPolygon,
Section,
detail::section::full_section_polygon
<
typename boost::range_value<MultiPolygon>::type,
Section
>
>
{};
template <typename MultiLinestring, typename Section>
struct range_by_section<multi_linestring_tag, MultiLinestring, Section>
: detail::section::full_section_multi
<
MultiLinestring,
Section,
detail::section::full_section_range
<
typename boost::range_value<MultiLinestring>::type,
Section
>
>
{};
} // namespace dispatch
#endif
/*!
\brief Get full ring (exterior, one of interiors, one from multi)
indicated by the specified section
\ingroup sectionalize
\tparam Geometry type
\tparam Section type of section to get from
\param geometry geometry to take section of
\param section structure with section
*/
template <typename Geometry, typename Section>
inline typename ring_return_type<Geometry const>::type
range_by_section(Geometry const& geometry, Section const& section)
{
concepts::check<Geometry const>();
return dispatch::range_by_section
<
typename tag<Geometry>::type,
Geometry,
Section
>::apply(geometry, section);
}
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_RANGE_BY_SECTION_HPP

View File

@@ -0,0 +1,57 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
// This file was modified by Oracle on 2018.
// Modifications copyright (c) 2018, 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_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP
#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
#include <boost/geometry/algorithms/expand.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_DETAIL
namespace detail { namespace section
{
template <typename ExpandBoxStrategy>
struct get_section_box
{
template <typename Box, typename Section>
static inline void apply(Box& total, Section const& section)
{
geometry::expand(total, section.bounding_box,
ExpandBoxStrategy());
}
};
template <typename DisjointBoxBoxStrategy>
struct overlaps_section_box
{
template <typename Box, typename Section>
static inline bool apply(Box const& box, Section const& section)
{
return ! detail::disjoint::disjoint_box_box(box, section.bounding_box,
DisjointBoxBoxStrategy());
}
};
}} // namespace detail::section
#endif
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTION_BOX_POLICIES_HPP

View File

@@ -0,0 +1,162 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
// This file was modified by Oracle on 2015, 2017, 2018.
// Modifications copyright (c) 2015-2018, 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_ALGORITHMS_DETAIL_SECTIONS_FUNCTIONS_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_FUNCTIONS_HPP
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/algorithms/detail/recalculate.hpp>
#include <boost/geometry/policies/robustness/robust_point_type.hpp>
// For spherical/geographic longitudes covered_by point/box
#include <boost/geometry/strategies/cartesian/point_in_box.hpp>
#include <boost/geometry/util/select_coordinate_type.hpp>
namespace boost { namespace geometry
{
#ifndef DOXYGEN_NO_DETAIL
namespace detail { namespace section
{
// TODO: This code is CS-specific, should be moved to strategies
template
<
std::size_t Dimension,
typename Geometry,
typename CastedCSTag = typename tag_cast
<
typename cs_tag<Geometry>::type,
spherical_tag
>::type
>
struct preceding_check
{
template <typename Point, typename Box>
static inline bool apply(int dir, Point const& point, Box const& /*point_box*/, Box const& other_box)
{
return (dir == 1 && get<Dimension>(point) < get<min_corner, Dimension>(other_box))
|| (dir == -1 && get<Dimension>(point) > get<max_corner, Dimension>(other_box));
}
};
template <typename Geometry>
struct preceding_check<0, Geometry, spherical_tag>
{
template <typename Point, typename Box>
static inline bool apply(int dir, Point const& point, Box const& point_box, Box const& other_box)
{
typedef typename select_coordinate_type
<
Point, Box
>::type calc_t;
typedef typename coordinate_system<Point>::type::units units_t;
calc_t const c0 = 0;
calc_t const value = get<0>(point);
calc_t const other_min = get<min_corner, 0>(other_box);
calc_t const other_max = get<max_corner, 0>(other_box);
bool const pt_covered = strategy::within::detail::covered_by_range
<
Point, 0, spherical_tag
>::apply(value,
other_min,
other_max);
if (pt_covered)
{
return false;
}
if (dir == 1)
{
calc_t const diff_min = math::longitude_distance_signed
<
units_t, calc_t
>(other_min, value);
calc_t const diff_min_min = math::longitude_distance_signed
<
units_t, calc_t
>(other_min, get<min_corner, 0>(point_box));
return diff_min < c0 && diff_min_min <= c0 && diff_min_min <= diff_min;
}
else if (dir == -1)
{
calc_t const diff_max = math::longitude_distance_signed
<
units_t, calc_t
>(other_max, value);
calc_t const diff_max_max = math::longitude_distance_signed
<
units_t, calc_t
>(other_max, get<max_corner, 0>(point_box));
return diff_max > c0 && diff_max_max >= c0 && diff_max <= diff_max_max;
}
return false;
}
};
template
<
std::size_t Dimension,
typename Point,
typename RobustBox,
typename RobustPolicy
>
static inline bool preceding(int dir,
Point const& point,
RobustBox const& point_robust_box,
RobustBox const& other_robust_box,
RobustPolicy const& robust_policy)
{
typename geometry::robust_point_type<Point, RobustPolicy>::type robust_point;
geometry::recalculate(robust_point, point, robust_policy);
return preceding_check<Dimension, Point>::apply(dir, robust_point, point_robust_box, other_robust_box);
}
template
<
std::size_t Dimension,
typename Point,
typename RobustBox,
typename RobustPolicy
>
static inline bool exceeding(int dir,
Point const& point,
RobustBox const& point_robust_box,
RobustBox const& other_robust_box,
RobustPolicy const& robust_policy)
{
return preceding<Dimension>(-dir, point, point_robust_box, other_robust_box, robust_policy);
}
}} // namespace detail::section
#endif
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_FUNCTIONS_HPP

File diff suppressed because it is too large Load Diff