// 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, 2014, 2015, 2017, 2018, 2019.
+// Modifications copyright (c) 2013-2019 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
template <typename Result, typename BoundaryChecker, bool TransposeResult>
class disjoint_linestring_pred
{
+ typedef typename BoundaryChecker::equals_strategy_type equals_strategy_type;
+
public:
disjoint_linestring_pred(Result & res,
BoundaryChecker const& boundary_checker)
// point-like linestring
if ( count == 2
&& equals::equals_point_point(range::front(linestring),
- range::back(linestring)) )
+ range::back(linestring),
+ equals_strategy_type()) )
{
update<interior, exterior, '0', TransposeResult>(m_result);
}
Result & result,
IntersectionStrategy const& intersection_strategy)
{
+ typedef typename IntersectionStrategy::cs_tag cs_tag;
+
// The result should be FFFFFFFFF
relate::set<exterior, exterior, result_dimension<Geometry1>::value>(result);// FFFFFFFFd, d in [1,9] or T
if ( BOOST_GEOMETRY_CONDITION( result.interrupt ) )
return;
// get and analyse turns
- typedef typename turns::get_turns<Geometry1, Geometry2>::turn_info turn_type;
+ typedef typename turns::get_turns
+ <
+ Geometry1, Geometry2
+ >::template turn_info_type<IntersectionStrategy>::type turn_type;
std::vector<turn_type> turns;
interrupt_policy_linear_linear<Result> interrupt_policy(result);
if ( BOOST_GEOMETRY_CONDITION( result.interrupt ) )
return;
- boundary_checker<Geometry1> boundary_checker1(geometry1);
- disjoint_linestring_pred<Result, boundary_checker<Geometry1>, false> pred1(result, boundary_checker1);
+ typedef boundary_checker
+ <
+ Geometry1,
+ typename IntersectionStrategy::point_in_point_strategy_type
+ > boundary_checker1_type;
+ boundary_checker1_type boundary_checker1(geometry1);
+ disjoint_linestring_pred<Result, boundary_checker1_type, false> pred1(result, boundary_checker1);
for_each_disjoint_geometry_if<0, Geometry1>::apply(turns.begin(), turns.end(), geometry1, pred1);
if ( BOOST_GEOMETRY_CONDITION( result.interrupt ) )
return;
- boundary_checker<Geometry2> boundary_checker2(geometry2);
- disjoint_linestring_pred<Result, boundary_checker<Geometry2>, true> pred2(result, boundary_checker2);
+ typedef boundary_checker
+ <
+ Geometry2,
+ typename IntersectionStrategy::point_in_point_strategy_type
+ > boundary_checker2_type;
+ boundary_checker2_type boundary_checker2(geometry2);
+ disjoint_linestring_pred<Result, boundary_checker2_type, true> pred2(result, boundary_checker2);
for_each_disjoint_geometry_if<1, Geometry2>::apply(turns.begin(), turns.end(), geometry2, pred2);
if ( BOOST_GEOMETRY_CONDITION( result.interrupt ) )
return;
|| may_update<boundary, boundary, '0'>(result)
|| may_update<boundary, exterior, '0'>(result) )
{
- typedef turns::less<0, turns::less_op_linear_linear<0> > less;
+ typedef turns::less<0, turns::less_op_linear_linear<0>, cs_tag> less;
std::sort(turns.begin(), turns.end(), less());
turns_analyser<turn_type, 0> analyser;
|| may_update<boundary, boundary, '0', true>(result)
|| may_update<boundary, exterior, '0', true>(result) )
{
- typedef turns::less<1, turns::less_op_linear_linear<1> > less;
+ typedef turns::less<1, turns::less_op_linear_linear<1>, cs_tag> less;
std::sort(turns.begin(), turns.end(), less());
turns_analyser<turn_type, 1> analyser;
BoundaryChecker const& boundary_checker,
OtherBoundaryChecker const& other_boundary_checker)
{
+ typedef typename BoundaryChecker::equals_strategy_type equals_strategy_type;
+
overlay::operation_type const op = it->operations[op_id].operation;
segment_identifier const& seg_id = it->operations[op_id].seg_id;
{
// real exit point - may be multiple
// we know that we entered and now we exit
- if ( ! turn_on_the_same_ip<op_id>(m_exit_watcher.get_exit_turn(), *it) )
+ if ( ! turn_on_the_same_ip<op_id>(m_exit_watcher.get_exit_turn(),
+ *it,
+ equals_strategy_type()) )
{
m_exit_watcher.reset_detected_exit();
return;
if ( op == overlay::operation_intersection
- && turn_on_the_same_ip<op_id>(m_exit_watcher.get_exit_turn(), *it) )
+ && turn_on_the_same_ip<op_id>(m_exit_watcher.get_exit_turn(),
+ *it,
+ equals_strategy_type()) )
{
fake_enter_detected = true;
}
OtherBoundaryChecker const& /*other_boundary_checker*/,
bool first_in_range)
{
+ typedef typename BoundaryChecker::equals_strategy_type
+ equals_strategy1_type;
+ typedef typename OtherBoundaryChecker::equals_strategy_type
+ equals_strategy2_type;
+
typename detail::single_geometry_return_type<Geometry const>::type
ls1_ref = detail::single_geometry(geometry, turn.operations[op_id].seg_id);
typename detail::single_geometry_return_type<OtherGeometry const>::type
// here we don't know which one is degenerated
bool const is_point1 = boost::size(ls1_ref) == 2
- && equals::equals_point_point(range::front(ls1_ref), range::back(ls1_ref));
+ && equals::equals_point_point(range::front(ls1_ref),
+ range::back(ls1_ref),
+ equals_strategy1_type());
bool const is_point2 = boost::size(ls2_ref) == 2
- && equals::equals_point_point(range::front(ls2_ref), range::back(ls2_ref));
+ && equals::equals_point_point(range::front(ls2_ref),
+ range::back(ls2_ref),
+ equals_strategy2_type());
// if the second one is degenerated
if ( !is_point1 && is_point2 )