// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
-// 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, 2015, 2017.
+// Modifications copyright (c) 2014-2017 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
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Segment2 const& segment2,
RobustPolicy const& robust_policy,
OutputIterator out,
- Strategy const& )
+ Strategy const& strategy)
{
typedef typename point_type<PointOut>::type point_type;
>::type
> intersection_return_type;
- typedef strategy::intersection::relate_cartesian_segments
+ typedef policies::relate::segments_intersection_points
<
- policies::relate::segments_intersection_points
- <
- intersection_return_type
- >
- > policy;
+ intersection_return_type
+ > policy_type;
- intersection_return_type is = policy::apply(segment1, segment2,
- robust_policy, pi_rob, pj_rob, qi_rob, qj_rob);
+ intersection_return_type
+ is = strategy.apply(segment1, segment2,
+ policy_type(), robust_policy,
+ pi_rob, pj_rob, qi_rob, qj_rob);
for (std::size_t i = 0; i < is.count; i++)
{
<
typename Linestring1, typename Linestring2,
typename RobustPolicy,
- typename OutputIterator, typename Strategy
+ typename OutputIterator,
+ typename Strategy
>
static inline OutputIterator apply(Linestring1 const& linestring1,
Linestring2 const& linestring2,
RobustPolicy const& robust_policy,
OutputIterator out,
- Strategy const& )
+ Strategy const& strategy)
{
typedef typename point_type<PointOut>::type point_type;
> turn_info;
std::deque<turn_info> turns;
- geometry::get_intersection_points(linestring1, linestring2, robust_policy, turns);
+ geometry::get_intersection_points(linestring1, linestring2,
+ robust_policy, turns, strategy);
for (typename boost::range_iterator<std::deque<turn_info> const>::type
it = boost::begin(turns); it != boost::end(turns); ++it)
static inline OutputIterator apply(LineString const& linestring, Areal const& areal,
RobustPolicy const& robust_policy,
OutputIterator out,
- Strategy const& )
+ Strategy const& strategy)
{
if (boost::size(linestring) == 0)
{
false,
(OverlayType == overlay_intersection ? ReverseAreal : !ReverseAreal),
detail::overlay::assign_null_policy
- >(linestring, areal, robust_policy, turns, policy);
+ >(linestring, areal, strategy, robust_policy, turns, policy);
if (no_crossing_turns_or_empty(turns))
{
static inline OutputIterator apply(Geometry1 const& geometry1,
Geometry2 const& geometry2,
RobustPolicy const& robust_policy,
- OutputIterator out, Strategy const& )
+ OutputIterator out, Strategy const& strategy)
{
typedef detail::overlay::turn_info
geometry::get_turns
<
false, false, detail::overlay::assign_null_policy
- >(geometry1, geometry2, robust_policy, turns, policy);
+ >(geometry1, geometry2, strategy, robust_policy, turns, policy);
for (typename std::vector<turn_info>::const_iterator it
= turns.begin(); it != turns.end(); ++it)
{
concepts::check<Geometry1 const>();
concepts::check<Geometry2 const>();
- typedef typename Strategy::rescale_policy_type rescale_policy_type;
+ typedef typename geometry::rescale_policy_type
+ <
+ typename geometry::point_type<Geometry1>::type // TODO from both
+ >::type rescale_policy_type;
+
rescale_policy_type robust_policy
= geometry::get_rescale_policy<rescale_policy_type>(geometry1, geometry2);
concepts::check<Geometry1 const>();
concepts::check<Geometry2 const>();
- typedef typename geometry::rescale_policy_type
- <
- typename geometry::point_type<Geometry1>::type // TODO from both
- >::type rescale_policy_type;
-
- typedef intersection_strategies
+ typedef typename strategy::intersection::services::default_strategy
<
- typename cs_tag<GeometryOut>::type,
- Geometry1,
- Geometry2,
- typename geometry::point_type<GeometryOut>::type,
- rescale_policy_type
- > strategy;
-
+ typename cs_tag<GeometryOut>::type
+ >::type strategy_type;
+
return intersection_insert<GeometryOut>(geometry1, geometry2, out,
- strategy());
+ strategy_type());
}
}} // namespace detail::intersection