mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 21:44:04 +00:00
Merge pull request #748 from awulkiew/feature/type_traits
Remove direct usage of Boost.MPL and Boost.TypeTraits from the library.
This commit is contained in:
commit
ab9f1de1ad
4
.github/workflows/minimal-gcc.yml
vendored
4
.github/workflows/minimal-gcc.yml
vendored
@ -20,7 +20,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
b2_toolset: [
|
||||
gcc-4.9,
|
||||
gcc-5,
|
||||
gcc-6,
|
||||
gcc-7,
|
||||
@ -29,9 +28,6 @@ jobs:
|
||||
]
|
||||
|
||||
include:
|
||||
- b2_toolset: gcc-4.9
|
||||
b2_cxxstd: 14
|
||||
version: "4.9"
|
||||
- b2_toolset: gcc-5
|
||||
b2_cxxstd: 14
|
||||
version: "5"
|
||||
|
@ -14,6 +14,8 @@
|
||||
#define BOOST_GEOMETRY_STRATEGY_AREA_RESULT_HPP
|
||||
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
|
||||
@ -23,11 +25,8 @@
|
||||
#include <boost/geometry/strategy/area.hpp>
|
||||
|
||||
#include <boost/geometry/util/select_most_precise.hpp>
|
||||
#include <boost/geometry/util/select_sequence_element.hpp>
|
||||
#include <boost/geometry/util/sequence.hpp>
|
||||
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/variant/variant_fwd.hpp>
|
||||
|
||||
|
||||
@ -61,6 +60,46 @@ struct area_result<Geometry, Strategy, false>
|
||||
{};
|
||||
|
||||
|
||||
template <typename Geometry>
|
||||
struct default_area_result
|
||||
: area_result
|
||||
<
|
||||
Geometry,
|
||||
typename geometry::strategies::area::services::default_strategy
|
||||
<
|
||||
Geometry
|
||||
>::type
|
||||
>
|
||||
{};
|
||||
|
||||
template <typename Curr, typename Next>
|
||||
struct more_precise_coordinate_type
|
||||
: std::is_same
|
||||
<
|
||||
typename geometry::coordinate_type<Curr>::type,
|
||||
typename geometry::select_most_precise
|
||||
<
|
||||
typename geometry::coordinate_type<Curr>::type,
|
||||
typename geometry::coordinate_type<Next>::type
|
||||
>::type
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template <typename Curr, typename Next>
|
||||
struct more_precise_default_area_result
|
||||
: std::is_same
|
||||
<
|
||||
typename default_area_result<Curr>::type,
|
||||
typename geometry::select_most_precise
|
||||
<
|
||||
typename default_area_result<Curr>::type,
|
||||
typename default_area_result<Next>::type
|
||||
>::type
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
}} // namespace detail::area
|
||||
#endif //DOXYGEN_NO_DETAIL
|
||||
|
||||
@ -79,13 +118,14 @@ struct area_result
|
||||
: detail::area::area_result<Geometry, Strategy>
|
||||
{};
|
||||
|
||||
template <BOOST_VARIANT_ENUM_PARAMS(typename T), typename Strategy>
|
||||
struct area_result<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Strategy>
|
||||
template <typename ...Ts, typename Strategy>
|
||||
struct area_result<boost::variant<Ts...>, Strategy>
|
||||
: geometry::area_result
|
||||
<
|
||||
typename geometry::util::select_sequence_element
|
||||
typename util::select_pack_element
|
||||
<
|
||||
typename boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>::types
|
||||
detail::area::more_precise_coordinate_type,
|
||||
Ts...
|
||||
>::type,
|
||||
Strategy
|
||||
>
|
||||
@ -93,53 +133,17 @@ struct area_result<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Strategy>
|
||||
|
||||
template <typename Geometry>
|
||||
struct area_result<Geometry, default_strategy>
|
||||
: geometry::area_result
|
||||
<
|
||||
Geometry,
|
||||
typename geometry::strategies::area::services::default_strategy
|
||||
<
|
||||
Geometry
|
||||
>::type
|
||||
>
|
||||
: detail::area::default_area_result<Geometry>
|
||||
{};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace area
|
||||
{
|
||||
|
||||
template <typename Curr, typename Next>
|
||||
struct pred_more_precise_default_area_result
|
||||
{
|
||||
typedef typename geometry::area_result<Curr, default_strategy>::type curr_result_t;
|
||||
typedef typename geometry::area_result<Next, default_strategy>::type next_result_t;
|
||||
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
boost::is_same
|
||||
<
|
||||
curr_result_t,
|
||||
typename geometry::select_most_precise
|
||||
<
|
||||
curr_result_t,
|
||||
next_result_t
|
||||
>::type
|
||||
>::value,
|
||||
Curr,
|
||||
Next
|
||||
>::type type;
|
||||
};
|
||||
|
||||
}} // namespace detail::area
|
||||
#endif //DOXYGEN_NO_DETAIL
|
||||
|
||||
template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
|
||||
struct area_result<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, default_strategy>
|
||||
template <typename ...Ts>
|
||||
struct area_result<boost::variant<Ts...>, default_strategy>
|
||||
: geometry::area_result
|
||||
<
|
||||
typename geometry::util::select_sequence_element
|
||||
typename util::select_pack_element
|
||||
<
|
||||
typename boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>::types,
|
||||
geometry::detail::area::pred_more_precise_default_area_result
|
||||
detail::area::more_precise_default_area_result,
|
||||
Ts...
|
||||
>::type,
|
||||
default_strategy
|
||||
>
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Samuel Debionne, Grenoble, France.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -21,7 +25,6 @@
|
||||
#include <boost/concept/requires.hpp>
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/numeric/conversion/bounds.hpp>
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -15,7 +19,7 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_CLEAR_HPP
|
||||
|
||||
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
@ -54,14 +58,14 @@ struct polygon_clear
|
||||
{
|
||||
traits::clear
|
||||
<
|
||||
typename boost::remove_reference
|
||||
typename std::remove_reference
|
||||
<
|
||||
typename traits::interior_mutable_type<Polygon>::type
|
||||
>::type
|
||||
>::apply(interior_rings(polygon));
|
||||
traits::clear
|
||||
<
|
||||
typename boost::remove_reference
|
||||
typename std::remove_reference
|
||||
<
|
||||
typename traits::ring_mutable_type<Polygon>::type
|
||||
>::type
|
||||
|
@ -21,11 +21,10 @@
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_array.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
@ -226,7 +225,7 @@ struct polygon_to_polygon
|
||||
// Container should be resizeable
|
||||
traits::resize
|
||||
<
|
||||
typename boost::remove_reference
|
||||
typename std::remove_reference
|
||||
<
|
||||
typename traits::interior_mutable_type<Polygon2>::type
|
||||
>::type
|
||||
@ -295,10 +294,15 @@ template
|
||||
typename Tag1 = typename tag_cast<typename tag<Geometry1>::type, multi_tag>::type,
|
||||
typename Tag2 = typename tag_cast<typename tag<Geometry2>::type, multi_tag>::type,
|
||||
std::size_t DimensionCount = dimension<Geometry1>::type::value,
|
||||
bool UseAssignment = boost::is_same<Geometry1, Geometry2>::value
|
||||
&& !boost::is_array<Geometry1>::value
|
||||
bool UseAssignment = std::is_same<Geometry1, Geometry2>::value
|
||||
&& !std::is_array<Geometry1>::value
|
||||
>
|
||||
struct convert: not_implemented<Tag1, Tag2, boost::mpl::int_<DimensionCount> >
|
||||
struct convert
|
||||
: not_implemented
|
||||
<
|
||||
Tag1, Tag2,
|
||||
std::integral_constant<std::size_t, DimensionCount>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
@ -456,7 +460,7 @@ struct convert<Polygon, Ring, polygon_tag, ring_tag, DimensionCount, false>
|
||||
|
||||
// Dispatch for multi <-> multi, specifying their single-version as policy.
|
||||
// Note that, even if the multi-types are mutually different, their single
|
||||
// version types might be the same and therefore we call boost::is_same again
|
||||
// version types might be the same and therefore we call std::is_same again
|
||||
|
||||
template <typename Multi1, typename Multi2, std::size_t DimensionCount>
|
||||
struct convert<Multi1, Multi2, multi_tag, multi_tag, DimensionCount, false>
|
||||
|
@ -26,7 +26,6 @@
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -19,8 +23,6 @@
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/util/add_const_if_c.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -31,22 +33,20 @@ namespace dispatch
|
||||
{
|
||||
|
||||
|
||||
template <typename GeometryTag, typename Geometry, typename Range, bool IsConst>
|
||||
template <typename GeometryTag, typename Geometry, typename Range>
|
||||
struct as_range
|
||||
{
|
||||
static inline typename add_const_if_c<IsConst, Range>::type& get(
|
||||
typename add_const_if_c<IsConst, Geometry>::type& input)
|
||||
static inline Range& get(Geometry& input)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <typename Geometry, typename Range, bool IsConst>
|
||||
struct as_range<polygon_tag, Geometry, Range, IsConst>
|
||||
template <typename Geometry, typename Range>
|
||||
struct as_range<polygon_tag, Geometry, Range>
|
||||
{
|
||||
static inline typename add_const_if_c<IsConst, Range>::type& get(
|
||||
typename add_const_if_c<IsConst, Geometry>::type& input)
|
||||
static inline Range& get(Geometry& input)
|
||||
{
|
||||
return exterior_ring(input);
|
||||
}
|
||||
@ -73,8 +73,7 @@ inline Range& as_range(Geometry& input)
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
Geometry,
|
||||
Range,
|
||||
false
|
||||
Range
|
||||
>::get(input);
|
||||
}
|
||||
|
||||
@ -91,9 +90,8 @@ inline Range const& as_range(Geometry const& input)
|
||||
return dispatch::as_range
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
Geometry,
|
||||
Range,
|
||||
true
|
||||
Geometry const,
|
||||
Range const
|
||||
>::get(input);
|
||||
}
|
||||
|
||||
|
@ -7,10 +7,11 @@
|
||||
// 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 2018.
|
||||
// Modifications copyright (c) 2018, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
// 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
|
||||
@ -25,7 +26,6 @@
|
||||
#include <boost/concept/requires.hpp>
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/numeric/conversion/bounds.hpp>
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2012-2020 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017-2020.
|
||||
// Modifications copyright (c) 2017-2020 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,
|
||||
@ -16,21 +16,10 @@
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
#include <boost/range.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/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/buffer.hpp>
|
||||
#include <boost/geometry/strategies/side.hpp>
|
||||
#include <boost/geometry/algorithms/detail/direction_code.hpp>
|
||||
#include <boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp>
|
||||
#include <boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp>
|
||||
@ -38,6 +27,18 @@
|
||||
#include <boost/geometry/algorithms/num_interior_rings.hpp>
|
||||
#include <boost/geometry/algorithms/simplify.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/strategies/buffer.hpp>
|
||||
#include <boost/geometry/strategies/side.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
#include <boost/geometry/views/detail/normalized_view.hpp>
|
||||
|
||||
|
||||
@ -942,11 +943,7 @@ inline void buffer_inserter(GeometryInput const& geometry_input, OutputIterator
|
||||
collection_type collection(intersection_strategy, distance_strategy, robust_policy);
|
||||
collection_type const& const_collection = collection;
|
||||
|
||||
bool const areal = boost::is_same
|
||||
<
|
||||
typename tag_cast<typename tag<GeometryInput>::type, areal_tag>::type,
|
||||
areal_tag
|
||||
>::type::value;
|
||||
bool const areal = util::is_areal<GeometryInput>::value;
|
||||
|
||||
dispatch::buffer_inserter
|
||||
<
|
||||
|
@ -3,8 +3,8 @@
|
||||
// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2016-2019.
|
||||
// Modifications copyright (c) 2016-2019 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2016-2020.
|
||||
// Modifications copyright (c) 2016-2020 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,
|
||||
@ -241,7 +241,7 @@ struct buffered_piece_collection
|
||||
// The dimension is critical because the direction is later used
|
||||
// in the optimization for within checks using winding strategy
|
||||
// and this strategy is scanning in x direction.
|
||||
typedef boost::mpl::vector_c<std::size_t, 0> dimensions;
|
||||
typedef std::integer_sequence<std::size_t, 0> dimensions;
|
||||
geometry::sectionalize<false, dimensions>(m_ring,
|
||||
detail::no_rescale_policy(), m_sections,
|
||||
envelope_strategy, expand_strategy);
|
||||
@ -854,7 +854,7 @@ struct buffered_piece_collection
|
||||
typedef geometry::detail::sectionalize::sectionalize_part
|
||||
<
|
||||
point_type,
|
||||
boost::mpl::vector_c<std::size_t, 0, 1> // x,y dimension
|
||||
std::integer_sequence<std::size_t, 0, 1> // x,y dimension
|
||||
> sectionalizer;
|
||||
|
||||
// Create a ring-identifier. The source-index is the piece index
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2015-2020 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2015, 2017, 2019.
|
||||
// Modifications copyright (c) 2015-2019 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2015-2020.
|
||||
// Modifications copyright (c) 2015-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@ -16,6 +16,8 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DIRECTION_CODE_HPP
|
||||
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/arithmetic/infinite_line_functions.hpp>
|
||||
#include <boost/geometry/algorithms/detail/make/make.hpp>
|
||||
@ -91,7 +93,7 @@ struct direction_code_impl<spherical_equatorial_tag>
|
||||
typedef typename coordinate_type<Point2>::type coord2_t;
|
||||
typedef typename cs_angular_units<Point1>::type units_t;
|
||||
typedef typename cs_angular_units<Point2>::type units2_t;
|
||||
BOOST_MPL_ASSERT_MSG((boost::is_same<units_t, units2_t>::value),
|
||||
BOOST_MPL_ASSERT_MSG((std::is_same<units_t, units2_t>::value),
|
||||
NOT_IMPLEMENTED_FOR_DIFFERENT_UNITS,
|
||||
(units_t, units2_t));
|
||||
|
||||
@ -223,16 +225,16 @@ struct direction_code_impl<spherical_tag>
|
||||
{
|
||||
return direction_code_impl
|
||||
<
|
||||
typename boost::mpl::if_c
|
||||
std::conditional_t
|
||||
<
|
||||
boost::is_same
|
||||
std::is_same
|
||||
<
|
||||
typename geometry::cs_tag<Point1>::type,
|
||||
spherical_polar_tag
|
||||
>::value,
|
||||
spherical_polar_tag,
|
||||
spherical_equatorial_tag
|
||||
>::type
|
||||
>
|
||||
>::apply(segment_a, segment_b, p);
|
||||
}
|
||||
};
|
||||
|
@ -6,8 +6,8 @@
|
||||
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
// Copyright (c) 2014 Samuel Debionne, Grenoble, France.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2018.
|
||||
// Modifications copyright (c) 2014-2018, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@ -24,10 +24,6 @@
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
|
||||
#include <boost/mpl/always.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
@ -1,8 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@ -10,7 +11,8 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_IS_COMPARABLE_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHS_DETAIL_DISTANCE_IS_COMPARABLE_HPP
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
|
||||
@ -26,7 +28,7 @@ namespace detail { namespace distance
|
||||
// metafunction to determine is a strategy is comparable or not
|
||||
template <typename Strategy>
|
||||
struct is_comparable
|
||||
: boost::is_same
|
||||
: std::is_same
|
||||
<
|
||||
Strategy,
|
||||
typename strategy::distance::services::comparable_type
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2019.
|
||||
// Modifications copyright (c) 2014-2019, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@ -22,10 +22,10 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_POINT_TO_GEOMETRY_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/geometry/core/closure.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
@ -259,7 +259,7 @@ template
|
||||
typename Point,
|
||||
typename MultiGeometry,
|
||||
typename Strategy,
|
||||
bool CheckCoveredBy = boost::is_same
|
||||
bool CheckCoveredBy = std::is_same
|
||||
<
|
||||
typename tag<MultiGeometry>::type, multi_polygon_tag
|
||||
>::value
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014-2019 Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
@ -13,14 +13,12 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_SEGMENT_TO_BOX_HPP
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <functional>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
@ -771,19 +769,19 @@ public:
|
||||
if (detail::equals::equals_point_point(p[0], p[1],
|
||||
sb_strategy.get_equals_point_point_strategy()))
|
||||
{
|
||||
typedef typename boost::mpl::if_
|
||||
typedef std::conditional_t
|
||||
<
|
||||
boost::is_same
|
||||
std::is_same
|
||||
<
|
||||
ps_comparable_strategy,
|
||||
SBStrategy
|
||||
>,
|
||||
>::value,
|
||||
typename strategy::distance::services::comparable_type
|
||||
<
|
||||
typename SBStrategy::distance_pb_strategy::type
|
||||
>::type,
|
||||
typename SBStrategy::distance_pb_strategy::type
|
||||
>::type point_box_strategy_type;
|
||||
> point_box_strategy_type;
|
||||
|
||||
return dispatch::distance
|
||||
<
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2015-2018, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2015-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
@ -13,9 +13,9 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_RANGE_OF_BOXES_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_RANGE_OF_BOXES_HPP
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
@ -239,7 +239,7 @@ struct envelope_range_of_boxes
|
||||
RangeOfBoxes const
|
||||
>::type iterator_type;
|
||||
|
||||
static const bool is_equatorial = ! boost::is_same
|
||||
static const bool is_equatorial = ! std::is_same
|
||||
<
|
||||
typename cs_tag<box_type>::type,
|
||||
spherical_polar_tag
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2015, 2016, 2017, 2018, 2019.
|
||||
// Modifications copyright (c) 2014-2019 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
@ -23,10 +23,10 @@
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
@ -243,14 +243,14 @@ struct equals_by_collection_or_relate
|
||||
Geometry2 const& geometry2,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef typename boost::is_base_of
|
||||
typedef std::is_base_of
|
||||
<
|
||||
nyi::not_implemented_tag,
|
||||
typename collected_vector
|
||||
<
|
||||
Geometry1, Geometry2, Strategy
|
||||
>::type
|
||||
>::type enable_relate_type;
|
||||
> enable_relate_type;
|
||||
|
||||
return apply(geometry1, geometry2, strategy, enable_relate_type());
|
||||
}
|
||||
@ -260,7 +260,7 @@ private:
|
||||
static inline bool apply(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
Strategy const& strategy,
|
||||
boost::false_type /*enable_relate*/)
|
||||
std::false_type /*enable_relate*/)
|
||||
{
|
||||
return equals_by_collection<TrivialCheck>::apply(geometry1, geometry2, strategy);
|
||||
}
|
||||
@ -269,7 +269,7 @@ private:
|
||||
static inline bool apply(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
Strategy const& strategy,
|
||||
boost::true_type /*enable_relate*/)
|
||||
std::true_type /*enable_relate*/)
|
||||
{
|
||||
return equals_by_relate<Geometry1, Geometry2>::apply(geometry1, geometry2, strategy);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2015-2019, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2015-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -11,10 +11,9 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_EXPAND_BY_EPSILON_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_EXPAND_BY_EPSILON_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
@ -79,7 +78,7 @@ struct corner_by_epsilon<Point, PlusOrMinus, D, D>
|
||||
template
|
||||
<
|
||||
typename Box,
|
||||
bool Enable = ! boost::is_integral<typename coordinate_type<Box>::type>::value
|
||||
bool Enable = ! std::is_integral<typename coordinate_type<Box>::type>::value
|
||||
>
|
||||
struct expand_by_epsilon
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_FOR_EACH_RANGE_HPP
|
||||
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <boost/concept/requires.hpp>
|
||||
@ -26,14 +27,12 @@
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tag_cast.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/util/add_const_if_c.hpp>
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
#include <boost/geometry/views/box_view.hpp>
|
||||
#include <boost/geometry/views/segment_view.hpp>
|
||||
@ -66,7 +65,7 @@ struct fe_range_segment
|
||||
template <typename Functor>
|
||||
static inline bool apply(Segment& segment, Functor&& f)
|
||||
{
|
||||
return f(segment_view<typename boost::remove_const<Segment>::type>(segment));
|
||||
return f(segment_view<typename std::remove_const<Segment>::type>(segment));
|
||||
}
|
||||
};
|
||||
|
||||
@ -101,7 +100,7 @@ struct fe_range_box
|
||||
template <typename Functor>
|
||||
static inline bool apply(Box& box, Functor&& f)
|
||||
{
|
||||
return f(box_view<typename boost::remove_const<Box>::type>(box));
|
||||
return f(box_view<typename std::remove_const<Box>::type>(box));
|
||||
}
|
||||
};
|
||||
|
||||
@ -196,11 +195,11 @@ struct for_each_range<Geometry, multi_linestring_tag>
|
||||
Geometry,
|
||||
detail::for_each::fe_range_range
|
||||
<
|
||||
typename add_const_if_c
|
||||
util::transcribe_const_t
|
||||
<
|
||||
boost::is_const<Geometry>::value,
|
||||
Geometry,
|
||||
typename boost::range_value<Geometry>::type
|
||||
>::type
|
||||
>
|
||||
>
|
||||
>
|
||||
{};
|
||||
@ -213,11 +212,11 @@ struct for_each_range<Geometry, multi_polygon_tag>
|
||||
Geometry,
|
||||
detail::for_each::fe_range_polygon
|
||||
<
|
||||
typename add_const_if_c
|
||||
util::transcribe_const_t
|
||||
<
|
||||
boost::is_const<Geometry>::value,
|
||||
Geometry,
|
||||
typename boost::range_value<Geometry>::type
|
||||
>::type
|
||||
>
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
@ -14,9 +14,10 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTION_MULTI_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_INTERSECTION_MULTI_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/core/closure.hpp>
|
||||
#include <boost/geometry/core/geometry_id.hpp>
|
||||
#include <boost/geometry/core/is_areal.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
@ -446,12 +447,12 @@ struct intersection_insert
|
||||
MultiLinestring, Ring, TupledOut,
|
||||
// NOTE: points can be the result only in case of intersection.
|
||||
// TODO: union should require L and A
|
||||
typename boost::mpl::if_c
|
||||
std::conditional_t
|
||||
<
|
||||
(OverlayType == overlay_intersection),
|
||||
point_tag,
|
||||
void
|
||||
>::type,
|
||||
>,
|
||||
linestring_tag
|
||||
>
|
||||
{};
|
||||
@ -484,12 +485,12 @@ struct intersection_insert
|
||||
MultiLinestring, Polygon, TupledOut,
|
||||
// NOTE: points can be the result only in case of intersection.
|
||||
// TODO: union should require L and A
|
||||
typename boost::mpl::if_c
|
||||
std::conditional_t
|
||||
<
|
||||
(OverlayType == overlay_intersection),
|
||||
point_tag,
|
||||
void
|
||||
>::type,
|
||||
>,
|
||||
linestring_tag
|
||||
>
|
||||
{};
|
||||
@ -524,12 +525,12 @@ struct intersection_insert
|
||||
// TODO: in general the result of difference should depend on the first argument
|
||||
// but this specialization calls L/A in reality so the first argument is linear.
|
||||
// So expect only L for difference?
|
||||
typename boost::mpl::if_c
|
||||
std::conditional_t
|
||||
<
|
||||
(OverlayType == overlay_intersection),
|
||||
point_tag,
|
||||
void
|
||||
>::type,
|
||||
>,
|
||||
linestring_tag
|
||||
>
|
||||
{};
|
||||
@ -561,12 +562,12 @@ struct intersection_insert
|
||||
MultiLinestring, MultiPolygon, TupledOut,
|
||||
// NOTE: points can be the result only in case of intersection.
|
||||
// TODO: union should require L and A
|
||||
typename boost::mpl::if_c
|
||||
std::conditional_t
|
||||
<
|
||||
(OverlayType == overlay_intersection),
|
||||
point_tag,
|
||||
void
|
||||
>::type,
|
||||
>,
|
||||
linestring_tag
|
||||
>
|
||||
{};
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014-2018, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@ -12,8 +12,7 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_HAS_INVALID_COORDINATE_HPP
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/check_iterator_range.hpp>
|
||||
#include <boost/geometry/algorithms/validity_failure_type.hpp>
|
||||
@ -115,7 +114,7 @@ template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Tag = typename tag<Geometry>::type,
|
||||
bool HasFloatingPointCoordinates = boost::is_floating_point
|
||||
bool HasFloatingPointCoordinates = std::is_floating_point
|
||||
<
|
||||
typename coordinate_type<Geometry>::type
|
||||
>::value
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014-2019, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@ -12,10 +12,10 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_IS_VALID_HAS_SPIKES_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
@ -137,8 +137,8 @@ struct has_spikes
|
||||
typedef typename closeable_view<Range const, Closure>::type view_type;
|
||||
typedef typename boost::range_iterator<view_type const>::type iterator;
|
||||
|
||||
bool const is_linear
|
||||
= boost::is_same<typename tag<Range>::type, linestring_tag>::value;
|
||||
bool const is_linestring
|
||||
= std::is_same<typename tag<Range>::type, linestring_tag>::value;
|
||||
|
||||
view_type const view(range);
|
||||
|
||||
@ -169,7 +169,7 @@ struct has_spikes
|
||||
if (detail::is_spike_or_equal(*next, *cur, *prev, strategy))
|
||||
{
|
||||
return
|
||||
! visitor.template apply<failure_spikes>(is_linear, *cur);
|
||||
! visitor.template apply<failure_spikes>(is_linestring, *cur);
|
||||
}
|
||||
prev = cur;
|
||||
cur = next;
|
||||
@ -180,7 +180,7 @@ struct has_spikes
|
||||
equals_point_point(range::front(view), range::back(view),
|
||||
strategy.get_equals_point_point_strategy()))
|
||||
{
|
||||
return apply_at_closure(view, visitor, strategy, is_linear);
|
||||
return apply_at_closure(view, visitor, strategy, is_linestring);
|
||||
}
|
||||
|
||||
return ! visitor.template apply<no_failure>();
|
||||
|
@ -35,6 +35,7 @@
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
#include <boost/geometry/util/sequence.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
|
||||
@ -243,7 +244,7 @@ protected:
|
||||
inline bool apply(partition_item<Iterator, Box> const& item1,
|
||||
partition_item<Iterator, Box> const& item2)
|
||||
{
|
||||
typedef boost::mpl::vector
|
||||
typedef util::type_sequence
|
||||
<
|
||||
geometry::de9im::static_mask<'T'>,
|
||||
geometry::de9im::static_mask<'*', 'T'>,
|
||||
|
@ -1,8 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2015, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2015-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@ -11,14 +12,12 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_MAX_INTERVAL_GAP_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <queue>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/core/ref.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
@ -49,7 +48,7 @@ public:
|
||||
typedef typename Interval::value_type time_type;
|
||||
|
||||
sweep_event(Interval const& interval, bool start_event = true)
|
||||
: m_interval(boost::cref(interval))
|
||||
: m_interval(std::cref(interval))
|
||||
, m_start_event(start_event)
|
||||
{}
|
||||
|
||||
@ -81,7 +80,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
boost::reference_wrapper<Interval const> m_interval;
|
||||
std::reference_wrapper<Interval const> m_interval;
|
||||
bool m_start_event;
|
||||
};
|
||||
|
||||
@ -118,15 +117,6 @@ class event_visitor
|
||||
typedef typename Event::time_type event_time_type;
|
||||
typedef typename Event::interval_type::difference_type difference_type;
|
||||
|
||||
typedef typename boost::remove_const
|
||||
<
|
||||
typename boost::remove_reference
|
||||
<
|
||||
event_time_type
|
||||
>::type
|
||||
>::type bare_time_type;
|
||||
|
||||
|
||||
public:
|
||||
event_visitor()
|
||||
: m_overlap_count(0)
|
||||
@ -162,12 +152,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bare_time_type const& max_gap_left() const
|
||||
event_time_type const& max_gap_left() const
|
||||
{
|
||||
return m_max_gap_left;
|
||||
}
|
||||
|
||||
bare_time_type const& max_gap_right() const
|
||||
event_time_type const& max_gap_right() const
|
||||
{
|
||||
return m_max_gap_right;
|
||||
}
|
||||
@ -179,7 +169,7 @@ public:
|
||||
|
||||
private:
|
||||
std::size_t m_overlap_count;
|
||||
bare_time_type m_max_gap_left, m_max_gap_right;
|
||||
event_time_type m_max_gap_left, m_max_gap_right;
|
||||
};
|
||||
|
||||
}} // namespace detail::max_interval_gap
|
||||
@ -256,18 +246,9 @@ template <typename RangeOfIntervals>
|
||||
inline typename boost::range_value<RangeOfIntervals>::type::difference_type
|
||||
maximum_gap(RangeOfIntervals const& range_of_intervals)
|
||||
{
|
||||
typedef typename boost::remove_const
|
||||
<
|
||||
typename boost::remove_reference
|
||||
<
|
||||
typename boost::range_value
|
||||
<
|
||||
RangeOfIntervals
|
||||
>::type::value_type
|
||||
>::type
|
||||
>::type value_type;
|
||||
typedef typename boost::range_value<RangeOfIntervals>::type interval_type;
|
||||
|
||||
value_type left, right;
|
||||
typename interval_type::value_type left, right;
|
||||
|
||||
return maximum_gap(range_of_intervals, left, right);
|
||||
}
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2017, 2018.
|
||||
// Modifications copyright (c) 2014-2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -14,6 +14,9 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_APPEND_NO_DUPS_OR_SPIKES_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_APPEND_NO_DUPS_OR_SPIKES_HPP
|
||||
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
@ -64,7 +67,7 @@ inline bool points_equal_or_close(Point1 const& point1,
|
||||
geometry::recalculate(point2_rob, point2, robust_policy);
|
||||
|
||||
// Only if this is the case the same strategy can be used.
|
||||
BOOST_STATIC_ASSERT((boost::is_same
|
||||
BOOST_STATIC_ASSERT((std::is_same
|
||||
<
|
||||
typename geometry::cs_tag<Point1>::type,
|
||||
typename geometry::cs_tag<robust_point_type>::type
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2017, 2018.
|
||||
// Modifications copyright (c) 2014-2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@ -16,12 +16,12 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_COPY_SEGMENTS_HPP
|
||||
|
||||
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/assign_box_corners.hpp>
|
||||
#include <boost/geometry/algorithms/detail/signed_size_type.hpp>
|
||||
@ -130,7 +130,7 @@ private:
|
||||
Point const& point,
|
||||
SideStrategy const& strategy,
|
||||
RobustPolicy const& robust_policy,
|
||||
boost::true_type const&)
|
||||
std::true_type const&)
|
||||
{
|
||||
detail::overlay::append_no_dups_or_spikes(current_output, point,
|
||||
strategy,
|
||||
@ -143,7 +143,7 @@ private:
|
||||
Point const& point,
|
||||
SideStrategy const& strategy,
|
||||
RobustPolicy const&,
|
||||
boost::false_type const&)
|
||||
std::false_type const&)
|
||||
{
|
||||
detail::overlay::append_no_duplicates(current_output, point, strategy.get_equals_point_point_strategy());
|
||||
}
|
||||
@ -182,7 +182,7 @@ public:
|
||||
for (signed_size_type i = 0; i < count; ++i, ++it)
|
||||
{
|
||||
append_to_output(current_output, *it, strategy, robust_policy,
|
||||
boost::integral_constant<bool, RemoveSpikes>());
|
||||
std::integral_constant<bool, RemoveSpikes>());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -3,6 +3,10 @@
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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)
|
||||
@ -25,16 +29,16 @@ template <order_selector Selector, bool Reverse = false>
|
||||
struct do_reverse {};
|
||||
|
||||
template <>
|
||||
struct do_reverse<clockwise, false> : boost::false_type {};
|
||||
struct do_reverse<clockwise, false> : std::false_type {};
|
||||
|
||||
template <>
|
||||
struct do_reverse<clockwise, true> : boost::true_type {};
|
||||
struct do_reverse<clockwise, true> : std::true_type {};
|
||||
|
||||
template <>
|
||||
struct do_reverse<counterclockwise, false> : boost::true_type {};
|
||||
struct do_reverse<counterclockwise, false> : std::true_type {};
|
||||
|
||||
template <>
|
||||
struct do_reverse<counterclockwise, true> : boost::false_type {};
|
||||
struct do_reverse<counterclockwise, true> : std::false_type {};
|
||||
|
||||
|
||||
}} // namespace detail::overlay
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017-2020.
|
||||
// Modifications copyright (c) 2017-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
@ -59,7 +59,7 @@ struct get_turn_without_info
|
||||
OutputIterator out)
|
||||
{
|
||||
// Make sure this is only called with no rescaling
|
||||
BOOST_STATIC_ASSERT((boost::is_same
|
||||
BOOST_STATIC_ASSERT((std::is_same
|
||||
<
|
||||
no_rescale_policy_tag,
|
||||
typename rescale_policy_type<RobustPolicy>::type
|
||||
@ -117,7 +117,7 @@ inline void get_intersection_points(Geometry1 const& geometry1,
|
||||
|
||||
detail::get_turns::no_interrupt_policy interrupt_policy;
|
||||
|
||||
boost::mpl::if_c
|
||||
std::conditional_t
|
||||
<
|
||||
reverse_dispatch<Geometry1, Geometry2>::type::value,
|
||||
dispatch::get_turns_reversed
|
||||
@ -136,12 +136,11 @@ inline void get_intersection_points(Geometry1 const& geometry1,
|
||||
false, false,
|
||||
TurnPolicy
|
||||
>
|
||||
>::type::apply(
|
||||
0, geometry1,
|
||||
1, geometry2,
|
||||
strategy,
|
||||
robust_policy,
|
||||
turns, interrupt_policy);
|
||||
>::apply(0, geometry1,
|
||||
1, geometry2,
|
||||
strategy,
|
||||
robust_policy,
|
||||
turns, interrupt_policy);
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,10 +22,22 @@
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/point_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/segment_identifier.hpp>
|
||||
#include <boost/geometry/algorithms/detail/partition.hpp>
|
||||
#include <boost/geometry/algorithms/detail/recalculate.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/section_box_policies.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/section_functions.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
@ -35,14 +47,8 @@
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/views/closeable_view.hpp>
|
||||
#include <boost/geometry/views/reversible_view.hpp>
|
||||
#include <boost/geometry/views/detail/range_type.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
#include <boost/geometry/geometries/segment.hpp>
|
||||
|
||||
#include <boost/geometry/iterators/ever_circling_iterator.hpp>
|
||||
@ -50,22 +56,13 @@
|
||||
#include <boost/geometry/strategies/intersection_strategies.hpp>
|
||||
#include <boost/geometry/strategies/intersection_result.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/point_point.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
|
||||
#include <boost/geometry/algorithms/detail/partition.hpp>
|
||||
#include <boost/geometry/algorithms/detail/recalculate.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/section_box_policies.hpp>
|
||||
#include <boost/geometry/views/closeable_view.hpp>
|
||||
#include <boost/geometry/views/reversible_view.hpp>
|
||||
#include <boost/geometry/views/detail/range_type.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/segment_identifier.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/sections/range_by_section.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/sectionalize.hpp>
|
||||
#include <boost/geometry/algorithms/detail/sections/section_functions.hpp>
|
||||
|
||||
#ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION
|
||||
# include <sstream>
|
||||
@ -267,15 +264,7 @@ class get_turns_in_sections
|
||||
|
||||
boost::ignore_unused(n, index1, index2);
|
||||
|
||||
return boost::is_same
|
||||
<
|
||||
typename tag_cast
|
||||
<
|
||||
typename geometry::tag<Geometry>::type,
|
||||
areal_tag
|
||||
>::type,
|
||||
areal_tag
|
||||
>::value
|
||||
return util::is_areal<Geometry>::value
|
||||
&& index1 == 0
|
||||
&& index2 >= n - 2
|
||||
;
|
||||
@ -296,17 +285,8 @@ public :
|
||||
{
|
||||
boost::ignore_unused(interrupt_policy);
|
||||
|
||||
static bool const areal1 = boost::is_same
|
||||
<
|
||||
typename tag_cast<typename tag<Geometry1>::type, areal_tag>::type,
|
||||
areal_tag
|
||||
>::type::value;
|
||||
static bool const areal2 = boost::is_same
|
||||
<
|
||||
typename tag_cast<typename tag<Geometry2>::type, areal_tag>::type,
|
||||
areal_tag
|
||||
>::type::value;
|
||||
|
||||
static bool const areal1 = util::is_areal<Geometry1>::value;
|
||||
static bool const areal2 = util::is_areal<Geometry2>::value;
|
||||
|
||||
if ((sec1.duplicate && (sec1.count + 1) < sec1.range_count)
|
||||
|| (sec2.duplicate && (sec2.count + 1) < sec2.range_count))
|
||||
@ -571,7 +551,7 @@ public:
|
||||
typedef geometry::sections<box_type, 2> sections_type;
|
||||
|
||||
sections_type sec1, sec2;
|
||||
typedef boost::mpl::vector_c<std::size_t, 0, 1> dimensions;
|
||||
typedef std::integer_sequence<std::size_t, 0, 1> dimensions;
|
||||
|
||||
typename IntersectionStrategy::envelope_strategy_type const
|
||||
envelope_strategy = intersection_strategy.get_envelope_strategy();
|
||||
@ -1174,7 +1154,7 @@ inline void get_turns(Geometry1 const& geometry1,
|
||||
typedef detail::overlay::get_turn_info<AssignPolicy> TurnPolicy;
|
||||
//typedef detail::get_turns::get_turn_info_type<Geometry1, Geometry2, AssignPolicy> TurnPolicy;
|
||||
|
||||
boost::mpl::if_c
|
||||
std::conditional_t
|
||||
<
|
||||
reverse_dispatch<Geometry1, Geometry2>::type::value,
|
||||
dispatch::get_turns_reversed
|
||||
@ -1193,11 +1173,11 @@ inline void get_turns(Geometry1 const& geometry1,
|
||||
Reverse1, Reverse2,
|
||||
TurnPolicy
|
||||
>
|
||||
>::type::apply(0, geometry1,
|
||||
1, geometry2,
|
||||
intersection_strategy,
|
||||
robust_policy,
|
||||
turns, interrupt_policy);
|
||||
>::apply(0, geometry1,
|
||||
1, geometry2,
|
||||
intersection_strategy,
|
||||
robust_policy,
|
||||
turns, interrupt_policy);
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2015, 2017, 2019, 2020.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
@ -17,13 +17,11 @@
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/core/is_areal.hpp>
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/core/reverse_dispatch.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
@ -78,7 +76,7 @@ struct intersection_segment_segment_point
|
||||
Strategy const& strategy)
|
||||
{
|
||||
// Make sure this is only called with no rescaling
|
||||
BOOST_STATIC_ASSERT((boost::is_same
|
||||
BOOST_STATIC_ASSERT((std::is_same
|
||||
<
|
||||
no_rescale_policy_tag,
|
||||
typename rescale_policy_type<RobustPolicy>::type
|
||||
@ -127,7 +125,7 @@ struct intersection_linestring_linestring_point
|
||||
Strategy const& strategy)
|
||||
{
|
||||
// Make sure this is only called with no rescaling
|
||||
BOOST_STATIC_ASSERT((boost::is_same
|
||||
BOOST_STATIC_ASSERT((std::is_same
|
||||
<
|
||||
no_rescale_policy_tag,
|
||||
typename rescale_policy_type<RobustPolicy>::type
|
||||
@ -285,7 +283,7 @@ struct intersection_of_linestring_with_areal
|
||||
Strategy const& strategy)
|
||||
{
|
||||
// Make sure this is only called with no rescaling
|
||||
BOOST_STATIC_ASSERT((boost::is_same
|
||||
BOOST_STATIC_ASSERT((std::is_same
|
||||
<
|
||||
no_rescale_policy_tag,
|
||||
typename rescale_policy_type<RobustPolicy>::type
|
||||
@ -456,7 +454,7 @@ struct intersection_linear_areal_point
|
||||
Strategy const& strategy)
|
||||
{
|
||||
// Make sure this is only called with no rescaling
|
||||
BOOST_STATIC_ASSERT((boost::is_same
|
||||
BOOST_STATIC_ASSERT((std::is_same
|
||||
<
|
||||
no_rescale_policy_tag,
|
||||
typename rescale_policy_type<RobustPolicy>::type
|
||||
@ -936,12 +934,12 @@ struct intersection_insert
|
||||
<
|
||||
Linear1, Linear2, TupledOut,
|
||||
// NOTE: points can be the result only in case of intersection.
|
||||
typename boost::mpl::if_c
|
||||
std::conditional_t
|
||||
<
|
||||
(OverlayType == overlay_intersection),
|
||||
point_tag,
|
||||
void
|
||||
>::type,
|
||||
>,
|
||||
linestring_tag
|
||||
>
|
||||
{
|
||||
@ -1428,26 +1426,26 @@ inline OutputIterator insert(Geometry1 const& geometry1,
|
||||
OutputIterator out,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
return boost::mpl::if_c
|
||||
<
|
||||
geometry::reverse_dispatch<Geometry1, Geometry2>::type::value,
|
||||
geometry::dispatch::intersection_insert_reversed
|
||||
return std::conditional_t
|
||||
<
|
||||
Geometry1, Geometry2,
|
||||
GeometryOut,
|
||||
OverlayType,
|
||||
overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
|
||||
overlay::do_reverse<geometry::point_order<Geometry2>::value, ReverseSecond>::value
|
||||
>,
|
||||
geometry::dispatch::intersection_insert
|
||||
<
|
||||
Geometry1, Geometry2,
|
||||
GeometryOut,
|
||||
OverlayType,
|
||||
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
|
||||
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, ReverseSecond>::value
|
||||
>
|
||||
>::type::apply(geometry1, geometry2, robust_policy, out, strategy);
|
||||
geometry::reverse_dispatch<Geometry1, Geometry2>::type::value,
|
||||
geometry::dispatch::intersection_insert_reversed
|
||||
<
|
||||
Geometry1, Geometry2,
|
||||
GeometryOut,
|
||||
OverlayType,
|
||||
overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
|
||||
overlay::do_reverse<geometry::point_order<Geometry2>::value, ReverseSecond>::value
|
||||
>,
|
||||
geometry::dispatch::intersection_insert
|
||||
<
|
||||
Geometry1, Geometry2,
|
||||
GeometryOut,
|
||||
OverlayType,
|
||||
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
|
||||
geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, ReverseSecond>::value
|
||||
>
|
||||
>::apply(geometry1, geometry2, robust_policy, out, strategy);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2017, 2018.
|
||||
// Modifications copyright (c) 2017-2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017-2020.
|
||||
// Modifications copyright (c) 2017-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
@ -152,7 +151,7 @@ struct get_turns
|
||||
// all potential spikes correctly
|
||||
typedef geometry::sections<box_type, 2> sections_type;
|
||||
|
||||
typedef boost::mpl::vector_c<std::size_t, 0, 1> dimensions;
|
||||
typedef std::integer_sequence<std::size_t, 0, 1> dimensions;
|
||||
|
||||
sections_type sec;
|
||||
geometry::sectionalize<Reverse, dimensions>(geometry, robust_policy, sec,
|
||||
|
@ -3,8 +3,8 @@
|
||||
// Copyright (c) 2011-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2015, 2017, 2018, 2019.
|
||||
// Modifications copyright (c) 2015-2019 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2015-2020.
|
||||
// Modifications copyright (c) 2015-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@ -16,10 +16,12 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_PARTITION_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_PARTITION_HPP
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
@ -32,7 +34,7 @@ namespace boost { namespace geometry
|
||||
namespace detail { namespace partition
|
||||
{
|
||||
|
||||
template <typename T, bool IsIntegral = boost::is_integral<T>::value>
|
||||
template <typename T, bool IsIntegral = std::is_integral<T>::value>
|
||||
struct divide_interval
|
||||
{
|
||||
static inline T apply(T const& mi, T const& ma)
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2013 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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)
|
||||
@ -18,7 +22,6 @@
|
||||
#include <boost/concept/requires.hpp>
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/numeric/conversion/bounds.hpp>
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2019.
|
||||
// Modifications copyright (c) 2013-2019 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2020.
|
||||
// Modifications copyright (c) 2013-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -14,10 +14,6 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_DE9IM_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_DE9IM_HPP
|
||||
|
||||
#include <boost/mpl/is_sequence.hpp>
|
||||
#include <boost/mpl/push_back.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
@ -25,6 +21,7 @@
|
||||
#include <boost/geometry/core/topological_dimension.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
|
||||
#include <boost/geometry/util/sequence.hpp>
|
||||
#include <boost/geometry/util/tuples.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@ -146,7 +143,7 @@ template
|
||||
class static_mask
|
||||
: public detail::relate::static_mask
|
||||
<
|
||||
boost::mpl::vector_c
|
||||
std::integer_sequence
|
||||
<
|
||||
char, II, IB, IE, BI, BB, BE, EI, EB, EE
|
||||
>,
|
||||
@ -154,36 +151,6 @@ class static_mask
|
||||
>
|
||||
{};
|
||||
|
||||
} // namespace de9im
|
||||
|
||||
namespace detail { namespace de9im
|
||||
{
|
||||
|
||||
// a small helper util for ORing static masks
|
||||
|
||||
template
|
||||
<
|
||||
typename Seq,
|
||||
typename T,
|
||||
bool IsSeq = boost::mpl::is_sequence<Seq>::value
|
||||
>
|
||||
struct push_back
|
||||
{
|
||||
typedef typename boost::mpl::push_back
|
||||
<
|
||||
Seq,
|
||||
T
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template <typename Seq, typename T>
|
||||
struct push_back<Seq, T, false>
|
||||
{};
|
||||
|
||||
}} // namespace detail::de9im
|
||||
|
||||
namespace de9im
|
||||
{
|
||||
|
||||
inline
|
||||
boost::tuples::cons
|
||||
@ -227,14 +194,15 @@ template
|
||||
char EI2, char EB2, char EE2
|
||||
>
|
||||
inline
|
||||
boost::mpl::vector<
|
||||
static_mask<II1, IB1, IE1, BI1, BB1, BE1, EI1, EB1, EE1>,
|
||||
static_mask<II2, IB2, IE2, BI2, BB2, BE2, EI2, EB2, EE2>
|
||||
>
|
||||
util::type_sequence
|
||||
<
|
||||
static_mask<II1, IB1, IE1, BI1, BB1, BE1, EI1, EB1, EE1>,
|
||||
static_mask<II2, IB2, IE2, BI2, BB2, BE2, EI2, EB2, EE2>
|
||||
>
|
||||
operator||(static_mask<II1, IB1, IE1, BI1, BB1, BE1, EI1, EB1, EE1> const& ,
|
||||
static_mask<II2, IB2, IE2, BI2, BB2, BE2, EI2, EB2, EE2> const& )
|
||||
{
|
||||
return boost::mpl::vector
|
||||
return util::type_sequence
|
||||
<
|
||||
static_mask<II1, IB1, IE1, BI1, BB1, BE1, EI1, EB1, EE1>,
|
||||
static_mask<II2, IB2, IE2, BI2, BB2, BE2, EI2, EB2, EE2>
|
||||
@ -243,25 +211,25 @@ operator||(static_mask<II1, IB1, IE1, BI1, BB1, BE1, EI1, EB1, EE1> const& ,
|
||||
|
||||
template
|
||||
<
|
||||
typename Seq,
|
||||
typename ...StaticMasks,
|
||||
char II, char IB, char IE,
|
||||
char BI, char BB, char BE,
|
||||
char EI, char EB, char EE
|
||||
>
|
||||
inline
|
||||
typename detail::de9im::push_back
|
||||
<
|
||||
Seq,
|
||||
static_mask<II, IB, IE, BI, BB, BE, EI, EB, EE>
|
||||
>::type
|
||||
operator||(Seq const& ,
|
||||
util::type_sequence
|
||||
<
|
||||
StaticMasks...,
|
||||
static_mask<II, IB, IE, BI, BB, BE, EI, EB, EE>
|
||||
>
|
||||
operator||(util::type_sequence<StaticMasks...> const& ,
|
||||
static_mask<II, IB, IE, BI, BB, BE, EI, EB, EE> const& )
|
||||
{
|
||||
return typename detail::de9im::push_back
|
||||
return util::type_sequence
|
||||
<
|
||||
Seq,
|
||||
StaticMasks...,
|
||||
static_mask<II, IB, IE, BI, BB, BE, EI, EB, EE>
|
||||
>::type();
|
||||
>();
|
||||
}
|
||||
|
||||
} // namespace de9im
|
||||
@ -305,7 +273,7 @@ template
|
||||
>
|
||||
struct static_mask_touches_impl
|
||||
{
|
||||
typedef boost::mpl::vector
|
||||
typedef util::type_sequence
|
||||
<
|
||||
geometry::de9im::static_mask<'F', 'T', '*', '*', '*', '*', '*', '*', '*'>,
|
||||
geometry::de9im::static_mask<'F', '*', '*', 'T', '*', '*', '*', '*', '*'>,
|
||||
@ -336,7 +304,7 @@ struct static_mask_within_type
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
struct static_mask_covered_by_type
|
||||
{
|
||||
typedef boost::mpl::vector
|
||||
typedef util::type_sequence
|
||||
<
|
||||
geometry::de9im::static_mask<'T', '*', 'F', '*', '*', 'F', '*', '*', '*'>,
|
||||
geometry::de9im::static_mask<'*', 'T', 'F', '*', '*', 'F', '*', '*', '*'>,
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2017.
|
||||
// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2020.
|
||||
// Modifications copyright (c) 2013-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -15,21 +15,22 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_INTERFACE_HPP
|
||||
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
#include <boost/variant/variant_fwd.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/relate/de9im.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/core/topological_dimension.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/relate/de9im.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
#include <boost/geometry/strategies/default_strategy.hpp>
|
||||
#include <boost/geometry/strategies/relate.hpp>
|
||||
#include <boost/geometry/util/sequence.hpp>
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
@ -38,50 +39,20 @@ namespace boost { namespace geometry {
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace relate {
|
||||
|
||||
// Those are used only to allow dispatch::relate to produce compile-time error
|
||||
|
||||
template <typename Geometry,
|
||||
typename Tag = typename geometry::tag<Geometry>::type>
|
||||
struct is_supported_by_generic
|
||||
{
|
||||
static const bool value
|
||||
= boost::is_same<Tag, linestring_tag>::value
|
||||
|| boost::is_same<Tag, multi_linestring_tag>::value
|
||||
|| boost::is_same<Tag, ring_tag>::value
|
||||
|| boost::is_same<Tag, polygon_tag>::value
|
||||
|| boost::is_same<Tag, multi_polygon_tag>::value;
|
||||
};
|
||||
|
||||
template <typename Geometry1,
|
||||
typename Geometry2,
|
||||
typename Tag1 = typename geometry::tag<Geometry1>::type,
|
||||
typename Tag2 = typename geometry::tag<Geometry2>::type>
|
||||
// is_generic allows dispatch::relate to generate compile-time error
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
struct is_generic
|
||||
{
|
||||
static const bool value = is_supported_by_generic<Geometry1>::value
|
||||
&& is_supported_by_generic<Geometry2>::value;
|
||||
static const bool value = (util::is_polysegmental<Geometry1>::value
|
||||
&& util::is_polysegmental<Geometry2>::value)
|
||||
||
|
||||
(util::is_point<Geometry1>::value
|
||||
&& util::is_polysegmental<Geometry2>::value)
|
||||
||
|
||||
(util::is_polysegmental<Geometry1>::value
|
||||
&& util::is_point<Geometry2>::value);
|
||||
};
|
||||
|
||||
|
||||
template <typename Point, typename Geometry, typename Tag>
|
||||
struct is_generic<Point, Geometry, point_tag, Tag>
|
||||
{
|
||||
static const bool value = is_supported_by_generic<Geometry>::value;
|
||||
};
|
||||
|
||||
template <typename Geometry, typename Point, typename Tag>
|
||||
struct is_generic<Geometry, Point, Tag, point_tag>
|
||||
{
|
||||
static const bool value = is_supported_by_generic<Geometry>::value;
|
||||
};
|
||||
|
||||
template <typename Point1, typename Point2>
|
||||
struct is_generic<Point1, Point2, point_tag, point_tag>
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::relate
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
@ -114,16 +85,13 @@ struct interruption_enabled
|
||||
dispatch::relate<Geometry1, Geometry2>::interruption_enabled;
|
||||
};
|
||||
|
||||
template <typename Geometry1,
|
||||
typename Geometry2,
|
||||
typename Result,
|
||||
bool IsSequence = boost::mpl::is_sequence<Result>::value>
|
||||
template <typename Geometry1, typename Geometry2, typename Result>
|
||||
struct result_handler_type
|
||||
: not_implemented<Result>
|
||||
{};
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
struct result_handler_type<Geometry1, Geometry2, geometry::de9im::mask, false>
|
||||
struct result_handler_type<Geometry1, Geometry2, geometry::de9im::mask>
|
||||
{
|
||||
typedef mask_handler
|
||||
<
|
||||
@ -137,7 +105,7 @@ struct result_handler_type<Geometry1, Geometry2, geometry::de9im::mask, false>
|
||||
};
|
||||
|
||||
template <typename Geometry1, typename Geometry2, typename Head, typename Tail>
|
||||
struct result_handler_type<Geometry1, Geometry2, boost::tuples::cons<Head, Tail>, false>
|
||||
struct result_handler_type<Geometry1, Geometry2, boost::tuples::cons<Head, Tail>>
|
||||
{
|
||||
typedef mask_handler
|
||||
<
|
||||
@ -158,8 +126,7 @@ struct result_handler_type
|
||||
<
|
||||
Geometry1,
|
||||
Geometry2,
|
||||
geometry::de9im::static_mask<II, IB, IE, BI, BB, BE, EI, EB, EE>,
|
||||
false
|
||||
geometry::de9im::static_mask<II, IB, IE, BI, BB, BE, EI, EB, EE>
|
||||
>
|
||||
{
|
||||
typedef static_mask_handler
|
||||
@ -173,12 +140,12 @@ struct result_handler_type
|
||||
> type;
|
||||
};
|
||||
|
||||
template <typename Geometry1, typename Geometry2, typename StaticSequence>
|
||||
struct result_handler_type<Geometry1, Geometry2, StaticSequence, true>
|
||||
template <typename Geometry1, typename Geometry2, typename ...StaticMasks>
|
||||
struct result_handler_type<Geometry1, Geometry2, util::type_sequence<StaticMasks...>>
|
||||
{
|
||||
typedef static_mask_handler
|
||||
<
|
||||
StaticSequence,
|
||||
util::type_sequence<StaticMasks...>,
|
||||
interruption_enabled
|
||||
<
|
||||
Geometry1,
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2017, 2018, 2019.
|
||||
// Modifications copyright (c) 2013-2019 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2020.
|
||||
// Modifications copyright (c) 2013-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/num_interior_rings.hpp>
|
||||
#include <boost/geometry/algorithms/detail/point_on_border.hpp>
|
||||
@ -210,15 +211,6 @@ struct linear_areal
|
||||
typedef typename geometry::point_type<Geometry1>::type point1_type;
|
||||
typedef typename geometry::point_type<Geometry2>::type point2_type;
|
||||
|
||||
template <typename Geometry>
|
||||
struct is_multi
|
||||
: boost::is_base_of
|
||||
<
|
||||
multi_tag,
|
||||
typename tag<Geometry>::type
|
||||
>
|
||||
{};
|
||||
|
||||
template <typename Geom1, typename Geom2, typename Strategy>
|
||||
struct multi_turn_info
|
||||
: turns::get_turns<Geom1, Geom2>::template turn_info_type<Strategy>::type
|
||||
@ -229,9 +221,9 @@ struct linear_areal
|
||||
|
||||
template <typename Geom1, typename Geom2, typename Strategy>
|
||||
struct turn_info_type
|
||||
: boost::mpl::if_c
|
||||
: std::conditional
|
||||
<
|
||||
is_multi<Geometry2>::value,
|
||||
util::is_multi<Geometry2>::value,
|
||||
multi_turn_info<Geom1, Geom2, Strategy>,
|
||||
typename turns::get_turns<Geom1, Geom2>::template turn_info_type<Strategy>::type
|
||||
>
|
||||
@ -303,7 +295,7 @@ struct linear_areal
|
||||
return;
|
||||
|
||||
{
|
||||
sort_dispatch<cs_tag>(turns.begin(), turns.end(), is_multi<Geometry2>());
|
||||
sort_dispatch<cs_tag>(turns.begin(), turns.end(), util::is_multi<Geometry2>());
|
||||
|
||||
turns_analyser<turn_type> analyser;
|
||||
analyse_each_turn(result, analyser,
|
||||
@ -531,7 +523,7 @@ struct linear_areal
|
||||
};
|
||||
|
||||
template <typename CSTag, typename TurnIt>
|
||||
static void sort_dispatch(TurnIt first, TurnIt last, boost::true_type const& /*is_multi*/)
|
||||
static void sort_dispatch(TurnIt first, TurnIt last, std::true_type const& /*is_multi*/)
|
||||
{
|
||||
// sort turns by Linear seg_id, then by fraction, then by other multi_index
|
||||
typedef turns::less<0, turns::less_other_multi_index<0>, CSTag> less;
|
||||
@ -555,7 +547,7 @@ struct linear_areal
|
||||
}
|
||||
|
||||
template <typename CSTag, typename TurnIt>
|
||||
static void sort_dispatch(TurnIt first, TurnIt last, boost::false_type const& /*is_multi*/)
|
||||
static void sort_dispatch(TurnIt first, TurnIt last, std::false_type const& /*is_multi*/)
|
||||
{
|
||||
// sort turns by Linear seg_id, then by fraction, then
|
||||
// for same ring id: x, u, i, c
|
||||
@ -765,7 +757,7 @@ struct linear_areal
|
||||
m_exit_watcher.reset_detected_exit();
|
||||
}
|
||||
|
||||
if ( BOOST_GEOMETRY_CONDITION( is_multi<OtherGeometry>::value )
|
||||
if ( BOOST_GEOMETRY_CONDITION( util::is_multi<OtherGeometry>::value )
|
||||
&& m_first_from_unknown )
|
||||
{
|
||||
// For MultiPolygon many x/u operations may be generated as a first IP
|
||||
@ -953,7 +945,7 @@ struct linear_areal
|
||||
}
|
||||
}
|
||||
|
||||
if ( BOOST_GEOMETRY_CONDITION( is_multi<OtherGeometry>::value ) )
|
||||
if ( BOOST_GEOMETRY_CONDITION( util::is_multi<OtherGeometry>::value ) )
|
||||
{
|
||||
m_first_from_unknown = false;
|
||||
m_first_from_unknown_boundary_detected = false;
|
||||
@ -1041,7 +1033,7 @@ struct linear_areal
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( BOOST_GEOMETRY_CONDITION( is_multi<OtherGeometry>::value )
|
||||
if ( BOOST_GEOMETRY_CONDITION( util::is_multi<OtherGeometry>::value )
|
||||
/*&& ( op == overlay::operation_blocked
|
||||
|| op == overlay::operation_union )*/ ) // if we're here it's u or x
|
||||
{
|
||||
@ -1069,7 +1061,7 @@ struct linear_areal
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( BOOST_GEOMETRY_CONDITION( is_multi<OtherGeometry>::value )
|
||||
if ( BOOST_GEOMETRY_CONDITION( util::is_multi<OtherGeometry>::value )
|
||||
/*&& ( op == overlay::operation_blocked
|
||||
|| op == overlay::operation_union )*/ ) // if we're here it's u or x
|
||||
{
|
||||
@ -1119,7 +1111,7 @@ struct linear_areal
|
||||
// For MultiPolygon many x/u operations may be generated as a first IP
|
||||
// if for all turns x/u was generated and any of the Polygons doesn't contain the LineString
|
||||
// then we know that the LineString is outside
|
||||
if ( BOOST_GEOMETRY_CONDITION( is_multi<OtherGeometry>::value )
|
||||
if ( BOOST_GEOMETRY_CONDITION( util::is_multi<OtherGeometry>::value )
|
||||
&& m_first_from_unknown )
|
||||
{
|
||||
update<interior, exterior, '1', TransposeResult>(res);
|
||||
|
@ -23,19 +23,19 @@
|
||||
#include <boost/geometry/algorithms/detail/within/point_in_geometry.hpp>
|
||||
#include <boost/geometry/algorithms/envelope.hpp>
|
||||
|
||||
#include <boost/geometry/core/is_areal.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/box.hpp>
|
||||
|
||||
#include <boost/geometry/index/rtree.hpp>
|
||||
|
||||
|
||||
// TEMP
|
||||
#include <boost/geometry/strategies/envelope/cartesian.hpp>
|
||||
#include <boost/geometry/strategies/envelope/geographic.hpp>
|
||||
#include <boost/geometry/strategies/envelope/spherical.hpp>
|
||||
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -607,14 +607,7 @@ template
|
||||
<
|
||||
typename MultiPoint, typename Geometry,
|
||||
bool Transpose = false,
|
||||
bool isMulti = boost::is_same
|
||||
<
|
||||
typename tag_cast
|
||||
<
|
||||
typename tag<Geometry>::type, multi_tag
|
||||
>::type,
|
||||
multi_tag
|
||||
>::value
|
||||
bool isMulti = util::is_multi<Geometry>::value
|
||||
>
|
||||
struct multi_point_geometry
|
||||
: multi_point_single_geometry<MultiPoint, Geometry, Transpose>
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2019.
|
||||
// Modifications copyright (c) 2013-2019 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2020.
|
||||
// Modifications copyright (c) 2013-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -14,9 +14,7 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_RELATE_IMPL_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_RELATE_IMPL_HPP
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/relate/interface.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
@ -36,9 +34,9 @@ template
|
||||
typename Geometry2
|
||||
>
|
||||
struct relate_impl_base
|
||||
: boost::mpl::if_c
|
||||
: std::conditional_t
|
||||
<
|
||||
boost::is_base_of
|
||||
std::is_base_of
|
||||
<
|
||||
nyi::not_implemented_tag,
|
||||
dispatch::relate<Geometry1, Geometry2>
|
||||
@ -49,7 +47,7 @@ struct relate_impl_base
|
||||
typename geometry::tag<Geometry2>::type
|
||||
>,
|
||||
implemented_tag
|
||||
>::type
|
||||
>
|
||||
{};
|
||||
|
||||
template
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
|
||||
@ -18,24 +18,18 @@
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/begin.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
#include <boost/mpl/end.hpp>
|
||||
#include <boost/mpl/is_sequence.hpp>
|
||||
#include <boost/mpl/next.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/core/exception.hpp>
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/sequence.hpp>
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
||||
@ -167,7 +161,7 @@ public:
|
||||
{
|
||||
static const bool in_bounds = F1 < Matrix::static_height
|
||||
&& F2 < Matrix::static_width;
|
||||
typedef boost::integral_constant<bool, in_bounds> in_bounds_t;
|
||||
typedef std::integral_constant<bool, in_bounds> in_bounds_t;
|
||||
set_dispatch<F1, F2, V>(in_bounds_t());
|
||||
}
|
||||
|
||||
@ -176,13 +170,13 @@ public:
|
||||
{
|
||||
static const bool in_bounds = F1 < Matrix::static_height
|
||||
&& F2 < Matrix::static_width;
|
||||
typedef boost::integral_constant<bool, in_bounds> in_bounds_t;
|
||||
typedef std::integral_constant<bool, in_bounds> in_bounds_t;
|
||||
update_dispatch<F1, F2, D>(in_bounds_t());
|
||||
}
|
||||
|
||||
private:
|
||||
template <field F1, field F2, char V>
|
||||
inline void set_dispatch(integral_constant<bool, true>)
|
||||
inline void set_dispatch(std::true_type)
|
||||
{
|
||||
static const std::size_t index = F1 * Matrix::static_width + F2;
|
||||
BOOST_STATIC_ASSERT(index < Matrix::static_size);
|
||||
@ -190,11 +184,11 @@ private:
|
||||
m_matrix.template set<F1, F2, V>();
|
||||
}
|
||||
template <field F1, field F2, char V>
|
||||
inline void set_dispatch(integral_constant<bool, false>)
|
||||
inline void set_dispatch(std::false_type)
|
||||
{}
|
||||
|
||||
template <field F1, field F2, char D>
|
||||
inline void update_dispatch(integral_constant<bool, true>)
|
||||
inline void update_dispatch(std::true_type)
|
||||
{
|
||||
static const std::size_t index = F1 * Matrix::static_width + F2;
|
||||
BOOST_STATIC_ASSERT(index < Matrix::static_size);
|
||||
@ -204,7 +198,7 @@ private:
|
||||
m_matrix.template set<F1, F2, D>();
|
||||
}
|
||||
template <field F1, field F2, char D>
|
||||
inline void update_dispatch(integral_constant<bool, false>)
|
||||
inline void update_dispatch(std::false_type)
|
||||
{}
|
||||
|
||||
Matrix m_matrix;
|
||||
@ -662,40 +656,28 @@ struct false_mask {};
|
||||
// --------------- COMPILE-TIME MASK ----------------
|
||||
|
||||
// static_check_characters
|
||||
template
|
||||
<
|
||||
typename Seq,
|
||||
typename First = typename boost::mpl::begin<Seq>::type,
|
||||
typename Last = typename boost::mpl::end<Seq>::type
|
||||
>
|
||||
struct static_check_characters
|
||||
: static_check_characters
|
||||
<
|
||||
Seq,
|
||||
typename boost::mpl::next<First>::type
|
||||
>
|
||||
template <typename Seq>
|
||||
struct static_check_characters {};
|
||||
|
||||
template <char C, char ...Cs>
|
||||
struct static_check_characters<std::integer_sequence<char, C, Cs...>>
|
||||
: static_check_characters<std::integer_sequence<char, Cs...>>
|
||||
{
|
||||
typedef typename boost::mpl::deref<First>::type type;
|
||||
static const char value = type::value;
|
||||
static const bool is_valid = (value >= '0' && value <= '9')
|
||||
|| value == 'T' || value == 'F' || value == '*';
|
||||
typedef std::integer_sequence<char, C, Cs...> type;
|
||||
static const bool is_valid = (C >= '0' && C <= '9')
|
||||
|| C == 'T' || C == 'F' || C == '*';
|
||||
BOOST_MPL_ASSERT_MSG((is_valid),
|
||||
INVALID_STATIC_MASK_CHARACTER,
|
||||
(type));
|
||||
};
|
||||
|
||||
template <typename Seq, typename Last>
|
||||
struct static_check_characters<Seq, Last, Last>
|
||||
template <char ...Cs>
|
||||
struct static_check_characters<std::integral_constant<char, Cs...>>
|
||||
{};
|
||||
|
||||
// static_mask
|
||||
|
||||
template
|
||||
<
|
||||
typename Seq,
|
||||
std::size_t Height,
|
||||
std::size_t Width = Height
|
||||
>
|
||||
template <typename Seq, std::size_t Height, std::size_t Width = Height>
|
||||
struct static_mask
|
||||
{
|
||||
static const std::size_t static_width = Width;
|
||||
@ -703,7 +685,7 @@ struct static_mask
|
||||
static const std::size_t static_size = Width * Height;
|
||||
|
||||
BOOST_STATIC_ASSERT(
|
||||
std::size_t(boost::mpl::size<Seq>::type::value) == static_size);
|
||||
std::size_t(util::sequence_size<Seq>::value) == static_size);
|
||||
|
||||
template <detail::relate::field F1, detail::relate::field F2>
|
||||
struct static_get
|
||||
@ -712,7 +694,7 @@ struct static_mask
|
||||
BOOST_STATIC_ASSERT(std::size_t(F2) < static_width);
|
||||
|
||||
static const char value
|
||||
= boost::mpl::at_c<Seq, F1 * static_width + F2>::type::value;
|
||||
= util::sequence_element<F1 * static_width + F2, Seq>::value;
|
||||
};
|
||||
|
||||
private:
|
||||
@ -722,7 +704,11 @@ private:
|
||||
|
||||
// static_should_handle_element
|
||||
|
||||
template <typename StaticMask, field F1, field F2, bool IsSequence>
|
||||
template
|
||||
<
|
||||
typename StaticMask, field F1, field F2,
|
||||
bool IsSequence = util::is_sequence<StaticMask>::value
|
||||
>
|
||||
struct static_should_handle_element_dispatch
|
||||
{
|
||||
static const char mask_el = StaticMask::template static_get<F1, F2>::value;
|
||||
@ -731,28 +717,29 @@ struct static_should_handle_element_dispatch
|
||||
|| ( mask_el >= '0' && mask_el <= '9' );
|
||||
};
|
||||
|
||||
template <typename First, typename Last, field F1, field F2>
|
||||
template
|
||||
<
|
||||
typename Seq, field F1, field F2,
|
||||
std::size_t I = 0,
|
||||
std::size_t N = util::sequence_size<Seq>::value
|
||||
>
|
||||
struct static_should_handle_element_sequence
|
||||
{
|
||||
typedef typename boost::mpl::deref<First>::type StaticMask;
|
||||
typedef typename util::sequence_element<I, Seq>::type StaticMask;
|
||||
|
||||
static const bool value
|
||||
= static_should_handle_element_dispatch
|
||||
<
|
||||
StaticMask,
|
||||
F1, F2,
|
||||
boost::mpl::is_sequence<StaticMask>::value
|
||||
StaticMask, F1, F2
|
||||
>::value
|
||||
|| static_should_handle_element_sequence
|
||||
<
|
||||
typename boost::mpl::next<First>::type,
|
||||
Last,
|
||||
F1, F2
|
||||
Seq, F1, F2, I + 1
|
||||
>::value;
|
||||
};
|
||||
|
||||
template <typename Last, field F1, field F2>
|
||||
struct static_should_handle_element_sequence<Last, Last, F1, F2>
|
||||
template <typename Seq, field F1, field F2, std::size_t N>
|
||||
struct static_should_handle_element_sequence<Seq, F1, F2, N, N>
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
@ -763,9 +750,7 @@ struct static_should_handle_element_dispatch<StaticMask, F1, F2, true>
|
||||
static const bool value
|
||||
= static_should_handle_element_sequence
|
||||
<
|
||||
typename boost::mpl::begin<StaticMask>::type,
|
||||
typename boost::mpl::end<StaticMask>::type,
|
||||
F1, F2
|
||||
StaticMask, F1, F2
|
||||
>::value;
|
||||
};
|
||||
|
||||
@ -775,15 +760,18 @@ struct static_should_handle_element
|
||||
static const bool value
|
||||
= static_should_handle_element_dispatch
|
||||
<
|
||||
StaticMask,
|
||||
F1, F2,
|
||||
boost::mpl::is_sequence<StaticMask>::value
|
||||
StaticMask, F1, F2
|
||||
>::value;
|
||||
};
|
||||
|
||||
// static_interrupt
|
||||
|
||||
template <typename StaticMask, char V, field F1, field F2, bool InterruptEnabled, bool IsSequence>
|
||||
template
|
||||
<
|
||||
typename StaticMask, char V, field F1, field F2,
|
||||
bool InterruptEnabled,
|
||||
bool IsSequence = util::is_sequence<StaticMask>::value
|
||||
>
|
||||
struct static_interrupt_dispatch
|
||||
{
|
||||
static const bool value = false;
|
||||
@ -800,29 +788,29 @@ struct static_interrupt_dispatch<StaticMask, V, F1, F2, true, IsSequence>
|
||||
( ( V == 'T' ) ? mask_el == 'F' : false );
|
||||
};
|
||||
|
||||
template <typename First, typename Last, char V, field F1, field F2>
|
||||
template
|
||||
<
|
||||
typename Seq, char V, field F1, field F2,
|
||||
std::size_t I = 0,
|
||||
std::size_t N = util::sequence_size<Seq>::value
|
||||
>
|
||||
struct static_interrupt_sequence
|
||||
{
|
||||
typedef typename boost::mpl::deref<First>::type StaticMask;
|
||||
typedef typename util::sequence_element<I, Seq>::type StaticMask;
|
||||
|
||||
static const bool value
|
||||
= static_interrupt_dispatch
|
||||
<
|
||||
StaticMask,
|
||||
V, F1, F2,
|
||||
true,
|
||||
boost::mpl::is_sequence<StaticMask>::value
|
||||
StaticMask, V, F1, F2, true
|
||||
>::value
|
||||
&& static_interrupt_sequence
|
||||
<
|
||||
typename boost::mpl::next<First>::type,
|
||||
Last,
|
||||
V, F1, F2
|
||||
Seq, V, F1, F2, I + 1
|
||||
>::value;
|
||||
};
|
||||
|
||||
template <typename Last, char V, field F1, field F2>
|
||||
struct static_interrupt_sequence<Last, Last, V, F1, F2>
|
||||
template <typename Seq, char V, field F1, field F2, std::size_t N>
|
||||
struct static_interrupt_sequence<Seq, V, F1, F2, N, N>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
@ -833,9 +821,7 @@ struct static_interrupt_dispatch<StaticMask, V, F1, F2, true, true>
|
||||
static const bool value
|
||||
= static_interrupt_sequence
|
||||
<
|
||||
typename boost::mpl::begin<StaticMask>::type,
|
||||
typename boost::mpl::end<StaticMask>::type,
|
||||
V, F1, F2
|
||||
StaticMask, V, F1, F2
|
||||
>::value;
|
||||
};
|
||||
|
||||
@ -845,16 +831,17 @@ struct static_interrupt
|
||||
static const bool value
|
||||
= static_interrupt_dispatch
|
||||
<
|
||||
StaticMask,
|
||||
V, F1, F2,
|
||||
EnableInterrupt,
|
||||
boost::mpl::is_sequence<StaticMask>::value
|
||||
StaticMask, V, F1, F2, EnableInterrupt
|
||||
>::value;
|
||||
};
|
||||
|
||||
// static_may_update
|
||||
|
||||
template <typename StaticMask, char D, field F1, field F2, bool IsSequence>
|
||||
template
|
||||
<
|
||||
typename StaticMask, char D, field F1, field F2,
|
||||
bool IsSequence = util::is_sequence<StaticMask>::value
|
||||
>
|
||||
struct static_may_update_dispatch
|
||||
{
|
||||
static const char mask_el = StaticMask::template static_get<F1, F2>::value;
|
||||
@ -864,65 +851,68 @@ struct static_may_update_dispatch
|
||||
: mask_el >= '0' && mask_el <= '9' ? 2
|
||||
: 3;
|
||||
|
||||
// TODO: use std::enable_if_t instead of std::integral_constant
|
||||
|
||||
template <typename Matrix>
|
||||
static inline bool apply(Matrix const& matrix)
|
||||
{
|
||||
return apply_dispatch(matrix, integral_constant<int, version>());
|
||||
return apply_dispatch(matrix, std::integral_constant<int, version>());
|
||||
}
|
||||
|
||||
// mask_el == 'F'
|
||||
template <typename Matrix>
|
||||
static inline bool apply_dispatch(Matrix const& , integral_constant<int, 0>)
|
||||
static inline bool apply_dispatch(Matrix const& , std::integral_constant<int, 0>)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// mask_el == 'T'
|
||||
template <typename Matrix>
|
||||
static inline bool apply_dispatch(Matrix const& matrix, integral_constant<int, 1>)
|
||||
static inline bool apply_dispatch(Matrix const& matrix, std::integral_constant<int, 1>)
|
||||
{
|
||||
char const c = matrix.template get<F1, F2>();
|
||||
return c == 'F'; // if it's T or between 0 and 9, the result will be the same
|
||||
}
|
||||
// mask_el >= '0' && mask_el <= '9'
|
||||
template <typename Matrix>
|
||||
static inline bool apply_dispatch(Matrix const& matrix, integral_constant<int, 2>)
|
||||
static inline bool apply_dispatch(Matrix const& matrix, std::integral_constant<int, 2>)
|
||||
{
|
||||
char const c = matrix.template get<F1, F2>();
|
||||
return D > c || c > '9';
|
||||
}
|
||||
// else
|
||||
template <typename Matrix>
|
||||
static inline bool apply_dispatch(Matrix const&, integral_constant<int, 3>)
|
||||
static inline bool apply_dispatch(Matrix const&, std::integral_constant<int, 3>)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename First, typename Last, char D, field F1, field F2>
|
||||
template
|
||||
<
|
||||
typename Seq, char D, field F1, field F2,
|
||||
std::size_t I = 0,
|
||||
std::size_t N = util::sequence_size<Seq>::value
|
||||
>
|
||||
struct static_may_update_sequence
|
||||
{
|
||||
typedef typename boost::mpl::deref<First>::type StaticMask;
|
||||
typedef typename util::sequence_element<I, Seq>::type StaticMask;
|
||||
|
||||
template <typename Matrix>
|
||||
static inline bool apply(Matrix const& matrix)
|
||||
{
|
||||
return static_may_update_dispatch
|
||||
<
|
||||
StaticMask,
|
||||
D, F1, F2,
|
||||
boost::mpl::is_sequence<StaticMask>::value
|
||||
StaticMask, D, F1, F2
|
||||
>::apply(matrix)
|
||||
|| static_may_update_sequence
|
||||
<
|
||||
typename boost::mpl::next<First>::type,
|
||||
Last,
|
||||
D, F1, F2
|
||||
Seq, D, F1, F2, I + 1
|
||||
>::apply(matrix);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Last, char D, field F1, field F2>
|
||||
struct static_may_update_sequence<Last, Last, D, F1, F2>
|
||||
template <typename Seq, char D, field F1, field F2, std::size_t N>
|
||||
struct static_may_update_sequence<Seq, D, F1, F2, N, N>
|
||||
{
|
||||
template <typename Matrix>
|
||||
static inline bool apply(Matrix const& /*matrix*/)
|
||||
@ -939,9 +929,7 @@ struct static_may_update_dispatch<StaticMask, D, F1, F2, true>
|
||||
{
|
||||
return static_may_update_sequence
|
||||
<
|
||||
typename boost::mpl::begin<StaticMask>::type,
|
||||
typename boost::mpl::end<StaticMask>::type,
|
||||
D, F1, F2
|
||||
StaticMask, D, F1, F2
|
||||
>::apply(matrix);
|
||||
}
|
||||
};
|
||||
@ -954,16 +942,18 @@ struct static_may_update
|
||||
{
|
||||
return static_may_update_dispatch
|
||||
<
|
||||
StaticMask,
|
||||
D, F1, F2,
|
||||
boost::mpl::is_sequence<StaticMask>::value
|
||||
StaticMask, D, F1, F2
|
||||
>::apply(matrix);
|
||||
}
|
||||
};
|
||||
|
||||
// static_check_matrix
|
||||
|
||||
template <typename StaticMask, bool IsSequence>
|
||||
template
|
||||
<
|
||||
typename StaticMask,
|
||||
bool IsSequence = util::is_sequence<StaticMask>::value
|
||||
>
|
||||
struct static_check_dispatch
|
||||
{
|
||||
template <typename Matrix>
|
||||
@ -990,59 +980,64 @@ struct static_check_dispatch
|
||||
: mask_el >= '0' && mask_el <= '9' ? 2
|
||||
: 3;
|
||||
|
||||
// TODO: use std::enable_if_t instead of std::integral_constant
|
||||
|
||||
template <typename Matrix>
|
||||
static inline bool apply(Matrix const& matrix)
|
||||
{
|
||||
const char el = matrix.template get<F1, F2>();
|
||||
return apply_dispatch(el, integral_constant<int, version>());
|
||||
return apply_dispatch(el, std::integral_constant<int, version>());
|
||||
}
|
||||
|
||||
// mask_el == 'F'
|
||||
static inline bool apply_dispatch(char el, integral_constant<int, 0>)
|
||||
static inline bool apply_dispatch(char el, std::integral_constant<int, 0>)
|
||||
{
|
||||
return el == 'F';
|
||||
}
|
||||
// mask_el == 'T'
|
||||
static inline bool apply_dispatch(char el, integral_constant<int, 1>)
|
||||
static inline bool apply_dispatch(char el, std::integral_constant<int, 1>)
|
||||
{
|
||||
return el == 'T' || ( el >= '0' && el <= '9' );
|
||||
}
|
||||
// mask_el >= '0' && mask_el <= '9'
|
||||
static inline bool apply_dispatch(char el, integral_constant<int, 2>)
|
||||
static inline bool apply_dispatch(char el, std::integral_constant<int, 2>)
|
||||
{
|
||||
return el == mask_el;
|
||||
}
|
||||
// else
|
||||
static inline bool apply_dispatch(char /*el*/, integral_constant<int, 3>)
|
||||
static inline bool apply_dispatch(char /*el*/, std::integral_constant<int, 3>)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
template <typename First, typename Last>
|
||||
template
|
||||
<
|
||||
typename Seq,
|
||||
std::size_t I = 0,
|
||||
std::size_t N = util::sequence_size<Seq>::value
|
||||
>
|
||||
struct static_check_sequence
|
||||
{
|
||||
typedef typename boost::mpl::deref<First>::type StaticMask;
|
||||
typedef typename util::sequence_element<I, Seq>::type StaticMask;
|
||||
|
||||
template <typename Matrix>
|
||||
static inline bool apply(Matrix const& matrix)
|
||||
{
|
||||
return static_check_dispatch
|
||||
<
|
||||
StaticMask,
|
||||
boost::mpl::is_sequence<StaticMask>::value
|
||||
StaticMask
|
||||
>::apply(matrix)
|
||||
|| static_check_sequence
|
||||
<
|
||||
typename boost::mpl::next<First>::type,
|
||||
Last
|
||||
Seq, I + 1
|
||||
>::apply(matrix);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Last>
|
||||
struct static_check_sequence<Last, Last>
|
||||
template <typename Seq, std::size_t N>
|
||||
struct static_check_sequence<Seq, N, N>
|
||||
{
|
||||
template <typename Matrix>
|
||||
static inline bool apply(Matrix const& /*matrix*/)
|
||||
@ -1059,8 +1054,7 @@ struct static_check_dispatch<StaticMask, true>
|
||||
{
|
||||
return static_check_sequence
|
||||
<
|
||||
typename boost::mpl::begin<StaticMask>::type,
|
||||
typename boost::mpl::end<StaticMask>::type
|
||||
StaticMask
|
||||
>::apply(matrix);
|
||||
}
|
||||
};
|
||||
@ -1073,8 +1067,7 @@ struct static_check_matrix
|
||||
{
|
||||
return static_check_dispatch
|
||||
<
|
||||
StaticMask,
|
||||
boost::mpl::is_sequence<StaticMask>::value
|
||||
StaticMask
|
||||
>::apply(matrix);
|
||||
}
|
||||
};
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2017, 2019.
|
||||
// Modifications copyright (c) 2013-2019 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2020.
|
||||
// Modifications copyright (c) 2013-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
@ -15,7 +15,7 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_TURNS_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_TURNS_HPP
|
||||
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/do_reverse.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
|
||||
@ -25,8 +25,7 @@
|
||||
|
||||
#include <boost/geometry/strategies/cartesian/point_in_point.hpp>
|
||||
#include <boost/geometry/strategies/spherical/point_in_point.hpp>
|
||||
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/geometry/strategies/distance.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2017.
|
||||
// Modifications copyright (c) 2013-2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2020.
|
||||
// Modifications copyright (c) 2013-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -26,7 +26,7 @@ namespace detail { namespace relate
|
||||
{
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
struct result_handler_type<Geometry1, Geometry2, geometry::de9im::matrix, false>
|
||||
struct result_handler_type<Geometry1, Geometry2, geometry::de9im::matrix>
|
||||
{
|
||||
typedef matrix_handler<geometry::de9im::matrix> type;
|
||||
};
|
||||
|
@ -22,16 +22,14 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTIONALIZE_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/concept/requires.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_fundamental.hpp>
|
||||
|
||||
#include <boost/geometry/core/config.hpp>
|
||||
|
||||
@ -57,6 +55,7 @@
|
||||
#include <boost/geometry/policies/robustness/robust_point_type.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/util/normalize_spheroidal_coordinates.hpp>
|
||||
#include <boost/geometry/util/sequence.hpp>
|
||||
#include <boost/geometry/views/closeable_view.hpp>
|
||||
#include <boost/geometry/views/reversible_view.hpp>
|
||||
|
||||
@ -160,7 +159,7 @@ template
|
||||
>
|
||||
struct get_direction_loop
|
||||
{
|
||||
typedef typename boost::mpl::at_c<DimensionVector, Index>::type dimension;
|
||||
typedef typename util::sequence_element<Index, DimensionVector>::type dimension;
|
||||
|
||||
template <typename Segment>
|
||||
static inline void apply(Segment const& seg,
|
||||
@ -192,7 +191,7 @@ template
|
||||
>
|
||||
struct get_direction_loop<Point, DimensionVector, 0, Count, spherical_tag>
|
||||
{
|
||||
typedef typename boost::mpl::at_c<DimensionVector, 0>::type dimension;
|
||||
typedef typename util::sequence_element<0, DimensionVector>::type dimension;
|
||||
|
||||
template <typename Segment>
|
||||
static inline void apply(Segment const& seg,
|
||||
@ -388,7 +387,7 @@ template
|
||||
struct sectionalize_part
|
||||
{
|
||||
static const std::size_t dimension_count
|
||||
= boost::mpl::size<DimensionVector>::value;
|
||||
= util::sequence_size<DimensionVector>::value;
|
||||
|
||||
template
|
||||
<
|
||||
@ -442,8 +441,8 @@ struct sectionalize_part
|
||||
typedef typename boost::range_value<Sections>::type section_type;
|
||||
BOOST_STATIC_ASSERT
|
||||
(
|
||||
(static_cast<std::size_t>(section_type::dimension_count)
|
||||
== static_cast<std::size_t>(boost::mpl::size<DimensionVector>::value))
|
||||
section_type::dimension_count
|
||||
== util::sequence_size<DimensionVector>::value
|
||||
);
|
||||
|
||||
typedef typename geometry::robust_point_type
|
||||
@ -804,7 +803,7 @@ struct expand_by_epsilon<spherical_tag>
|
||||
static inline void apply(Box & box)
|
||||
{
|
||||
typedef typename coordinate_type<Box>::type coord_t;
|
||||
static const coord_t eps = boost::is_same<coord_t, float>::value
|
||||
static const coord_t eps = std::is_same<coord_t, float>::value
|
||||
? coord_t(1e-6)
|
||||
: coord_t(1e-12);
|
||||
detail::expand_by_epsilon(box, eps);
|
||||
@ -1009,7 +1008,7 @@ inline void sectionalize(Geometry const& geometry,
|
||||
int source_index = 0,
|
||||
std::size_t max_count = 10)
|
||||
{
|
||||
BOOST_STATIC_ASSERT((! boost::is_fundamental<EnvelopeStrategy>::value));
|
||||
BOOST_STATIC_ASSERT((! std::is_fundamental<EnvelopeStrategy>::value));
|
||||
|
||||
concepts::check<Geometry const>();
|
||||
|
||||
@ -1030,7 +1029,7 @@ inline void sectionalize(Geometry const& geometry,
|
||||
>::type
|
||||
>::type ctype2;
|
||||
|
||||
BOOST_MPL_ASSERT((boost::is_same<ctype1, ctype2>));
|
||||
BOOST_STATIC_ASSERT((std::is_same<ctype1, ctype2>::value));
|
||||
|
||||
|
||||
sections.clear();
|
||||
@ -1074,12 +1073,12 @@ inline void sectionalize(Geometry const& geometry,
|
||||
|
||||
typedef typename strategy::expand::services::default_strategy
|
||||
<
|
||||
typename boost::mpl::if_c
|
||||
std::conditional_t
|
||||
<
|
||||
boost::is_same<typename tag<Geometry>::type, box_tag>::value,
|
||||
std::is_same<typename tag<Geometry>::type, box_tag>::value,
|
||||
box_tag,
|
||||
segment_tag
|
||||
>::type,
|
||||
>,
|
||||
typename cs_tag<Geometry>::type
|
||||
>::type expand_strategy_type;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -13,14 +13,14 @@
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/type_traits/make_signed.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
typedef boost::make_signed<std::size_t>::type signed_size_type;
|
||||
typedef std::make_signed<std::size_t>::type signed_size_type;
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
@ -2,20 +2,18 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014.
|
||||
// Modifications copyright (c) 2013-2014, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2020.
|
||||
// Modifications copyright (c) 2013-2020, 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)
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SINGLE_GEOMETRY_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SINGLE_GEOMETRY_HPP
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
@ -28,12 +26,14 @@ namespace detail_dispatch {
|
||||
|
||||
// Returns single geometry by Id
|
||||
// for single geometries returns the geometry itself
|
||||
template <typename Geometry,
|
||||
bool IsMulti = boost::is_base_of
|
||||
<
|
||||
multi_tag,
|
||||
typename geometry::tag<Geometry>::type
|
||||
>::value
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
bool IsMulti = std::is_base_of
|
||||
<
|
||||
multi_tag,
|
||||
typename geometry::tag<Geometry>::type
|
||||
>::value
|
||||
>
|
||||
struct single_geometry
|
||||
{
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2018.
|
||||
// Modifications copyright (c) 2013-2018, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2020.
|
||||
// Modifications copyright (c) 2013-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -14,8 +14,7 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SUB_RANGE_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SUB_RANGE_HPP
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
@ -36,7 +35,7 @@ namespace detail_dispatch {
|
||||
|
||||
template <typename Geometry,
|
||||
typename Tag = typename geometry::tag<Geometry>::type,
|
||||
bool IsMulti = boost::is_base_of<multi_tag, Tag>::value>
|
||||
bool IsMulti = std::is_base_of<multi_tag, Tag>::value>
|
||||
struct sub_range : not_implemented<Tag>
|
||||
{};
|
||||
|
||||
@ -80,12 +79,12 @@ template <typename Geometry, typename Tag>
|
||||
struct sub_range<Geometry, Tag, true>
|
||||
{
|
||||
typedef typename boost::range_value<Geometry>::type value_type;
|
||||
typedef typename boost::mpl::if_c
|
||||
typedef std::conditional_t
|
||||
<
|
||||
boost::is_const<Geometry>::value,
|
||||
typename boost::add_const<value_type>::type,
|
||||
std::is_const<Geometry>::value,
|
||||
typename std::add_const<value_type>::type,
|
||||
value_type
|
||||
>::type sub_type;
|
||||
> sub_type;
|
||||
|
||||
typedef detail_dispatch::sub_range<sub_type> sub_sub_range;
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_TOUCHES_IMPLEMENTATION_HPP
|
||||
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/for_each_range.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/overlay.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
|
||||
@ -101,7 +103,7 @@ struct box_box
|
||||
template <typename Box1, typename Box2, typename Strategy>
|
||||
static inline bool apply(Box1 const& b1, Box2 const& b2, Strategy const& /*strategy*/)
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_same
|
||||
BOOST_STATIC_ASSERT((std::is_same
|
||||
<
|
||||
typename geometry::coordinate_system<Box1>::type,
|
||||
typename geometry::coordinate_system<Box2>::type
|
||||
|
@ -17,15 +17,9 @@
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
#include <boost/geometry/util/tuples.hpp>
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -35,76 +29,21 @@ namespace boost { namespace geometry
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// true for any geometry
|
||||
template <typename T>
|
||||
struct is_geometry
|
||||
: boost::integral_constant
|
||||
<
|
||||
bool,
|
||||
(! boost::is_void<typename geometry::tag<T>::type>::value)
|
||||
>
|
||||
{};
|
||||
|
||||
// true for multi-point, multi-linestring or multi-polygon
|
||||
template <typename Geometry>
|
||||
struct is_multi_geometry
|
||||
: boost::is_base_of
|
||||
<
|
||||
geometry::multi_tag,
|
||||
typename geometry::tag<Geometry>::type
|
||||
>
|
||||
{};
|
||||
|
||||
// true for point, linestring or polygon
|
||||
template <typename T>
|
||||
struct is_multi_geometry_element
|
||||
: boost::integral_constant
|
||||
<
|
||||
bool,
|
||||
((boost::is_same<typename geometry::tag<T>::type, point_tag>::value)
|
||||
|| (boost::is_same<typename geometry::tag<T>::type, linestring_tag>::value)
|
||||
|| (boost::is_same<typename geometry::tag<T>::type, polygon_tag>::value))
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct is_range_impl
|
||||
{
|
||||
typedef boost::type_traits::yes_type yes_type;
|
||||
typedef boost::type_traits::no_type no_type;
|
||||
|
||||
template <typename U>
|
||||
static yes_type test(typename boost::range_iterator<U>::type*);
|
||||
|
||||
template <typename U>
|
||||
static no_type test(...);
|
||||
|
||||
static const bool value = (sizeof(test<T>(0)) == sizeof(yes_type));
|
||||
};
|
||||
|
||||
// true if T is range (boost::range_iterator<T>::type is defined)
|
||||
template <typename T>
|
||||
struct is_range
|
||||
: boost::integral_constant<bool, is_range_impl<T>::value>
|
||||
{};
|
||||
|
||||
|
||||
template <typename T, bool IsRange = is_range<T>::value>
|
||||
template <typename T, bool IsRange = range::detail::is_range<T>::value>
|
||||
struct is_tupled_output_element_base
|
||||
: boost::integral_constant<bool, false>
|
||||
: util::bool_constant<false>
|
||||
{};
|
||||
|
||||
template <typename T>
|
||||
struct is_tupled_output_element_base<T, true>
|
||||
: boost::integral_constant
|
||||
: util::bool_constant
|
||||
<
|
||||
bool,
|
||||
(is_multi_geometry<T>::value
|
||||
(util::is_multi<T>::value
|
||||
||
|
||||
((! is_geometry<T>::value)
|
||||
(util::is_not_geometry<T>::value
|
||||
&&
|
||||
is_multi_geometry_element
|
||||
util::is_multi_element
|
||||
<
|
||||
typename boost::range_value<T>::type
|
||||
>::value))
|
||||
@ -125,11 +64,10 @@ struct is_tupled_output_element
|
||||
// a range of points, linestrings or polygons
|
||||
template <typename Output>
|
||||
struct is_tupled_output_check
|
||||
: boost::mpl::and_
|
||||
: util::bool_constant
|
||||
<
|
||||
boost::is_same<typename geometry::tag<Output>::type, void>,
|
||||
//geometry::tuples::exists_if<Output, is_multi_geometry>
|
||||
geometry::tuples::exists_if<Output, is_tupled_output_element>
|
||||
(util::is_not_geometry<Output>::value
|
||||
&& geometry::tuples::exists_if<Output, is_tupled_output_element>::value)
|
||||
>
|
||||
{};
|
||||
|
||||
@ -139,10 +77,10 @@ struct is_tupled_output_check
|
||||
// or polygon
|
||||
template <typename T>
|
||||
struct is_tupled_single_output_check
|
||||
: boost::mpl::and_
|
||||
: util::bool_constant
|
||||
<
|
||||
boost::is_same<typename geometry::tag<T>::type, void>,
|
||||
geometry::tuples::exists_if<T, is_multi_geometry_element>
|
||||
(util::is_not_geometry<T>::value
|
||||
&& geometry::tuples::exists_if<T, util::is_multi_element>::value)
|
||||
>
|
||||
{};
|
||||
|
||||
@ -150,7 +88,7 @@ struct is_tupled_single_output_check
|
||||
// true if Output is boost::tuple, boost::tuples::cons, std::pair or std::tuple
|
||||
template <typename T>
|
||||
struct is_tupled
|
||||
: boost::integral_constant<bool, false>
|
||||
: util::bool_constant<false>
|
||||
{};
|
||||
|
||||
template
|
||||
@ -159,24 +97,24 @@ template
|
||||
class T5, class T6, class T7, class T8, class T9
|
||||
>
|
||||
struct is_tupled<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
|
||||
: boost::integral_constant<bool, true>
|
||||
: util::bool_constant<true>
|
||||
{};
|
||||
|
||||
template <typename HT, typename TT>
|
||||
struct is_tupled<boost::tuples::cons<HT, TT> >
|
||||
: boost::integral_constant<bool, true>
|
||||
: util::bool_constant<true>
|
||||
{};
|
||||
|
||||
template <typename F, typename S>
|
||||
struct is_tupled<std::pair<F, S> >
|
||||
: boost::integral_constant<bool, true>
|
||||
: util::bool_constant<true>
|
||||
{};
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
|
||||
template <typename ...Ts>
|
||||
struct is_tupled<std::tuple<Ts...> >
|
||||
: boost::integral_constant<bool, true>
|
||||
: util::bool_constant<true>
|
||||
{};
|
||||
|
||||
#endif // BOOST_GEOMETRY_CXX11_TUPLE
|
||||
@ -187,7 +125,7 @@ struct is_tupled<std::tuple<Ts...> >
|
||||
// and is_tupled_output_check defiend above passes
|
||||
template <typename Output, bool IsTupled = is_tupled<Output>::value>
|
||||
struct is_tupled_output
|
||||
: boost::integral_constant<bool, false>
|
||||
: util::bool_constant<false>
|
||||
{};
|
||||
|
||||
template <typename Output>
|
||||
@ -200,7 +138,7 @@ struct is_tupled_output<Output, true>
|
||||
// and is_tupled_single_output_check defiend above passes
|
||||
template <typename T, bool IsTupled = is_tupled<T>::value>
|
||||
struct is_tupled_single_output
|
||||
: boost::integral_constant<bool, false>
|
||||
: util::bool_constant<false>
|
||||
{};
|
||||
|
||||
template <typename T>
|
||||
@ -214,7 +152,7 @@ struct tupled_output_find_index_pred
|
||||
{
|
||||
template <typename T>
|
||||
struct pred
|
||||
: boost::is_same<typename geometry::tag<T>::type, Tag>
|
||||
: std::is_same<typename geometry::tag<T>::type, Tag>
|
||||
{};
|
||||
};
|
||||
|
||||
@ -236,14 +174,13 @@ template
|
||||
bool IsTupledOutput = is_tupled_output<Output>::value
|
||||
>
|
||||
struct tupled_output_has
|
||||
: boost::integral_constant<bool, false>
|
||||
: util::bool_constant<false>
|
||||
{};
|
||||
|
||||
template <typename Output, typename Tag>
|
||||
struct tupled_output_has<Output, Tag, true>
|
||||
: boost::integral_constant
|
||||
: util::bool_constant
|
||||
<
|
||||
bool,
|
||||
((tupled_output_find_index<Output, Tag>::value)
|
||||
< (geometry::tuples::size<Output>::value))
|
||||
>
|
||||
@ -374,13 +311,11 @@ struct tupled_back_inserters<std::pair<F, S> >
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
|
||||
// NOTE: In C++14 std::integer_sequence and std::make_integer_sequence could be used
|
||||
|
||||
template <typename Is, typename Tuple>
|
||||
struct tupled_back_inserters_st;
|
||||
|
||||
template <int ...Is, typename ...Ts>
|
||||
struct tupled_back_inserters_st<geometry::tuples::int_sequence<Is...>, std::tuple<Ts...> >
|
||||
template <std::size_t ...Is, typename ...Ts>
|
||||
struct tupled_back_inserters_st<std::index_sequence<Is...>, std::tuple<Ts...> >
|
||||
{
|
||||
typedef std::tuple<geometry::range::back_insert_iterator<Ts>...> type;
|
||||
|
||||
@ -394,7 +329,7 @@ template <typename ...Ts>
|
||||
struct tupled_back_inserters<std::tuple<Ts...> >
|
||||
: tupled_back_inserters_st
|
||||
<
|
||||
typename geometry::tuples::make_int_sequence<sizeof...(Ts)>::type,
|
||||
std::make_index_sequence<sizeof...(Ts)>,
|
||||
std::tuple<Ts...>
|
||||
>
|
||||
{};
|
||||
@ -452,7 +387,7 @@ struct is_tag_same_as_pred
|
||||
{
|
||||
template <typename T>
|
||||
struct pred
|
||||
: boost::is_same<typename geometry::tag<T>::type, Tag>
|
||||
: std::is_same<typename geometry::tag<T>::type, Tag>
|
||||
{};
|
||||
};
|
||||
|
||||
@ -569,7 +504,7 @@ struct tupled_output_tag {};
|
||||
|
||||
template <typename GeometryOut>
|
||||
struct setop_insert_output_tag
|
||||
: boost::mpl::if_c
|
||||
: std::conditional
|
||||
<
|
||||
geometry::detail::is_tupled_single_output<GeometryOut>::value,
|
||||
tupled_output_tag,
|
||||
@ -692,7 +627,7 @@ template
|
||||
<
|
||||
typename Geometry,
|
||||
typename SingleOut,
|
||||
bool IsMulti = geometry::detail::is_multi_geometry<Geometry>::value
|
||||
bool IsMulti = util::is_multi<Geometry>::value
|
||||
>
|
||||
struct convert_to_output
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, 2019 Oracle and/or its affiliates.
|
||||
// Copyright (c) 2017-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
|
||||
#include <boost/geometry/algorithms/detail/disjoint/point_box.hpp>
|
||||
@ -37,6 +36,8 @@
|
||||
#include <boost/geometry/strategies/covered_by.hpp>
|
||||
#include <boost/geometry/strategies/disjoint.hpp>
|
||||
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
||||
@ -167,15 +168,7 @@ struct multi_point_multi_geometry
|
||||
{
|
||||
typedef typename point_type<LinearOrAreal>::type point2_type;
|
||||
typedef model::box<point2_type> box2_type;
|
||||
static const bool is_linear = is_same
|
||||
<
|
||||
typename tag_cast
|
||||
<
|
||||
typename tag<LinearOrAreal>::type,
|
||||
linear_tag
|
||||
>::type,
|
||||
linear_tag
|
||||
>::value;
|
||||
static const bool is_linear = util::is_linear<LinearOrAreal>::value;
|
||||
|
||||
typename Strategy::envelope_strategy_type const
|
||||
envelope_strategy = strategy.get_envelope_strategy();
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2013, 2014, 2015, 2017, 2018, 2019.
|
||||
// Modifications copyright (c) 2013-2019, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2013-2020.
|
||||
// Modifications copyright (c) 2013-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -24,8 +24,6 @@
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
@ -42,8 +39,8 @@
|
||||
|
||||
#include <boost/geometry/geometries/segment.hpp>
|
||||
|
||||
#include <boost/geometry/util/add_const_if_c.hpp>
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
#include <boost/geometry/views/detail/indexed_point_view.hpp>
|
||||
|
||||
@ -110,21 +107,21 @@ struct fe_segment_segment
|
||||
template <typename Range>
|
||||
struct fe_range_value
|
||||
{
|
||||
typedef typename add_const_if_c
|
||||
typedef util::transcribe_const_t
|
||||
<
|
||||
boost::is_const<Range>::value,
|
||||
Range,
|
||||
typename boost::range_value<Range>::type
|
||||
>::type type;
|
||||
> type;
|
||||
};
|
||||
|
||||
template <typename Range>
|
||||
struct fe_point_type
|
||||
{
|
||||
typedef typename add_const_if_c
|
||||
typedef util::transcribe_const_t
|
||||
<
|
||||
boost::is_const<Range>::value,
|
||||
Range,
|
||||
typename point_type<Range>::type
|
||||
>::type type;
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
@ -132,8 +129,8 @@ template <typename Range>
|
||||
struct fe_point_type_is_referencable
|
||||
{
|
||||
static const bool value =
|
||||
boost::is_const<Range>::value
|
||||
|| boost::is_same
|
||||
std::is_const<Range>::value
|
||||
|| std::is_same
|
||||
<
|
||||
typename boost::range_reference<Range>::type,
|
||||
typename fe_point_type<Range>::type&
|
||||
|
@ -4,8 +4,8 @@
|
||||
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2015.
|
||||
// Modifications copyright (c) 2014-2015, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@ -24,14 +24,6 @@
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/mpl/fold.hpp>
|
||||
#include <boost/mpl/greater.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/insert.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/set.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/transform.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2018, 2019 Oracle and/or its affiliates.
|
||||
// Copyright (c) 2018-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
@ -13,6 +13,7 @@
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_LINE_INTERPOLATE_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
@ -119,7 +120,7 @@ struct interpolate_range
|
||||
p,
|
||||
diff_distance);
|
||||
policy.apply(p, pointlike);
|
||||
if (boost::is_same<PointLike, point_t>::value)
|
||||
if (std::is_same<PointLike, point_t>::value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -4,10 +4,11 @@
|
||||
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// 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.
|
||||
// This file was modified by Oracle on 2015-2020.
|
||||
// Modifications copyright (c) 2015-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// 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.
|
||||
@ -93,8 +94,8 @@ template <> struct tag_to_term<multi_point_tag> { typedef info::MULT
|
||||
template <> struct tag_to_term<multi_linestring_tag> { typedef info::MULTI_LINESTRING type; };
|
||||
template <> struct tag_to_term<multi_polygon_tag> { typedef info::MULTI_POLYGON type; };
|
||||
template <> struct tag_to_term<geometry_collection_tag> { typedef info::GEOMETRY_COLLECTION type; };
|
||||
template <int D> struct tag_to_term<boost::mpl::int_<D> > { typedef info::DIMENSION<D> type; };
|
||||
|
||||
template <int D> struct tag_to_term<std::integral_constant<int, D> > { typedef info::DIMENSION<D> type; };
|
||||
template <size_t D> struct tag_to_term<std::integral_constant<size_t, D> > { typedef info::DIMENSION<D> type; };
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,11 @@
|
||||
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2014.
|
||||
// Modifications copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// 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.
|
||||
@ -22,8 +23,6 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/mpl/size_t.hpp>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
|
@ -1,8 +1,9 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
// Copyright (c) 2014-2020, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
@ -12,9 +13,6 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/mpl/size_t.hpp>
|
||||
#include <boost/mpl/times.hpp>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017-2020.
|
||||
// Modifications copyright (c) 2017-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -20,7 +20,6 @@
|
||||
#include <deque>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -18,7 +22,6 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -17,9 +21,9 @@
|
||||
|
||||
#include <cmath>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
@ -170,7 +174,7 @@ struct transform_polygon
|
||||
// Note: here a resizeable container is assumed.
|
||||
traits::resize
|
||||
<
|
||||
typename boost::remove_reference
|
||||
typename std::remove_reference
|
||||
<
|
||||
typename traits::interior_mutable_type<Polygon2>::type
|
||||
>::type
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -18,7 +22,6 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
|
||||
#include <boost/geometry/core/interior_rings.hpp>
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/size_t.hpp>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
@ -43,7 +43,7 @@ struct cross_product
|
||||
// wedge product but it is not direct analogue to binary cross product.
|
||||
BOOST_MPL_ASSERT_MSG((false),
|
||||
NOT_IMPLEMENTED_FOR_THIS_DIMENSION,
|
||||
(mpl::size_t<Dimension>));
|
||||
(std::integral_constant<std::size_t, Dimension>));
|
||||
};
|
||||
|
||||
template <>
|
||||
|
@ -22,13 +22,11 @@
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
#include <boost/geometry/util/type_traits_std.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@ -118,11 +116,11 @@ struct indexed_access_pointer
|
||||
{
|
||||
static constexpr CoordinateType get(Geometry const* geometry)
|
||||
{
|
||||
return traits::indexed_access<typename boost::remove_pointer<Geometry>::type, Index, Dimension>::get(*geometry);
|
||||
return traits::indexed_access<typename std::remove_pointer<Geometry>::type, Index, Dimension>::get(*geometry);
|
||||
}
|
||||
static void set(Geometry* geometry, CoordinateType const& value)
|
||||
{
|
||||
traits::indexed_access<typename boost::remove_pointer<Geometry>::type, Index, Dimension>::set(*geometry, value);
|
||||
traits::indexed_access<typename std::remove_pointer<Geometry>::type, Index, Dimension>::set(*geometry, value);
|
||||
}
|
||||
};
|
||||
|
||||
@ -166,7 +164,7 @@ struct indexed_access
|
||||
};
|
||||
|
||||
template <typename Point, typename CoordinateType, std::size_t Dimension>
|
||||
struct access<point_tag, Point, CoordinateType, Dimension, boost::false_type>
|
||||
struct access<point_tag, Point, CoordinateType, Dimension, std::false_type>
|
||||
{
|
||||
static constexpr CoordinateType get(Point const& point)
|
||||
{
|
||||
@ -179,15 +177,15 @@ struct access<point_tag, Point, CoordinateType, Dimension, boost::false_type>
|
||||
};
|
||||
|
||||
template <typename Point, typename CoordinateType, std::size_t Dimension>
|
||||
struct access<point_tag, Point, CoordinateType, Dimension, boost::true_type>
|
||||
struct access<point_tag, Point, CoordinateType, Dimension, std::true_type>
|
||||
{
|
||||
static constexpr CoordinateType get(Point const* point)
|
||||
{
|
||||
return traits::access<typename boost::remove_pointer<Point>::type, Dimension>::get(*point);
|
||||
return traits::access<typename std::remove_pointer<Point>::type, Dimension>::get(*point);
|
||||
}
|
||||
static void set(Point* p, CoordinateType const& value)
|
||||
{
|
||||
traits::access<typename boost::remove_pointer<Point>::type, Dimension>::set(*p, value);
|
||||
traits::access<typename std::remove_pointer<Point>::type, Dimension>::set(*p, value);
|
||||
}
|
||||
};
|
||||
|
||||
@ -199,7 +197,7 @@ template
|
||||
std::size_t Index,
|
||||
std::size_t Dimension
|
||||
>
|
||||
struct indexed_access<box_tag, Box, CoordinateType, Index, Dimension, boost::false_type>
|
||||
struct indexed_access<box_tag, Box, CoordinateType, Index, Dimension, std::false_type>
|
||||
: detail::indexed_access_non_pointer<Box, CoordinateType, Index, Dimension>
|
||||
{};
|
||||
|
||||
@ -210,7 +208,7 @@ template
|
||||
std::size_t Index,
|
||||
std::size_t Dimension
|
||||
>
|
||||
struct indexed_access<box_tag, Box, CoordinateType, Index, Dimension, boost::true_type>
|
||||
struct indexed_access<box_tag, Box, CoordinateType, Index, Dimension, std::true_type>
|
||||
: detail::indexed_access_pointer<Box, CoordinateType, Index, Dimension>
|
||||
{};
|
||||
|
||||
@ -222,7 +220,7 @@ template
|
||||
std::size_t Index,
|
||||
std::size_t Dimension
|
||||
>
|
||||
struct indexed_access<segment_tag, Segment, CoordinateType, Index, Dimension, boost::false_type>
|
||||
struct indexed_access<segment_tag, Segment, CoordinateType, Index, Dimension, std::false_type>
|
||||
: detail::indexed_access_non_pointer<Segment, CoordinateType, Index, Dimension>
|
||||
{};
|
||||
|
||||
@ -234,7 +232,7 @@ template
|
||||
std::size_t Index,
|
||||
std::size_t Dimension
|
||||
>
|
||||
struct indexed_access<segment_tag, Segment, CoordinateType, Index, Dimension, boost::true_type>
|
||||
struct indexed_access<segment_tag, Segment, CoordinateType, Index, Dimension, std::true_type>
|
||||
: detail::indexed_access_pointer<Segment, CoordinateType, Index, Dimension>
|
||||
{};
|
||||
|
||||
@ -278,10 +276,10 @@ constexpr inline typename coordinate_type<Geometry>::type get(Geometry const& ge
|
||||
typedef core_dispatch::access
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename geometry::util::bare_type<Geometry>::type,
|
||||
typename util::remove_cptrref<Geometry>::type,
|
||||
typename coordinate_type<Geometry>::type,
|
||||
Dimension,
|
||||
typename boost::is_pointer<Geometry>::type
|
||||
typename std::is_pointer<Geometry>::type
|
||||
> coord_access_type;
|
||||
|
||||
return coord_access_type::get(geometry);
|
||||
@ -311,10 +309,10 @@ inline void set(Geometry& geometry
|
||||
typedef core_dispatch::access
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename geometry::util::bare_type<Geometry>::type,
|
||||
typename util::remove_cptrref<Geometry>::type,
|
||||
typename coordinate_type<Geometry>::type,
|
||||
Dimension,
|
||||
typename boost::is_pointer<Geometry>::type
|
||||
typename std::is_pointer<Geometry>::type
|
||||
> coord_access_type;
|
||||
|
||||
coord_access_type::set(geometry, value);
|
||||
@ -344,11 +342,11 @@ constexpr inline typename coordinate_type<Geometry>::type get(Geometry const& ge
|
||||
typedef core_dispatch::indexed_access
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename geometry::util::bare_type<Geometry>::type,
|
||||
typename util::remove_cptrref<Geometry>::type,
|
||||
typename coordinate_type<Geometry>::type,
|
||||
Index,
|
||||
Dimension,
|
||||
typename boost::is_pointer<Geometry>::type
|
||||
typename std::is_pointer<Geometry>::type
|
||||
> coord_access_type;
|
||||
|
||||
return coord_access_type::get(geometry);
|
||||
@ -379,11 +377,11 @@ inline void set(Geometry& geometry
|
||||
typedef core_dispatch::indexed_access
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename geometry::util::bare_type<Geometry>::type,
|
||||
typename util::remove_cptrref<Geometry>::type,
|
||||
typename coordinate_type<Geometry>::type,
|
||||
Index,
|
||||
Dimension,
|
||||
typename boost::is_pointer<Geometry>::type
|
||||
typename std::is_pointer<Geometry>::type
|
||||
> coord_access_type;
|
||||
|
||||
coord_access_type::set(geometry, value);
|
||||
|
@ -4,8 +4,8 @@
|
||||
// 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.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -20,13 +20,12 @@
|
||||
#define BOOST_GEOMETRY_CORE_CLOSURE_HPP
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/size_t.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
#include <boost/geometry/util/type_traits_std.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -97,10 +96,14 @@ template <closure_selector Closure>
|
||||
struct minimum_ring_size {};
|
||||
|
||||
template <>
|
||||
struct minimum_ring_size<geometry::closed> : boost::mpl::size_t<4> {};
|
||||
struct minimum_ring_size<geometry::closed>
|
||||
: std::integral_constant<std::size_t, 4>
|
||||
{};
|
||||
|
||||
template <>
|
||||
struct minimum_ring_size<geometry::open> : boost::mpl::size_t<3> {};
|
||||
struct minimum_ring_size<geometry::open>
|
||||
: std::integral_constant<std::size_t, 3>
|
||||
{};
|
||||
|
||||
|
||||
}} // namespace detail::point_order
|
||||
@ -191,7 +194,7 @@ struct closure
|
||||
static const closure_selector value = core_dispatch::closure
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename util::bare_type<Geometry>::type
|
||||
typename util::remove_cptrref<Geometry>::type
|
||||
>::value;
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -21,7 +25,7 @@
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
#include <boost/geometry/util/type_traits_std.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -34,7 +38,7 @@ namespace traits
|
||||
\par Geometries:
|
||||
- point
|
||||
\par Specializations should provide:
|
||||
- value (should be derived from boost::mpl::int_<D>
|
||||
- value (e.g. derived from std::integral_constant<std::size_t, D>)
|
||||
\ingroup traits
|
||||
*/
|
||||
template <typename Point, typename Enable = void>
|
||||
@ -54,16 +58,22 @@ namespace core_dispatch
|
||||
|
||||
// Base class derive from its own specialization of point-tag
|
||||
template <typename T, typename G>
|
||||
struct dimension : dimension<point_tag, typename point_type<T, G>::type> {};
|
||||
struct dimension
|
||||
: dimension<point_tag, typename point_type<T, G>::type>::type
|
||||
{};
|
||||
|
||||
template <typename P>
|
||||
struct dimension<point_tag, P>
|
||||
: traits::dimension<typename geometry::util::bare_type<P>::type>
|
||||
: std::integral_constant
|
||||
<
|
||||
std::size_t,
|
||||
traits::dimension<util::remove_cptrref_t<P>>::value
|
||||
>
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(
|
||||
(traits::dimension<typename geometry::util::bare_type<P>::type>::value > 0),
|
||||
(traits::dimension<util::remove_cptrref_t<P>>::value > 0),
|
||||
INVALID_DIMENSION_VALUE,
|
||||
(traits::dimension<typename geometry::util::bare_type<P>::type>)
|
||||
(traits::dimension<util::remove_cptrref_t<P>>)
|
||||
);
|
||||
};
|
||||
|
||||
@ -82,7 +92,7 @@ struct dimension
|
||||
: core_dispatch::dimension
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename geometry::util::bare_type<Geometry>::type
|
||||
typename util::remove_cptrref<Geometry>::type
|
||||
>
|
||||
{};
|
||||
|
||||
@ -103,13 +113,13 @@ constexpr inline void assert_dimension()
|
||||
template <typename Geometry, int Dimensions>
|
||||
constexpr inline void assert_dimension_less_equal()
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( static_cast<int>(dimension<Geometry>::type::value) <= Dimensions ));
|
||||
BOOST_STATIC_ASSERT(( static_cast<int>(dimension<Geometry>::value) <= Dimensions ));
|
||||
}
|
||||
|
||||
template <typename Geometry, int Dimensions>
|
||||
constexpr inline void assert_dimension_greater_equal()
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( static_cast<int>(dimension<Geometry>::type::value) >= Dimensions ));
|
||||
BOOST_STATIC_ASSERT(( static_cast<int>(dimension<Geometry>::value) >= Dimensions ));
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -119,7 +129,7 @@ constexpr inline void assert_dimension_greater_equal()
|
||||
template <typename G1, typename G2>
|
||||
constexpr inline void assert_dimension_equal()
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( static_cast<size_t>(dimension<G1>::type::value) == static_cast<size_t>(dimension<G2>::type::value) ));
|
||||
BOOST_STATIC_ASSERT(( static_cast<size_t>(dimension<G1>::value) == static_cast<size_t>(dimension<G2>::value) ));
|
||||
}
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -18,7 +22,7 @@
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
#include <boost/geometry/util/type_traits_std.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@ -67,7 +71,7 @@ namespace core_dispatch
|
||||
{
|
||||
typedef typename traits::coordinate_system
|
||||
<
|
||||
typename geometry::util::bare_type<Point>::type
|
||||
typename util::remove_cptrref<Point>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -89,7 +93,7 @@ struct coordinate_system
|
||||
typedef typename core_dispatch::coordinate_system
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename geometry::util::bare_type<Geometry>::type
|
||||
typename util::remove_cptrref<Geometry>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -19,8 +23,8 @@
|
||||
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
#include <boost/geometry/util/promote_floating_point.hpp>
|
||||
#include <boost/geometry/util/type_traits_std.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@ -66,7 +70,7 @@ struct coordinate_type<point_tag, Point>
|
||||
{
|
||||
typedef typename traits::coordinate_type
|
||||
<
|
||||
typename geometry::util::bare_type<Point>::type
|
||||
typename util::remove_cptrref<Point>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -86,10 +90,10 @@ template <typename Geometry>
|
||||
struct coordinate_type
|
||||
{
|
||||
typedef typename core_dispatch::coordinate_type
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename geometry::util::bare_type<Geometry>::type
|
||||
>::type type;
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename util::remove_cptrref<Geometry>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template <typename Geometry>
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -16,15 +20,13 @@
|
||||
#define BOOST_GEOMETRY_CORE_EXTERIOR_RING_HPP
|
||||
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/util/add_const_if_c.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@ -80,15 +82,11 @@ struct exterior_ring<polygon_tag, Polygon>
|
||||
{
|
||||
static
|
||||
typename geometry::ring_return_type<Polygon>::type
|
||||
apply(typename add_const_if_c
|
||||
<
|
||||
boost::is_const<Polygon>::type::value,
|
||||
Polygon
|
||||
>::type& polygon)
|
||||
apply(Polygon& polygon)
|
||||
{
|
||||
return traits::exterior_ring
|
||||
<
|
||||
typename boost::remove_const<Polygon>::type
|
||||
typename std::remove_const<Polygon>::type
|
||||
>::get(polygon);
|
||||
}
|
||||
};
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -16,8 +20,9 @@
|
||||
#define BOOST_GEOMETRY_CORE_GEOMETRY_ID_HPP
|
||||
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
@ -43,39 +48,39 @@ struct geometry_id
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<point_tag> : boost::mpl::int_<1> {};
|
||||
struct geometry_id<point_tag> : std::integral_constant<int, 1> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<linestring_tag> : boost::mpl::int_<2> {};
|
||||
struct geometry_id<linestring_tag> : std::integral_constant<int, 2> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<polygon_tag> : boost::mpl::int_<3> {};
|
||||
struct geometry_id<polygon_tag> : std::integral_constant<int, 3> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<multi_point_tag> : boost::mpl::int_<4> {};
|
||||
struct geometry_id<multi_point_tag> : std::integral_constant<int, 4> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<multi_linestring_tag> : boost::mpl::int_<5> {};
|
||||
struct geometry_id<multi_linestring_tag> : std::integral_constant<int, 5> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<multi_polygon_tag> : boost::mpl::int_<6> {};
|
||||
struct geometry_id<multi_polygon_tag> : std::integral_constant<int, 6> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<segment_tag> : boost::mpl::int_<92> {};
|
||||
struct geometry_id<segment_tag> : std::integral_constant<int, 92> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<ring_tag> : boost::mpl::int_<93> {};
|
||||
struct geometry_id<ring_tag> : std::integral_constant<int, 93> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct geometry_id<box_tag> : boost::mpl::int_<94> {};
|
||||
struct geometry_id<box_tag> : std::integral_constant<int, 94> {};
|
||||
|
||||
|
||||
} // namespace core_dispatch
|
||||
@ -86,7 +91,7 @@ struct geometry_id<box_tag> : boost::mpl::int_<94> {};
|
||||
/*!
|
||||
\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
|
||||
std::integral_constant<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
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -15,10 +19,10 @@
|
||||
#define BOOST_GEOMETRY_CORE_INTERIOR_RINGS_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
@ -79,7 +83,7 @@ struct interior_rings<polygon_tag, Polygon>
|
||||
{
|
||||
return traits::interior_rings
|
||||
<
|
||||
typename boost::remove_const<Polygon>::type
|
||||
typename std::remove_const<Polygon>::type
|
||||
>::get(polygon);
|
||||
}
|
||||
};
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -15,12 +19,9 @@
|
||||
#ifndef BOOST_GEOMETRY_CORE_INTERIOR_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_CORE_INTERIOR_TYPE_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
@ -87,14 +88,14 @@ struct interior_return_type
|
||||
template <typename Polygon>
|
||||
struct interior_return_type<polygon_tag, Polygon>
|
||||
{
|
||||
typedef typename boost::remove_const<Polygon>::type nc_polygon_type;
|
||||
typedef typename std::remove_const<Polygon>::type nc_polygon_type;
|
||||
|
||||
typedef typename boost::mpl::if_
|
||||
typedef std::conditional_t
|
||||
<
|
||||
boost::is_const<Polygon>,
|
||||
std::is_const<Polygon>::value,
|
||||
typename traits::interior_const_type<nc_polygon_type>::type,
|
||||
typename traits::interior_mutable_type<nc_polygon_type>::type
|
||||
>::type type;
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
@ -114,7 +115,7 @@ struct interior_type
|
||||
template <typename Polygon>
|
||||
struct interior_type<polygon_tag, Polygon>
|
||||
{
|
||||
typedef typename boost::remove_reference
|
||||
typedef typename std::remove_reference
|
||||
<
|
||||
typename interior_return_type<polygon_tag, Polygon>::type
|
||||
>::type type;
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -16,44 +20,10 @@
|
||||
#define BOOST_GEOMETRY_CORE_IS_AREAL_HPP
|
||||
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/config/header_deprecated.hpp>
|
||||
BOOST_HEADER_DEPRECATED("<boost/geometry/util/type_traits.hpp>")
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DISPATCH
|
||||
namespace core_dispatch
|
||||
{
|
||||
|
||||
template <typename GeometryTag> struct is_areal : boost::false_type {};
|
||||
|
||||
template <> struct is_areal<ring_tag> : boost::true_type {};
|
||||
template <> struct is_areal<box_tag> : boost::true_type {};
|
||||
template <> struct is_areal<polygon_tag> : boost::true_type {};
|
||||
template <> struct is_areal<multi_polygon_tag> : 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 <typename Geometry>
|
||||
struct is_areal : core_dispatch::is_areal<typename tag<Geometry>::type>
|
||||
{};
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_CORE_IS_AREAL_HPP
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -16,9 +20,9 @@
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@ -36,7 +40,7 @@ namespace traits
|
||||
template <typename Range>
|
||||
struct rvalue_type
|
||||
{
|
||||
typedef typename boost::remove_reference<Range>::type& type;
|
||||
typedef typename std::remove_reference<Range>::type& type;
|
||||
};
|
||||
|
||||
|
||||
@ -63,7 +67,7 @@ struct push_back
|
||||
{
|
||||
typedef typename boost::range_value
|
||||
<
|
||||
typename boost::remove_reference<Range>::type
|
||||
typename std::remove_reference<Range>::type
|
||||
>::type item_type;
|
||||
|
||||
static inline void apply(typename rvalue_type<Range>::type range,
|
||||
|
@ -4,8 +4,8 @@
|
||||
// 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.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
#include <boost/geometry/util/type_traits_std.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -178,7 +178,7 @@ struct point_order
|
||||
static const order_selector value = core_dispatch::point_order
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename util::bare_type<Geometry>::type
|
||||
typename util::remove_cptrref<Geometry>::type
|
||||
>::value;
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -17,12 +21,12 @@
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
#include <boost/geometry/util/type_traits_std.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -60,7 +64,7 @@ template <typename Tag, typename Geometry>
|
||||
struct point_type
|
||||
{
|
||||
// Default: call traits to get point type
|
||||
typedef typename boost::remove_const
|
||||
typedef typename std::remove_const
|
||||
<
|
||||
typename traits::point_type<Geometry>::type
|
||||
>::type type;
|
||||
@ -151,7 +155,7 @@ struct point_type
|
||||
typedef typename core_dispatch::point_type
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename boost::geometry::util::bare_type<Geometry>::type
|
||||
typename util::remove_cptrref<Geometry>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
// 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.
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -24,11 +24,10 @@
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
#include <boost/geometry/util/type_traits_std.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@ -111,7 +110,7 @@ struct radius_type
|
||||
typedef typename core_dispatch::radius_type
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename util::bare_type<Geometry>::type
|
||||
typename util::remove_cptrref<Geometry>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -128,9 +127,9 @@ inline typename radius_type<Geometry>::type get_radius(Geometry const& geometry)
|
||||
return core_dispatch::radius_access
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename util::bare_type<Geometry>::type,
|
||||
typename util::remove_cptrref<Geometry>::type,
|
||||
I,
|
||||
typename boost::is_pointer<Geometry>::type
|
||||
typename std::is_pointer<Geometry>::type
|
||||
>::get(geometry);
|
||||
}
|
||||
|
||||
@ -148,9 +147,9 @@ inline void set_radius(Geometry& geometry,
|
||||
core_dispatch::radius_access
|
||||
<
|
||||
typename tag<Geometry>::type,
|
||||
typename util::bare_type<Geometry>::type,
|
||||
typename util::remove_cptrref<Geometry>::type,
|
||||
I,
|
||||
typename boost::is_pointer<Geometry>::type
|
||||
typename std::is_pointer<Geometry>::type
|
||||
>::set(geometry, radius);
|
||||
}
|
||||
|
||||
@ -185,7 +184,7 @@ namespace core_dispatch
|
||||
template <typename Tag,
|
||||
typename Geometry,
|
||||
std::size_t Dimension>
|
||||
struct radius_access<Tag, Geometry, Dimension, boost::true_type>
|
||||
struct radius_access<Tag, Geometry, Dimension, std::true_type>
|
||||
{
|
||||
typedef typename geometry::radius_type<Geometry>::type radius_type;
|
||||
|
||||
@ -196,7 +195,7 @@ struct radius_access<Tag, Geometry, Dimension, boost::true_type>
|
||||
Tag,
|
||||
Geometry,
|
||||
Dimension,
|
||||
typename boost::is_pointer<Geometry>::type
|
||||
typename std::is_pointer<Geometry>::type
|
||||
>::get(*geometry);
|
||||
}
|
||||
|
||||
@ -207,7 +206,7 @@ struct radius_access<Tag, Geometry, Dimension, boost::true_type>
|
||||
Tag,
|
||||
Geometry,
|
||||
Dimension,
|
||||
typename boost::is_pointer<Geometry>::type
|
||||
typename std::is_pointer<Geometry>::type
|
||||
>::set(*geometry, value);
|
||||
}
|
||||
};
|
||||
@ -220,7 +219,7 @@ struct radius_type<srs_sphere_tag, Geometry>
|
||||
};
|
||||
|
||||
template <typename Geometry, std::size_t Dimension>
|
||||
struct radius_access<srs_sphere_tag, Geometry, Dimension, boost::false_type>
|
||||
struct radius_access<srs_sphere_tag, Geometry, Dimension, std::false_type>
|
||||
: detail::radius_access<srs_sphere_tag, Geometry, Dimension>
|
||||
{
|
||||
//BOOST_STATIC_ASSERT(Dimension == 0);
|
||||
@ -234,7 +233,7 @@ struct radius_type<srs_spheroid_tag, Geometry>
|
||||
};
|
||||
|
||||
template <typename Geometry, std::size_t Dimension>
|
||||
struct radius_access<srs_spheroid_tag, Geometry, Dimension, boost::false_type>
|
||||
struct radius_access<srs_spheroid_tag, Geometry, Dimension, std::false_type>
|
||||
: detail::radius_access<srs_spheroid_tag, Geometry, Dimension>
|
||||
{
|
||||
//BOOST_STATIC_ASSERT(Dimension == 0 || Dimension == 2);
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -17,9 +21,7 @@
|
||||
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/core/geometry_id.hpp>
|
||||
|
||||
@ -34,18 +36,18 @@ namespace detail
|
||||
|
||||
// Different geometries: reverse_dispatch if second ID < first ID
|
||||
template <std::size_t GeometryId1, std::size_t GeometryId2>
|
||||
struct reverse_dispatch : boost::mpl::if_c
|
||||
<
|
||||
(GeometryId1 > GeometryId2),
|
||||
boost::true_type,
|
||||
boost::false_type
|
||||
>
|
||||
struct reverse_dispatch
|
||||
: std::integral_constant
|
||||
<
|
||||
bool,
|
||||
(GeometryId1 > GeometryId2)
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
// Same geometry: never reverse_dispatch
|
||||
template <std::size_t GeometryId>
|
||||
struct reverse_dispatch<GeometryId, GeometryId> : boost::false_type {};
|
||||
struct reverse_dispatch<GeometryId, GeometryId> : std::false_type {};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
@ -4,10 +4,10 @@
|
||||
// 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.
|
||||
|
||||
// This file was modified by Oracle on 2015-2020.
|
||||
// Modifications copyright (c) 2015-2020, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// 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.
|
||||
@ -20,13 +20,10 @@
|
||||
#ifndef BOOST_GEOMETRY_CORE_RING_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_CORE_RING_TYPE_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
@ -98,14 +95,14 @@ struct ring_return_type<ring_tag, Ring>
|
||||
template <typename Polygon>
|
||||
struct ring_return_type<polygon_tag, Polygon>
|
||||
{
|
||||
typedef typename boost::remove_const<Polygon>::type nc_polygon_type;
|
||||
typedef typename std::remove_const<Polygon>::type nc_polygon_type;
|
||||
|
||||
typedef typename boost::mpl::if_
|
||||
typedef std::conditional_t
|
||||
<
|
||||
boost::is_const<Polygon>,
|
||||
std::is_const<Polygon>::value,
|
||||
typename traits::ring_const_type<nc_polygon_type>::type,
|
||||
typename traits::ring_mutable_type<nc_polygon_type>::type
|
||||
>::type type;
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
@ -115,12 +112,12 @@ struct ring_return_type<multi_linestring_tag, MultiLinestring>
|
||||
typedef typename ring_return_type
|
||||
<
|
||||
linestring_tag,
|
||||
typename boost::mpl::if_
|
||||
std::conditional_t
|
||||
<
|
||||
boost::is_const<MultiLinestring>,
|
||||
std::is_const<MultiLinestring>::value,
|
||||
typename boost::range_value<MultiLinestring>::type const,
|
||||
typename boost::range_value<MultiLinestring>::type
|
||||
>::type
|
||||
>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -131,12 +128,12 @@ struct ring_return_type<multi_polygon_tag, MultiPolygon>
|
||||
typedef typename ring_return_type
|
||||
<
|
||||
polygon_tag,
|
||||
typename boost::mpl::if_
|
||||
std::conditional_t
|
||||
<
|
||||
boost::is_const<MultiPolygon>,
|
||||
std::is_const<MultiPolygon>::value,
|
||||
typename boost::range_value<MultiPolygon>::type const,
|
||||
typename boost::range_value<MultiPolygon>::type
|
||||
>::type
|
||||
>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -156,7 +153,7 @@ struct ring_type<ring_tag, Ring>
|
||||
template <typename Polygon>
|
||||
struct ring_type<polygon_tag, Polygon>
|
||||
{
|
||||
typedef typename boost::remove_reference
|
||||
typedef typename std::remove_reference
|
||||
<
|
||||
typename ring_return_type<polygon_tag, Polygon>::type
|
||||
>::type type;
|
||||
@ -166,7 +163,7 @@ struct ring_type<polygon_tag, Polygon>
|
||||
template <typename MultiLinestring>
|
||||
struct ring_type<multi_linestring_tag, MultiLinestring>
|
||||
{
|
||||
typedef typename boost::remove_reference
|
||||
typedef typename std::remove_reference
|
||||
<
|
||||
typename ring_return_type<multi_linestring_tag, MultiLinestring>::type
|
||||
>::type type;
|
||||
@ -176,7 +173,7 @@ struct ring_type<multi_linestring_tag, MultiLinestring>
|
||||
template <typename MultiPolygon>
|
||||
struct ring_type<multi_polygon_tag, MultiPolygon>
|
||||
{
|
||||
typedef typename boost::remove_reference
|
||||
typedef typename std::remove_reference
|
||||
<
|
||||
typename ring_return_type<multi_polygon_tag, MultiPolygon>::type
|
||||
>::type type;
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -16,7 +20,7 @@
|
||||
|
||||
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
#include <boost/geometry/util/type_traits_std.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
@ -60,7 +64,7 @@ struct tag
|
||||
{
|
||||
typedef typename traits::tag
|
||||
<
|
||||
typename geometry::util::bare_type<Geometry>::type
|
||||
typename util::remove_cptrref<Geometry>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -15,8 +19,8 @@
|
||||
#define BOOST_GEOMETRY_CORE_TAG_CAST_HPP
|
||||
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -30,50 +34,30 @@ namespace boost { namespace geometry
|
||||
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
|
||||
\tparam BaseTags Base tags
|
||||
|
||||
\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
|
||||
>
|
||||
template <typename Tag, typename ...BaseTags>
|
||||
struct tag_cast
|
||||
{
|
||||
typedef typename boost::mpl::if_
|
||||
<
|
||||
typename boost::is_base_of<BaseTag, Tag>::type,
|
||||
BaseTag,
|
||||
// Try next one in line:
|
||||
typename tag_cast
|
||||
<
|
||||
Tag, BaseTag2, BaseTag3, BaseTag4,
|
||||
BaseTag5, BaseTag6, BaseTag7, void
|
||||
>::type
|
||||
>::type type;
|
||||
typedef Tag type;
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_SPECIALIZATIONS
|
||||
|
||||
// Specialization for last one
|
||||
template <typename Tag>
|
||||
struct tag_cast<Tag, void, void, void, void, void, void, void>
|
||||
template <typename Tag, typename BaseTag, typename ...BaseTags>
|
||||
struct tag_cast<Tag, BaseTag, BaseTags...>
|
||||
{
|
||||
// If not found, take specified tag, so do not cast
|
||||
typedef Tag type;
|
||||
typedef std::conditional_t
|
||||
<
|
||||
std::is_base_of<BaseTag, Tag>::value,
|
||||
BaseTag,
|
||||
typename tag_cast
|
||||
<
|
||||
Tag, BaseTags...
|
||||
>::type
|
||||
> type;
|
||||
};
|
||||
|
||||
#endif // DOXYGEN_NO_SPECIALIZATIONS
|
||||
|
@ -4,9 +4,8 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2018.
|
||||
// Modifications copyright (c) 2014-2018 Oracle and/or its affiliates.
|
||||
|
||||
// This file was modified by Oracle on 2014-2020.
|
||||
// Modifications copyright (c) 2014-2020 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
|
||||
@ -69,6 +68,9 @@ struct pointlike_tag {};
|
||||
/// For linear types (linestring, multi-linestring, segment)
|
||||
struct linear_tag {};
|
||||
|
||||
// Subset of linear types (polygon, multi_polygon)
|
||||
struct polylinear_tag : linear_tag {};
|
||||
|
||||
/// For areal types (polygon, multi_polygon, box, ring)
|
||||
struct areal_tag {};
|
||||
|
||||
@ -89,7 +91,7 @@ struct geometry_not_recognized_tag {};
|
||||
struct point_tag : single_tag, pointlike_tag {};
|
||||
|
||||
/// OGC Linestring identifying tag
|
||||
struct linestring_tag : single_tag, linear_tag {};
|
||||
struct linestring_tag : single_tag, polylinear_tag {};
|
||||
|
||||
/// OGC Polygon identifying tag
|
||||
struct polygon_tag : single_tag, polygonal_tag {};
|
||||
@ -108,7 +110,7 @@ struct segment_tag : single_tag, linear_tag {};
|
||||
struct multi_point_tag : multi_tag, pointlike_tag {};
|
||||
|
||||
/// OGC Multi linestring identifying tag
|
||||
struct multi_linestring_tag : multi_tag, linear_tag {};
|
||||
struct multi_linestring_tag : multi_tag, polylinear_tag {};
|
||||
|
||||
/// OGC Multi polygon identifying tag
|
||||
struct multi_polygon_tag : multi_tag, polygonal_tag {};
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -16,8 +20,7 @@
|
||||
#define BOOST_GEOMETRY_CORE_TOPOLOGICAL_DIMENSION_HPP
|
||||
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
@ -37,42 +40,42 @@ struct top_dim {};
|
||||
|
||||
|
||||
template <>
|
||||
struct top_dim<point_tag> : boost::mpl::int_<0> {};
|
||||
struct top_dim<point_tag> : std::integral_constant<int, 0> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct top_dim<linestring_tag> : boost::mpl::int_<1> {};
|
||||
struct top_dim<linestring_tag> : std::integral_constant<int, 1> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct top_dim<segment_tag> : boost::mpl::int_<1> {};
|
||||
struct top_dim<segment_tag> : std::integral_constant<int, 1> {};
|
||||
|
||||
|
||||
// ring: topological dimension of two, but some people say: 1 !!
|
||||
// NOTE: This is not OGC LinearRing!
|
||||
template <>
|
||||
struct top_dim<ring_tag> : boost::mpl::int_<2> {};
|
||||
struct top_dim<ring_tag> : std::integral_constant<int, 2> {};
|
||||
|
||||
|
||||
// TODO: This is wrong! Boxes may have various topological dimensions
|
||||
template <>
|
||||
struct top_dim<box_tag> : boost::mpl::int_<2> {};
|
||||
struct top_dim<box_tag> : std::integral_constant<int, 2> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct top_dim<polygon_tag> : boost::mpl::int_<2> {};
|
||||
struct top_dim<polygon_tag> : std::integral_constant<int, 2> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct top_dim<multi_point_tag> : boost::mpl::int_<0> {};
|
||||
struct top_dim<multi_point_tag> : std::integral_constant<int, 0> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct top_dim<multi_linestring_tag> : boost::mpl::int_<1> {};
|
||||
struct top_dim<multi_linestring_tag> : std::integral_constant<int, 1> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct top_dim<multi_polygon_tag> : boost::mpl::int_<2> {};
|
||||
struct top_dim<multi_polygon_tag> : std::integral_constant<int, 2> {};
|
||||
|
||||
|
||||
} // namespace core_dispatch
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018-2020 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,
|
||||
@ -13,6 +13,8 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_ALGORITHMS_ROTATION_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_ALGORITHMS_ROTATION_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/algorithms/detail.hpp>
|
||||
@ -37,8 +39,8 @@ template <typename V1, typename V2, typename Rotation>
|
||||
struct matrix<V1, V2, Rotation, vector_tag, vector_tag, 3>
|
||||
{
|
||||
static const bool cs_check =
|
||||
::boost::is_same<typename traits::coordinate_system<V1>::type, cs::cartesian>::value &&
|
||||
::boost::is_same<typename traits::coordinate_system<V2>::type, cs::cartesian>::value;
|
||||
std::is_same<typename traits::coordinate_system<V1>::type, cs::cartesian>::value &&
|
||||
std::is_same<typename traits::coordinate_system<V2>::type, cs::cartesian>::value;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THOSE_SYSTEMS, (V1, V2));
|
||||
|
||||
@ -118,8 +120,8 @@ template <typename V1, typename V2, typename Rotation>
|
||||
struct matrix<V1, V2, Rotation, vector_tag, vector_tag, 2>
|
||||
{
|
||||
static const bool cs_check =
|
||||
::boost::is_same<typename traits::coordinate_system<V1>::type, cs::cartesian>::value &&
|
||||
::boost::is_same<typename traits::coordinate_system<V2>::type, cs::cartesian>::value;
|
||||
std::is_same<typename traits::coordinate_system<V1>::type, cs::cartesian>::value &&
|
||||
std::is_same<typename traits::coordinate_system<V2>::type, cs::cartesian>::value;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THOSE_SYSTEMS, (V1, V2));
|
||||
|
||||
@ -185,8 +187,8 @@ template <typename V1, typename V2, typename Rotation>
|
||||
struct rotation<V1, V2, Rotation, vector_tag, vector_tag, rotation_quaternion_tag>
|
||||
{
|
||||
static const bool cs_check =
|
||||
::boost::is_same<typename traits::coordinate_system<V1>::type, cs::cartesian>::value &&
|
||||
::boost::is_same<typename traits::coordinate_system<V2>::type, cs::cartesian>::value;
|
||||
std::is_same<typename traits::coordinate_system<V1>::type, cs::cartesian>::value &&
|
||||
std::is_same<typename traits::coordinate_system<V2>::type, cs::cartesian>::value;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THOSE_SYSTEMS, (V1, V2));
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018-2020 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,
|
||||
@ -13,6 +13,8 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_ALGORITHMS_TRANSFORM_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_ALGORITHMS_TRANSFORM_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/extensions/algebra/algorithms/detail.hpp>
|
||||
@ -70,21 +72,20 @@ struct transform_geometrically<Point, Vector, point_tag, vector_tag>
|
||||
|
||||
static inline void apply(Point & point, Vector const& vector)
|
||||
{
|
||||
typedef boost::mpl::bool_<
|
||||
boost::is_same<
|
||||
typedef std::is_same
|
||||
<
|
||||
typename traits::coordinate_system<Point>::type,
|
||||
cs::cartesian
|
||||
>::value
|
||||
> is_cartesian;
|
||||
> is_cartesian;
|
||||
apply(point, vector, is_cartesian());
|
||||
}
|
||||
|
||||
static inline void apply(Point & point, Vector const& vector, boost::mpl::bool_<true> /*is_cartesian*/)
|
||||
static inline void apply(Point & point, Vector const& vector, std::true_type /*is_cartesian*/)
|
||||
{
|
||||
for_each_coordinate(point, detail::point_operation<Vector, std::plus>(vector));
|
||||
}
|
||||
|
||||
static inline void apply(Point & point, Vector const& vector, boost::mpl::bool_<false> /*is_cartesian*/)
|
||||
static inline void apply(Point & point, Vector const& vector, std::false_type /*is_cartesian*/)
|
||||
{
|
||||
typedef typename traits::coordinate_system<Point>::type cs;
|
||||
BOOST_MPL_ASSERT_MSG(false, NOT_IMPLEMENTED_FOR_THIS_CS, (cs));
|
||||
@ -102,23 +103,22 @@ struct transform_geometrically<Box, Vector, box_tag, vector_tag>
|
||||
|
||||
static inline void apply(Box & box, Vector const& vector)
|
||||
{
|
||||
typedef boost::mpl::bool_<
|
||||
boost::is_same<
|
||||
typedef std::is_same
|
||||
<
|
||||
typename traits::coordinate_system<point_type>::type,
|
||||
cs::cartesian
|
||||
>::value
|
||||
> is_cartesian;
|
||||
> is_cartesian;
|
||||
apply(box, vector, is_cartesian());
|
||||
}
|
||||
|
||||
static inline void apply(Box & box, Vector const& vector, boost::mpl::bool_<true> /*is_cartesian*/)
|
||||
static inline void apply(Box & box, Vector const& vector, std::true_type /*is_cartesian*/)
|
||||
{
|
||||
geometry::detail::transform_geometrically::box_vector_cartesian<
|
||||
Box, Vector, traits::dimension<point_type>::value
|
||||
>::apply(box, vector);
|
||||
}
|
||||
|
||||
static inline void apply(Box & box, Vector const& vector, boost::mpl::bool_<false> /*is_cartesian*/)
|
||||
static inline void apply(Box & box, Vector const& vector, std::false_type /*is_cartesian*/)
|
||||
{
|
||||
typedef typename traits::coordinate_system<point_type>::type cs;
|
||||
BOOST_MPL_ASSERT_MSG(false, NOT_IMPLEMENTED_FOR_THIS_CS, (cs));
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -15,13 +19,10 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_CORE_ACCESS_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_CORE_ACCESS_HPP
|
||||
|
||||
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
@ -30,7 +31,7 @@ namespace core_dispatch
|
||||
{
|
||||
|
||||
template <typename Vector, typename CoordinateType, std::size_t Dimension>
|
||||
struct access<vector_tag, Vector, CoordinateType, Dimension, boost::false_type>
|
||||
struct access<vector_tag, Vector, CoordinateType, Dimension, std::false_type>
|
||||
{
|
||||
static inline CoordinateType get(Vector const& v)
|
||||
{
|
||||
@ -43,20 +44,20 @@ struct access<vector_tag, Vector, CoordinateType, Dimension, boost::false_type>
|
||||
};
|
||||
|
||||
template <typename Vector, typename CoordinateType, std::size_t Dimension>
|
||||
struct access<vector_tag, Vector, CoordinateType, Dimension, boost::true_type>
|
||||
struct access<vector_tag, Vector, CoordinateType, Dimension, std::true_type>
|
||||
{
|
||||
static inline CoordinateType get(Vector const* v)
|
||||
{
|
||||
return traits::access<typename boost::remove_pointer<Vector>::type, Dimension>::get(*v);
|
||||
return traits::access<typename std::remove_pointer<Vector>::type, Dimension>::get(*v);
|
||||
}
|
||||
static inline void set(Vector* v, CoordinateType const& value)
|
||||
{
|
||||
traits::access<typename boost::remove_pointer<Vector>::type, Dimension>::set(*v, value);
|
||||
traits::access<typename std::remove_pointer<Vector>::type, Dimension>::set(*v, value);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Q, typename CoordinateType, std::size_t Dimension>
|
||||
struct access<quaternion_tag, Q, CoordinateType, Dimension, boost::false_type>
|
||||
struct access<quaternion_tag, Q, CoordinateType, Dimension, std::false_type>
|
||||
{
|
||||
static inline CoordinateType get(Q const& v)
|
||||
{
|
||||
@ -69,31 +70,31 @@ struct access<quaternion_tag, Q, CoordinateType, Dimension, boost::false_type>
|
||||
};
|
||||
|
||||
template <typename Q, typename CoordinateType, std::size_t Dimension>
|
||||
struct access<quaternion_tag, Q, CoordinateType, Dimension, boost::true_type>
|
||||
struct access<quaternion_tag, Q, CoordinateType, Dimension, std::true_type>
|
||||
{
|
||||
static inline CoordinateType get(Q const* v)
|
||||
{
|
||||
return traits::access<typename boost::remove_pointer<Q>::type, Dimension>::get(*v);
|
||||
return traits::access<typename std::remove_pointer<Q>::type, Dimension>::get(*v);
|
||||
}
|
||||
static inline void set(Q* v, CoordinateType const& value)
|
||||
{
|
||||
traits::access<typename boost::remove_pointer<Q>::type, Dimension>::set(*v, value);
|
||||
traits::access<typename std::remove_pointer<Q>::type, Dimension>::set(*v, value);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename M, typename CoordinateType, std::size_t I, std::size_t J>
|
||||
struct indexed_access<matrix_tag, M, CoordinateType, I, J, boost::false_type>
|
||||
struct indexed_access<matrix_tag, M, CoordinateType, I, J, std::false_type>
|
||||
: detail::indexed_access_non_pointer<M, CoordinateType, I, J>
|
||||
{};
|
||||
|
||||
template<typename M, typename CoordinateType, std::size_t I, std::size_t J>
|
||||
struct indexed_access<matrix_tag, M, CoordinateType, I, J, boost::true_type>
|
||||
struct indexed_access<matrix_tag, M, CoordinateType, I, J, std::true_type>
|
||||
: detail::indexed_access_pointer<M, CoordinateType, I, J>
|
||||
{};
|
||||
|
||||
|
||||
template <typename Q, typename CoordinateType, std::size_t Dimension>
|
||||
struct access<rotation_quaternion_tag, Q, CoordinateType, Dimension, boost::false_type>
|
||||
struct access<rotation_quaternion_tag, Q, CoordinateType, Dimension, std::false_type>
|
||||
{
|
||||
static inline CoordinateType get(Q const& v)
|
||||
{
|
||||
@ -106,25 +107,25 @@ struct access<rotation_quaternion_tag, Q, CoordinateType, Dimension, boost::fals
|
||||
};
|
||||
|
||||
template <typename Q, typename CoordinateType, std::size_t Dimension>
|
||||
struct access<rotation_quaternion_tag, Q, CoordinateType, Dimension, boost::true_type>
|
||||
struct access<rotation_quaternion_tag, Q, CoordinateType, Dimension, std::true_type>
|
||||
{
|
||||
static inline CoordinateType get(Q const* v)
|
||||
{
|
||||
return traits::access<typename boost::remove_pointer<Q>::type, Dimension>::get(*v);
|
||||
return traits::access<typename std::remove_pointer<Q>::type, Dimension>::get(*v);
|
||||
}
|
||||
static inline void set(Q* v, CoordinateType const& value)
|
||||
{
|
||||
traits::access<typename boost::remove_pointer<Q>::type, Dimension>::set(*v, value);
|
||||
traits::access<typename std::remove_pointer<Q>::type, Dimension>::set(*v, value);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename RM, typename CoordinateType, std::size_t I, std::size_t J>
|
||||
struct indexed_access<rotation_matrix_tag, RM, CoordinateType, I, J, boost::false_type>
|
||||
struct indexed_access<rotation_matrix_tag, RM, CoordinateType, I, J, std::false_type>
|
||||
: detail::indexed_access_non_pointer<RM, CoordinateType, I, J>
|
||||
{};
|
||||
|
||||
template<typename RM, typename CoordinateType, std::size_t I, std::size_t J>
|
||||
struct indexed_access<rotation_matrix_tag, RM, CoordinateType, I, J, boost::true_type>
|
||||
struct indexed_access<rotation_matrix_tag, RM, CoordinateType, I, J, std::true_type>
|
||||
: detail::indexed_access_pointer<RM, CoordinateType, I, J>
|
||||
{};
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018-2020 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
|
||||
@ -19,14 +19,12 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_CORE_COORDINATE_DIMENSION_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_CORE_COORDINATE_DIMENSION_HPP
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/util/bare_type.hpp>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
namespace boost { namespace geometry {
|
||||
|
||||
namespace traits {
|
||||
@ -36,7 +34,7 @@ struct indexed_dimension
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(false,
|
||||
NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_OR_INDEX,
|
||||
(Geometry, boost::integral_constant<std::size_t, Index>));
|
||||
(Geometry, std::integral_constant<std::size_t, Index>));
|
||||
};
|
||||
|
||||
} // namespace traits
|
||||
@ -46,12 +44,12 @@ namespace core_dispatch {
|
||||
|
||||
template <typename V>
|
||||
struct dimension<vector_tag, V>
|
||||
: traits::dimension<typename geometry::util::bare_type<V>::type>
|
||||
: traits::dimension<typename detail::remove_cptrref<V>::type>
|
||||
{};
|
||||
|
||||
template <typename G>
|
||||
struct dimension<quaternion_tag, G>
|
||||
: traits::dimension<typename geometry::util::bare_type<G>::type>
|
||||
: traits::dimension<typename detail::remove_cptrref<G>::type>
|
||||
{};
|
||||
|
||||
template <typename T, typename G, std::size_t Index>
|
||||
@ -59,23 +57,23 @@ struct indexed_dimension
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG(false,
|
||||
NOT_IMPLEMENTED_FOR_THIS_GEOMETRY_OR_INDEX,
|
||||
(G, boost::integral_constant<std::size_t, Index>));
|
||||
(G, std::integral_constant<std::size_t, Index>));
|
||||
};
|
||||
|
||||
template <typename G, std::size_t Index>
|
||||
struct indexed_dimension<matrix_tag, G, Index>
|
||||
: traits::indexed_dimension<typename geometry::util::bare_type<G>::type, Index>
|
||||
: traits::indexed_dimension<typename detail::remove_cptrref<G>::type, Index>
|
||||
{};
|
||||
|
||||
|
||||
template <typename G>
|
||||
struct dimension<rotation_quaternion_tag, G>
|
||||
: traits::dimension<typename geometry::util::bare_type<G>::type>
|
||||
: traits::dimension<typename detail::remove_cptrref<G>::type>
|
||||
{};
|
||||
|
||||
template <typename G>
|
||||
struct dimension<rotation_matrix_tag, G>
|
||||
: traits::dimension<typename geometry::util::bare_type<G>::type>
|
||||
: traits::dimension<typename detail::remove_cptrref<G>::type>
|
||||
{};
|
||||
|
||||
} // namespace core_dispatch
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -28,7 +32,7 @@ template <typename Vector>
|
||||
struct coordinate_system<vector_tag, Vector>
|
||||
{
|
||||
typedef typename traits::coordinate_system<
|
||||
typename geometry::util::bare_type<Vector>::type
|
||||
typename detail::remove_cptrref<Vector>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -36,7 +40,7 @@ struct coordinate_system<vector_tag, Vector>
|
||||
//struct coordinate_system<quaternion_tag, G>
|
||||
//{
|
||||
// typedef typename traits::coordinate_system<
|
||||
// typename geometry::util::bare_type<G>::type
|
||||
// typename detail::remove_cptrref<G>::type
|
||||
// >::type type;
|
||||
//};
|
||||
//
|
||||
@ -44,7 +48,7 @@ struct coordinate_system<vector_tag, Vector>
|
||||
//struct coordinate_system<matrix_tag, G>
|
||||
//{
|
||||
// typedef typename traits::coordinate_system<
|
||||
// typename geometry::util::bare_type<G>::type
|
||||
// typename detail::remove_cptrref<G>::type
|
||||
// >::type type;
|
||||
//};
|
||||
|
||||
@ -53,7 +57,7 @@ template <typename G>
|
||||
struct coordinate_system<rotation_quaternion_tag, G>
|
||||
{
|
||||
typedef typename traits::coordinate_system<
|
||||
typename geometry::util::bare_type<G>::type
|
||||
typename detail::remove_cptrref<G>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -61,7 +65,7 @@ template <typename G>
|
||||
struct coordinate_system<rotation_matrix_tag, G>
|
||||
{
|
||||
typedef typename traits::coordinate_system<
|
||||
typename geometry::util::bare_type<G>::type
|
||||
typename detail::remove_cptrref<G>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -28,7 +32,7 @@ template <typename Vector>
|
||||
struct coordinate_type<vector_tag, Vector>
|
||||
{
|
||||
typedef typename traits::coordinate_type<
|
||||
typename geometry::util::bare_type<Vector>::type
|
||||
typename detail::remove_cptrref<Vector>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -36,7 +40,7 @@ template <typename G>
|
||||
struct coordinate_type<quaternion_tag, G>
|
||||
{
|
||||
typedef typename traits::coordinate_type<
|
||||
typename geometry::util::bare_type<G>::type
|
||||
typename detail::remove_cptrref<G>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -44,7 +48,7 @@ template <typename G>
|
||||
struct coordinate_type<matrix_tag, G>
|
||||
{
|
||||
typedef typename traits::coordinate_type<
|
||||
typename geometry::util::bare_type<G>::type
|
||||
typename detail::remove_cptrref<G>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -53,7 +57,7 @@ template <typename G>
|
||||
struct coordinate_type<rotation_quaternion_tag, G>
|
||||
{
|
||||
typedef typename traits::coordinate_type<
|
||||
typename geometry::util::bare_type<G>::type
|
||||
typename detail::remove_cptrref<G>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
@ -61,7 +65,7 @@ template <typename G>
|
||||
struct coordinate_type<rotation_matrix_tag, G>
|
||||
{
|
||||
typedef typename traits::coordinate_type<
|
||||
typename geometry::util::bare_type<G>::type
|
||||
typename detail::remove_cptrref<G>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018-2020 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
|
||||
@ -19,6 +19,8 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_MATRIX_CONCEPT_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_MATRIX_CONCEPT_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
@ -78,7 +80,7 @@ public:
|
||||
/// BCCL macro to apply the concept
|
||||
BOOST_CONCEPT_USAGE(Matrix)
|
||||
{
|
||||
static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
dimension_checker<Geometry, 0, ccount>::apply();
|
||||
@ -136,7 +138,7 @@ public:
|
||||
/// BCCL macro to apply the concept
|
||||
BOOST_CONCEPT_USAGE(ConstMatrix)
|
||||
{
|
||||
//static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
//static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
//BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
//dimension_checker<Geometry, 0, ccount>::apply();
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_QUATERNION_CONCEPT_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_QUATERNION_CONCEPT_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
@ -59,7 +61,7 @@ public:
|
||||
{
|
||||
//static const bool dim_check = dimension<Geometry>::value == 4;
|
||||
//BOOST_MPL_ASSERT_MSG(dim_check, INVALID_DIMENSION, (RotationQuaternion));
|
||||
//static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
//static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
//BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
dimension_checker<Geometry, 0, 4>::apply();
|
||||
@ -102,7 +104,7 @@ public:
|
||||
{
|
||||
//static const bool dim_check = dimension<Geometry>::value == 4;
|
||||
//BOOST_MPL_ASSERT_MSG(dim_check, INVALID_DIMENSION, (ConstRotationQuaternion));
|
||||
//static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
//static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
//BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
dimension_checker<Geometry, 0, 4>::apply();
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_ROTATION_MATRIX_CONCEPT_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_ROTATION_MATRIX_CONCEPT_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
@ -78,7 +80,7 @@ public:
|
||||
/// BCCL macro to apply the concept
|
||||
BOOST_CONCEPT_USAGE(RotationMatrix)
|
||||
{
|
||||
static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
dimension_checker<Geometry, 0, ccount>::apply();
|
||||
@ -136,7 +138,7 @@ public:
|
||||
/// BCCL macro to apply the concept
|
||||
BOOST_CONCEPT_USAGE(ConstRotationMatrix)
|
||||
{
|
||||
static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
dimension_checker<Geometry, 0, ccount>::apply();
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_ROTATION_QUATERNION_CONCEPT_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_ROTATION_QUATERNION_CONCEPT_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
@ -63,7 +65,7 @@ public:
|
||||
{
|
||||
static const bool dim_check = dimension<Geometry>::value == 3;
|
||||
BOOST_MPL_ASSERT_MSG(dim_check, INVALID_DIMENSION, (RotationQuaternion));
|
||||
static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
dimension_checker<Geometry, 0, 4>::apply();
|
||||
@ -106,7 +108,7 @@ public:
|
||||
{
|
||||
static const bool dim_check = dimension<Geometry>::value == 3;
|
||||
BOOST_MPL_ASSERT_MSG(dim_check, INVALID_DIMENSION, (ConstRotationQuaternion));
|
||||
static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
dimension_checker<Geometry, 0, 4>::apply();
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_VECTOR_CONCEPT_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_VECTOR_CONCEPT_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
@ -63,7 +65,7 @@ public:
|
||||
/// BCCL macro to apply the Vector concept
|
||||
BOOST_CONCEPT_USAGE(Vector)
|
||||
{
|
||||
static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
dimension_checker<Geometry, 0, ccount>::apply();
|
||||
@ -106,7 +108,7 @@ public:
|
||||
/// BCCL macro to apply the ConstVector concept
|
||||
BOOST_CONCEPT_USAGE(ConstVector)
|
||||
{
|
||||
static const bool cs_check = ::boost::is_same<csystem, cs::cartesian>::value;
|
||||
static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
|
||||
BOOST_MPL_ASSERT_MSG(cs_check, NOT_IMPLEMENTED_FOR_THIS_CS, (csystem));
|
||||
|
||||
dimension_checker<Geometry, 0, ccount>::apply();
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018-2020 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
|
||||
@ -20,6 +20,7 @@
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_MATRIX_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/access.hpp>
|
||||
#include <boost/geometry/extensions/algebra/core/coordinate_dimension.hpp>
|
||||
@ -96,12 +97,12 @@ struct coordinate_type<model::matrix<CoordinateType, Rows, Cols> >
|
||||
|
||||
template <typename CoordinateType, std::size_t Rows, std::size_t Cols>
|
||||
struct indexed_dimension<model::matrix<CoordinateType, Rows, Cols>, 0>
|
||||
: boost::integral_constant<std::size_t, Rows>
|
||||
: std::integral_constant<std::size_t, Rows>
|
||||
{};
|
||||
|
||||
template <typename CoordinateType, std::size_t Rows, std::size_t Cols>
|
||||
struct indexed_dimension<model::matrix<CoordinateType, Rows, Cols>, 1>
|
||||
: boost::integral_constant<std::size_t, Cols>
|
||||
: std::integral_constant<std::size_t, Cols>
|
||||
{};
|
||||
|
||||
template <typename CoordinateType, std::size_t Rows, std::size_t Cols, std::size_t I, std::size_t J>
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 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.
|
||||
|
||||
@ -16,6 +20,7 @@
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_QUATERNION_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/extensions/algebra/core/tags.hpp>
|
||||
#include <boost/geometry/extensions/algebra/geometries/concepts/quaternion_concept.hpp>
|
||||
@ -102,7 +107,7 @@ struct coordinate_type<model::quaternion<CoordinateType> >
|
||||
|
||||
template <typename CoordinateType>
|
||||
struct dimension<model::quaternion<CoordinateType> >
|
||||
: boost::integral_constant<std::size_t, 4>
|
||||
: std::integral_constant<std::size_t, 4>
|
||||
{};
|
||||
|
||||
template<typename CoordinateType, std::size_t Dimension>
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018-2020 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
|
||||
@ -20,6 +20,7 @@
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_ROTATION_MATRIX_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
|
||||
@ -97,7 +98,7 @@ struct coordinate_system<model::rotation_matrix<CoordinateType, Dimension> >
|
||||
|
||||
template <typename CoordinateType, std::size_t Dimension>
|
||||
struct dimension<model::rotation_matrix<CoordinateType, Dimension> >
|
||||
: boost::mpl::int_<Dimension>
|
||||
: std::integral_constant<std::size_t, Dimension>
|
||||
{};
|
||||
|
||||
template <typename CoordinateType, std::size_t Dimension, std::size_t I, std::size_t J>
|
||||
|
@ -5,8 +5,8 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2018-2020.
|
||||
// Modifications copyright (c) 2018-2020 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
|
||||
@ -20,6 +20,7 @@
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_ROTATION_QUATERNION_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
|
||||
@ -109,7 +110,7 @@ struct coordinate_system<model::rotation_quaternion<CoordinateType> >
|
||||
|
||||
template <typename CoordinateType>
|
||||
struct dimension<model::rotation_quaternion<CoordinateType> >
|
||||
: boost::mpl::int_<3>
|
||||
: std::integral_constant<std::size_t, 3>
|
||||
{};
|
||||
|
||||
template
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -16,6 +20,7 @@
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_VECTOR_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/geometry/algorithms/assign.hpp>
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
@ -100,7 +105,7 @@ struct coordinate_system<model::vector<CoordinateType, DimensionCount> >
|
||||
|
||||
template <typename CoordinateType, std::size_t DimensionCount>
|
||||
struct dimension<model::vector<CoordinateType, DimensionCount> >
|
||||
: boost::mpl::int_<DimensionCount>
|
||||
: std::integral_constant<std::size_t, DimensionCount>
|
||||
{};
|
||||
|
||||
template
|
||||
|
@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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)
|
||||
@ -12,7 +16,6 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DISTANCE_INFO_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DISTANCE_INFO_HPP
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/range/functions.hpp>
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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.
|
||||
|
||||
@ -29,7 +33,7 @@ namespace cs
|
||||
\see
|
||||
\ingroup cs
|
||||
\tparam Code the EPSG code
|
||||
\todo Maybe derive from boost::mpl::int_<EpsgCode>
|
||||
\todo Maybe derive from std::integral_constant<std::size_t, EpsgCode>
|
||||
*/
|
||||
template<std::size_t Code>
|
||||
struct epsg
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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)
|
||||
@ -10,15 +14,13 @@
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_STRATEGIES_GEOGRAPHIC_DISTANCE_CROSS_TRACK_HPP
|
||||
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/spherical/distance_cross_track.hpp>
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -36,16 +38,16 @@ struct default_strategy<point_tag, segment_tag, Point, PointOfSegment, geographi
|
||||
typedef cross_track
|
||||
<
|
||||
void,
|
||||
typename boost::mpl::if_
|
||||
std::conditional_t
|
||||
<
|
||||
boost::is_void<Strategy>,
|
||||
std::is_void<Strategy>::value,
|
||||
typename default_strategy
|
||||
<
|
||||
point_tag, point_tag, Point, PointOfSegment,
|
||||
geographic_tag, geographic_tag
|
||||
>::type,
|
||||
Strategy
|
||||
>::type
|
||||
>
|
||||
> type;
|
||||
};
|
||||
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020, 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)
|
||||
@ -22,12 +26,12 @@
|
||||
#include <climits>
|
||||
#include <cstring>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/detail/endian.hpp>
|
||||
#include <boost/type_traits/is_signed.hpp>
|
||||
|
||||
#if CHAR_BIT != 8
|
||||
#error Platforms with CHAR_BIT != 8 are not supported
|
||||
@ -54,7 +58,7 @@ typedef little_endian_tag native_endian_tag;
|
||||
|
||||
// Unrolled loops for loading and storing streams of bytes.
|
||||
|
||||
template <typename T, std::size_t N, bool Sign = boost::is_signed<T>::value>
|
||||
template <typename T, std::size_t N, bool Sign = std::is_signed<T>::value>
|
||||
struct unrolled_byte_loops
|
||||
{
|
||||
typedef unrolled_byte_loops<T, N - 1, Sign> next;
|
||||
@ -137,7 +141,7 @@ struct unrolled_byte_loops<T, 1, true>
|
||||
template <typename Iterator>
|
||||
static void store_forward(Iterator& bytes, T value)
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_signed<typename Iterator::value_type>::value));
|
||||
BOOST_STATIC_ASSERT((std::is_signed<typename Iterator::value_type>::value));
|
||||
|
||||
*bytes = static_cast<typename Iterator::value_type>(value);
|
||||
}
|
||||
@ -145,7 +149,7 @@ struct unrolled_byte_loops<T, 1, true>
|
||||
template <typename Iterator>
|
||||
static void store_backward(Iterator& bytes, T value)
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_signed<typename Iterator::value_type>::value));
|
||||
BOOST_STATIC_ASSERT((std::is_signed<typename Iterator::value_type>::value));
|
||||
|
||||
*(bytes - 1) = static_cast<typename Iterator::value_type>(value);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user