diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:24:45 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:24:45 +0900 |
commit | 5ce1cfc2525b06c0a9e38531813781de0281c96d (patch) | |
tree | 19cc66c6cf6396db288813b2558cc350f1deede2 /boost/geometry/algorithms/union.hpp | |
parent | 3c1df2168531ad5580076ae08d529054689aeedd (diff) | |
download | boost-5ce1cfc2525b06c0a9e38531813781de0281c96d.tar.gz boost-5ce1cfc2525b06c0a9e38531813781de0281c96d.tar.bz2 boost-5ce1cfc2525b06c0a9e38531813781de0281c96d.zip |
Imported Upstream version 1.71.0upstream/1.71.0
Diffstat (limited to 'boost/geometry/algorithms/union.hpp')
-rw-r--r-- | boost/geometry/algorithms/union.hpp | 52 |
1 files changed, 21 insertions, 31 deletions
diff --git a/boost/geometry/algorithms/union.hpp b/boost/geometry/algorithms/union.hpp index d1d04d4045..de47795629 100644 --- a/boost/geometry/algorithms/union.hpp +++ b/boost/geometry/algorithms/union.hpp @@ -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, 2017, 2018, 2019. +// Modifications copyright (c) 2014-2019 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 @@ -211,19 +211,20 @@ inline OutputIterator union_insert(Geometry1 const& geometry1, concepts::check<Geometry2 const>(); concepts::check<GeometryOut>(); + typename strategy::intersection::services::default_strategy + < + typename cs_tag<GeometryOut>::type + >::type strategy; + typedef typename geometry::rescale_overlay_policy_type < Geometry1, Geometry2 >::type rescale_policy_type; - typename strategy::intersection::services::default_strategy - < - typename cs_tag<GeometryOut>::type - >::type strategy; - rescale_policy_type robust_policy - = geometry::get_rescale_policy<rescale_policy_type>(geometry1, geometry2); + = geometry::get_rescale_policy<rescale_policy_type>( + geometry1, geometry2, strategy); return dispatch::union_insert < @@ -244,18 +245,27 @@ struct union_ < typename Geometry1, typename Geometry2, - typename RobustPolicy, typename Collection, typename Strategy > static inline void apply(Geometry1 const& geometry1, Geometry2 const& geometry2, - RobustPolicy const& robust_policy, Collection & output_collection, Strategy const& strategy) { typedef typename boost::range_value<Collection>::type geometry_out; + typedef typename geometry::rescale_overlay_policy_type + < + Geometry1, + Geometry2, + typename Strategy::cs_tag + >::type rescale_policy_type; + + rescale_policy_type robust_policy + = geometry::get_rescale_policy<rescale_policy_type>( + geometry1, geometry2, strategy); + dispatch::union_insert < Geometry1, Geometry2, geometry_out @@ -268,29 +278,20 @@ struct union_ < typename Geometry1, typename Geometry2, - typename RobustPolicy, typename Collection > static inline void apply(Geometry1 const& geometry1, Geometry2 const& geometry2, - RobustPolicy const& robust_policy, Collection & output_collection, default_strategy) { - typedef typename boost::range_value<Collection>::type geometry_out; - typedef typename strategy::relate::services::default_strategy < Geometry1, Geometry2 >::type strategy_type; - dispatch::union_insert - < - Geometry1, Geometry2, geometry_out - >::apply(geometry1, geometry2, robust_policy, - range::back_inserter(output_collection), - strategy_type()); + apply(geometry1, geometry2, output_collection, strategy_type()); } }; @@ -313,18 +314,7 @@ struct union_ concepts::check<Geometry2 const>(); concepts::check<typename boost::range_value<Collection>::type>(); - typedef typename geometry::rescale_overlay_policy_type - < - Geometry1, - Geometry2 - >::type rescale_policy_type; - - rescale_policy_type robust_policy - = geometry::get_rescale_policy<rescale_policy_type>(geometry1, - geometry2); - resolve_strategy::union_::apply(geometry1, geometry2, - robust_policy, output_collection, strategy); } |