mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-02 08:52:10 +00:00
[algorithms][inbtersection] add dispatch implementation for intersection(areal, areal, linear)
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
|
||||
|
||||
#include <boost/geometry/views/segment_view.hpp>
|
||||
#include <boost/geometry/views/detail/boundary_view.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/overlay/linear_linear.hpp>
|
||||
#include <boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp>
|
||||
@@ -574,6 +575,46 @@ struct intersection_insert_reversed
|
||||
};
|
||||
|
||||
|
||||
// dispatch for intersection(areal, areal, linear)
|
||||
template
|
||||
<
|
||||
typename Geometry1, typename Geometry2,
|
||||
typename LinestringOut,
|
||||
bool Reverse1, bool Reverse2, bool ReverseOut,
|
||||
typename Tag1, typename Tag2
|
||||
>
|
||||
struct intersection_insert
|
||||
<
|
||||
Geometry1, Geometry2,
|
||||
LinestringOut,
|
||||
overlay_intersection,
|
||||
Reverse1, Reverse2, ReverseOut,
|
||||
Tag1, Tag2, linestring_tag,
|
||||
true, true, false
|
||||
>
|
||||
{
|
||||
template
|
||||
<
|
||||
typename RobustPolicy, typename OutputIterator, typename Strategy
|
||||
>
|
||||
static inline OutputIterator apply(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
RobustPolicy const& robust_policy,
|
||||
OutputIterator oit,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
detail::boundary_view<Geometry1 const> view1(geometry1);
|
||||
detail::boundary_view<Geometry2 const> view2(geometry2);
|
||||
|
||||
return detail::overlay::linear_linear_linestring
|
||||
<
|
||||
detail::boundary_view<Geometry1 const>,
|
||||
detail::boundary_view<Geometry2 const>,
|
||||
LinestringOut,
|
||||
overlay_intersection
|
||||
>::apply(view1, view2, robust_policy, oit, strategy);
|
||||
}
|
||||
};
|
||||
|
||||
// dispatch for non-areal geometries
|
||||
template
|
||||
|
||||
Reference in New Issue
Block a user