123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862 |
- #ifndef BOOST_GEOMETRY_STRATEGIES_CARTESIAN_INTERSECTION_HPP
- #define BOOST_GEOMETRY_STRATEGIES_CARTESIAN_INTERSECTION_HPP
- #include <algorithm>
- #include <boost/geometry/core/exception.hpp>
- #include <boost/geometry/geometries/concepts/point_concept.hpp>
- #include <boost/geometry/geometries/concepts/segment_concept.hpp>
- #include <boost/geometry/geometries/segment.hpp>
- #include <boost/geometry/arithmetic/determinant.hpp>
- #include <boost/geometry/algorithms/detail/assign_values.hpp>
- #include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
- #include <boost/geometry/algorithms/detail/equals/point_point.hpp>
- #include <boost/geometry/algorithms/detail/recalculate.hpp>
- #include <boost/geometry/util/math.hpp>
- #include <boost/geometry/util/numeric_cast.hpp>
- #include <boost/geometry/util/promote_integral.hpp>
- #include <boost/geometry/util/select_calculation_type.hpp>
- #include <boost/geometry/strategy/cartesian/area.hpp>
- #include <boost/geometry/strategy/cartesian/envelope.hpp>
- #include <boost/geometry/strategy/cartesian/expand_box.hpp>
- #include <boost/geometry/strategy/cartesian/expand_segment.hpp>
- #include <boost/geometry/strategies/cartesian/disjoint_box_box.hpp>
- #include <boost/geometry/strategies/cartesian/disjoint_segment_box.hpp>
- #include <boost/geometry/strategies/cartesian/distance_pythagoras.hpp>
- #include <boost/geometry/strategies/cartesian/point_in_point.hpp>
- #include <boost/geometry/strategies/cartesian/point_in_poly_winding.hpp>
- #include <boost/geometry/strategies/covered_by.hpp>
- #include <boost/geometry/strategies/intersection.hpp>
- #include <boost/geometry/strategies/intersection_result.hpp>
- #include <boost/geometry/strategies/side.hpp>
- #include <boost/geometry/strategies/side_info.hpp>
- #include <boost/geometry/strategies/within.hpp>
- #include <boost/geometry/policies/robustness/rescale_policy_tags.hpp>
- #include <boost/geometry/policies/robustness/robust_point_type.hpp>
- #if defined(BOOST_GEOMETRY_DEBUG_ROBUSTNESS)
- # include <boost/geometry/io/wkt/write.hpp>
- #endif
- namespace boost { namespace geometry
- {
- namespace strategy { namespace intersection
- {
- namespace detail_usage
- {
- template <bool IsArithmetic>
- struct use_a
- {
- template <typename Ct, typename Ev>
- static bool apply(Ct const& cla, Ct const& clb, Ev const& eva, Ev const& evb)
- {
- auto const clm = (std::max)(cla, clb);
- if (clm <= 0)
- {
- return true;
- }
-
- auto const rcla = Ct(1.0) - cla / clm;
- auto const rclb = Ct(1.0) - clb / clm;
-
-
-
-
-
-
- Ev const mev = 5;
- Ev const mrcl = 1;
- return mev * eva + mrcl * rcla > mev * evb + mrcl * rclb;
- }
- };
- template <>
- struct use_a<false>
- {
- template <typename Ct, typename Ev>
- static bool apply(Ct const& , Ct const& , Ev const& , Ev const& )
- {
- return true;
- }
- };
- }
- template
- <
- typename CalculationType = void
- >
- struct cartesian_segments
- {
- typedef cartesian_tag cs_tag;
- template <typename CoordinateType, typename SegmentRatio>
- struct segment_intersection_info
- {
- private :
- typedef typename select_most_precise
- <
- CoordinateType, double
- >::type promoted_type;
- promoted_type comparable_length_a() const
- {
- return dx_a * dx_a + dy_a * dy_a;
- }
- promoted_type comparable_length_b() const
- {
- return dx_b * dx_b + dy_b * dy_b;
- }
- template <typename Point, typename Segment1, typename Segment2>
- void assign_a(Point& point, Segment1 const& a, Segment2 const& ) const
- {
- assign(point, a, dx_a, dy_a, robust_ra);
- }
- template <typename Point, typename Segment1, typename Segment2>
- void assign_b(Point& point, Segment1 const& , Segment2 const& b) const
- {
- assign(point, b, dx_b, dy_b, robust_rb);
- }
- template <typename Point, typename Segment>
- void assign(Point& point, Segment const& segment,
- CoordinateType const& dx, CoordinateType const& dy,
- SegmentRatio const& ratio) const
- {
-
-
-
- BOOST_GEOMETRY_ASSERT(ratio.denominator() != typename SegmentRatio::int_type(0));
- typedef typename promote_integral<CoordinateType>::type calc_type;
- calc_type const numerator
- = util::numeric_cast<calc_type>(ratio.numerator());
- calc_type const denominator
- = util::numeric_cast<calc_type>(ratio.denominator());
- calc_type const dx_calc = util::numeric_cast<calc_type>(dx);
- calc_type const dy_calc = util::numeric_cast<calc_type>(dy);
- set<0>(point, get<0, 0>(segment)
- + util::numeric_cast<CoordinateType>(
- math::divide<calc_type>(numerator * dx_calc, denominator)));
- set<1>(point, get<0, 1>(segment)
- + util::numeric_cast<CoordinateType>(
- math::divide<calc_type>(numerator * dy_calc, denominator)));
- }
- template <int Index, int Dim, typename Point, typename Segment>
- static bool exceeds_side_in_dimension(Point& p, Segment const& s)
- {
-
-
-
-
-
-
-
- auto const& c = get<Dim>(p);
- auto const& c0 = get<Index, Dim>(s);
- auto const& c1 = get<1 - Index, Dim>(s);
- return c0 < c1 ? math::smaller(c, c0)
- : c0 > c1 ? math::larger(c, c0)
- : false;
- }
- template <int Index, typename Point, typename Segment>
- static bool exceeds_side_of_segment(Point& p, Segment const& s)
- {
- return exceeds_side_in_dimension<Index, 0>(p, s)
- || exceeds_side_in_dimension<Index, 1>(p, s);
- }
- template <typename Point, typename Segment>
- static void assign_if_exceeds(Point& point, Segment const& s)
- {
- if (exceeds_side_of_segment<0>(point, s))
- {
- detail::assign_point_from_index<0>(s, point);
- }
- else if (exceeds_side_of_segment<1>(point, s))
- {
- detail::assign_point_from_index<1>(s, point);
- }
- }
- public :
- template <typename Point, typename Segment1, typename Segment2>
- void calculate(Point& point, Segment1 const& a, Segment2 const& b) const
- {
- bool const use_a
- = detail_usage::use_a
- <
- std::is_arithmetic<CoordinateType>::value
- >::apply(comparable_length_a(), comparable_length_b(),
- robust_ra.edge_value(), robust_rb.edge_value());
- if (use_a)
- {
- assign_a(point, a, b);
- }
- else
- {
- assign_b(point, a, b);
- }
- #ifndef BOOST_GEOMETRY_USE_RESCALING
-
-
-
- if (robust_ra.possibly_collinear(1.0e-3)
- && robust_rb.possibly_collinear(1.0e-3))
- {
-
-
-
-
-
- assign_if_exceeds(point, a);
- assign_if_exceeds(point, b);
- }
- #endif
- }
- CoordinateType dx_a, dy_a;
- CoordinateType dx_b, dy_b;
- SegmentRatio robust_ra;
- SegmentRatio robust_rb;
- };
- template <typename D, typename W, typename ResultType>
- static inline void cramers_rule(D const& dx_a, D const& dy_a,
- D const& dx_b, D const& dy_b, W const& wx, W const& wy,
-
- ResultType& nominator, ResultType& denominator)
- {
-
- nominator = geometry::detail::determinant<ResultType>(dx_b, dy_b, wx, wy);
- denominator = geometry::detail::determinant<ResultType>(dx_a, dy_a, dx_b, dy_b);
-
-
-
- }
-
- template
- <
- typename UniqueSubRange1,
- typename UniqueSubRange2,
- typename Policy
- >
- static inline typename Policy::return_type
- apply(UniqueSubRange1 const& range_p,
- UniqueSubRange2 const& range_q,
- Policy const& policy)
- {
-
- return apply(range_p, range_q, policy, range_p, range_q);
- }
-
-
- template
- <
- typename UniqueSubRange1,
- typename UniqueSubRange2,
- typename Policy,
- typename ModelledUniqueSubRange1,
- typename ModelledUniqueSubRange2
- >
- static inline typename Policy::return_type
- apply(UniqueSubRange1 const& range_p,
- UniqueSubRange2 const& range_q,
- Policy const& policy,
- ModelledUniqueSubRange1 const& modelled_range_p,
- ModelledUniqueSubRange2 const& modelled_range_q)
- {
- typedef typename UniqueSubRange1::point_type point1_type;
- typedef typename UniqueSubRange2::point_type point2_type;
- BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<point1_type>) );
- BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<point2_type>) );
- point1_type const& p1 = range_p.at(0);
- point1_type const& p2 = range_p.at(1);
- point2_type const& q1 = range_q.at(0);
- point2_type const& q2 = range_q.at(1);
-
-
- model::referring_segment<point1_type const> const p(p1, p2);
- model::referring_segment<point2_type const> const q(q1, q2);
- typedef typename select_most_precise
- <
- typename geometry::coordinate_type<typename ModelledUniqueSubRange1::point_type>::type,
- typename geometry::coordinate_type<typename ModelledUniqueSubRange1::point_type>::type
- >::type modelled_coordinate_type;
- typedef segment_ratio<modelled_coordinate_type> ratio_type;
- segment_intersection_info
- <
- typename select_calculation_type<point1_type, point2_type, CalculationType>::type,
- ratio_type
- > sinfo;
- sinfo.dx_a = get<0>(p2) - get<0>(p1);
- sinfo.dx_b = get<0>(q2) - get<0>(q1);
- sinfo.dy_a = get<1>(p2) - get<1>(p1);
- sinfo.dy_b = get<1>(q2) - get<1>(q1);
- return unified<ratio_type>(sinfo, p, q, policy, modelled_range_p, modelled_range_q);
- }
-
-
- template
- <
- std::size_t Dimension,
- typename PointP,
- typename PointQ
- >
- static inline bool disjoint_by_range(PointP const& p1, PointP const& p2,
- PointQ const& q1, PointQ const& q2)
- {
- auto minp = get<Dimension>(p1);
- auto maxp = get<Dimension>(p2);
- auto minq = get<Dimension>(q1);
- auto maxq = get<Dimension>(q2);
- if (minp > maxp)
- {
- std::swap(minp, maxp);
- }
- if (minq > maxq)
- {
- std::swap(minq, maxq);
- }
-
-
-
-
- return math::smaller(maxp, minq) || math::smaller(maxq, minp);
- }
-
- template
- <
- typename RatioType,
- typename SegmentInfo,
- typename Segment1,
- typename Segment2,
- typename Policy,
- typename UniqueSubRange1,
- typename UniqueSubRange2
- >
- static inline typename Policy::return_type
- unified(SegmentInfo& sinfo,
- Segment1 const& p, Segment2 const& q, Policy const&,
- UniqueSubRange1 const& range_p,
- UniqueSubRange2 const& range_q)
- {
- typedef typename UniqueSubRange1::point_type point1_type;
- typedef typename UniqueSubRange2::point_type point2_type;
- typedef typename select_most_precise
- <
- typename geometry::coordinate_type<point1_type>::type,
- typename geometry::coordinate_type<point2_type>::type
- >::type coordinate_type;
- point1_type const& p1 = range_p.at(0);
- point1_type const& p2 = range_p.at(1);
- point2_type const& q1 = range_q.at(0);
- point2_type const& q2 = range_q.at(1);
- bool const p_is_point = equals_point_point(p1, p2);
- bool const q_is_point = equals_point_point(q1, q2);
- if (p_is_point && q_is_point)
- {
- return equals_point_point(p1, q2)
- ? Policy::degenerate(p, true)
- : Policy::disjoint()
- ;
- }
- if (disjoint_by_range<0>(p1, p2, q1, q2)
- || disjoint_by_range<1>(p1, p2, q1, q2))
- {
- return Policy::disjoint();
- }
- using side_strategy_type
- = typename side::services::default_strategy
- <cartesian_tag, CalculationType>::type;
- side_info sides;
- sides.set<0>(side_strategy_type::apply(q1, q2, p1),
- side_strategy_type::apply(q1, q2, p2));
- if (sides.same<0>())
- {
-
- return Policy::disjoint();
- }
- sides.set<1>(side_strategy_type::apply(p1, p2, q1),
- side_strategy_type::apply(p1, p2, q2));
- if (sides.same<1>())
- {
-
- return Policy::disjoint();
- }
- bool collinear = sides.collinear();
-
-
-
- coordinate_type const dx_p = get<0>(p2) - get<0>(p1);
- coordinate_type const dx_q = get<0>(q2) - get<0>(q1);
- coordinate_type const dy_p = get<1>(p2) - get<1>(p1);
- coordinate_type const dy_q = get<1>(q2) - get<1>(q1);
-
-
- if (! collinear)
- {
- coordinate_type denominator_a, nominator_a;
- coordinate_type denominator_b, nominator_b;
- cramers_rule(dx_p, dy_p, dx_q, dy_q,
- get<0>(p1) - get<0>(q1),
- get<1>(p1) - get<1>(q1),
- nominator_a, denominator_a);
- cramers_rule(dx_q, dy_q, dx_p, dy_p,
- get<0>(q1) - get<0>(p1),
- get<1>(q1) - get<1>(p1),
- nominator_b, denominator_b);
- math::detail::equals_factor_policy<coordinate_type>
- policy(dx_p, dy_p, dx_q, dy_q);
- coordinate_type const zero = 0;
- if (math::detail::equals_by_policy(denominator_a, zero, policy)
- || math::detail::equals_by_policy(denominator_b, zero, policy))
- {
-
-
- sides.set<0>(0, 0);
- sides.set<1>(0, 0);
- collinear = true;
- }
- else
- {
- sinfo.robust_ra.assign(nominator_a, denominator_a);
- sinfo.robust_rb.assign(nominator_b, denominator_b);
- }
- }
- if (collinear)
- {
- std::pair<bool, bool> const collinear_use_first
- = is_x_more_significant(geometry::math::abs(dx_p),
- geometry::math::abs(dy_p),
- geometry::math::abs(dx_q),
- geometry::math::abs(dy_q),
- p_is_point, q_is_point);
- if (collinear_use_first.second)
- {
-
-
- if (collinear_use_first.first)
- {
- return relate_collinear<0, Policy, RatioType>(p, q,
- p1, p2, q1, q2,
- p_is_point, q_is_point);
- }
- else
- {
-
- return relate_collinear<1, Policy, RatioType>(p, q,
- p1, p2, q1, q2,
- p_is_point, q_is_point);
- }
- }
- }
- if (equals_point_point(p1, q1) || equals_point_point(p1, q2))
- {
- return Policy::segments_share_common_point(sides, sinfo, p1);
- }
- if (equals_point_point(p2, q1) || equals_point_point(p2, q2))
- {
- return Policy::segments_share_common_point(sides, sinfo, p2);
- }
- return Policy::segments_crosses(sides, sinfo, p, q);
- }
- private:
-
-
- template <typename CoordinateType>
- static inline std::pair<bool, bool>
- is_x_more_significant(CoordinateType const& abs_dx_a,
- CoordinateType const& abs_dy_a,
- CoordinateType const& abs_dx_b,
- CoordinateType const& abs_dy_b,
- bool const a_is_point,
- bool const b_is_point)
- {
-
-
-
- if (a_is_point)
- {
- return std::make_pair(abs_dx_b >= abs_dy_b, true);
- }
- else if (b_is_point)
- {
- return std::make_pair(abs_dx_a >= abs_dy_a, true);
- }
- else
- {
- CoordinateType const min_dx = (std::min)(abs_dx_a, abs_dx_b);
- CoordinateType const min_dy = (std::min)(abs_dy_a, abs_dy_b);
- return min_dx == min_dy ?
- std::make_pair(true, min_dx > CoordinateType(0)) :
- std::make_pair(min_dx > min_dy, true);
- }
- }
- template
- <
- std::size_t Dimension,
- typename Policy,
- typename RatioType,
- typename Segment1,
- typename Segment2,
- typename RobustPoint1,
- typename RobustPoint2
- >
- static inline typename Policy::return_type
- relate_collinear(Segment1 const& a,
- Segment2 const& b,
- RobustPoint1 const& robust_a1, RobustPoint1 const& robust_a2,
- RobustPoint2 const& robust_b1, RobustPoint2 const& robust_b2,
- bool a_is_point, bool b_is_point)
- {
- if (a_is_point)
- {
- return relate_one_degenerate<Policy, RatioType>(a,
- get<Dimension>(robust_a1),
- get<Dimension>(robust_b1), get<Dimension>(robust_b2),
- true);
- }
- if (b_is_point)
- {
- return relate_one_degenerate<Policy, RatioType>(b,
- get<Dimension>(robust_b1),
- get<Dimension>(robust_a1), get<Dimension>(robust_a2),
- false);
- }
- return relate_collinear<Policy, RatioType>(a, b,
- get<Dimension>(robust_a1),
- get<Dimension>(robust_a2),
- get<Dimension>(robust_b1),
- get<Dimension>(robust_b2));
- }
-
- template
- <
- typename Policy,
- typename RatioType,
- typename Segment1,
- typename Segment2,
- typename Type1,
- typename Type2
- >
- static inline typename Policy::return_type
- relate_collinear(Segment1 const& a, Segment2 const& b,
- Type1 oa_1, Type1 oa_2,
- Type2 ob_1, Type2 ob_2)
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Type1 const length_a = oa_2 - oa_1;
- Type2 const length_b = ob_2 - ob_1;
- RatioType ra_from(oa_1 - ob_1, length_b);
- RatioType ra_to(oa_2 - ob_1, length_b);
- RatioType rb_from(ob_1 - oa_1, length_a);
- RatioType rb_to(ob_2 - oa_1, length_a);
-
-
- int const a1_wrt_b = position_value(oa_1, ob_1, ob_2);
- int const a2_wrt_b = position_value(oa_2, ob_1, ob_2);
- int const b1_wrt_a = position_value(ob_1, oa_1, oa_2);
- int const b2_wrt_a = position_value(ob_2, oa_1, oa_2);
-
-
-
-
-
-
-
- if (a1_wrt_b == 1)
- {
- ra_from.assign(0, 1);
- rb_from.assign(0, 1);
- }
- else if (a1_wrt_b == 3)
- {
- ra_from.assign(1, 1);
- rb_to.assign(0, 1);
- }
- if (a2_wrt_b == 1)
- {
- ra_to.assign(0, 1);
- rb_from.assign(1, 1);
- }
- else if (a2_wrt_b == 3)
- {
- ra_to.assign(1, 1);
- rb_to.assign(1, 1);
- }
- if ((a1_wrt_b < 1 && a2_wrt_b < 1) || (a1_wrt_b > 3 && a2_wrt_b > 3))
-
- {
- return Policy::disjoint();
- }
- bool const opposite = math::sign(length_a) != math::sign(length_b);
- return Policy::segments_collinear(a, b, opposite,
- a1_wrt_b, a2_wrt_b, b1_wrt_a, b2_wrt_a,
- ra_from, ra_to, rb_from, rb_to);
- }
-
- template
- <
- typename Policy,
- typename RatioType,
- typename DegenerateSegment,
- typename Type1,
- typename Type2
- >
- static inline typename Policy::return_type
- relate_one_degenerate(DegenerateSegment const& degenerate_segment,
- Type1 d, Type2 s1, Type2 s2,
- bool a_degenerate)
- {
-
-
-
-
- RatioType const ratio(d - s1, s2 - s1);
- if (!ratio.on_segment())
- {
- return Policy::disjoint();
- }
- return Policy::one_degenerate(degenerate_segment, ratio, a_degenerate);
- }
- template <typename ProjCoord1, typename ProjCoord2>
- static inline int position_value(ProjCoord1 const& ca1,
- ProjCoord2 const& cb1,
- ProjCoord2 const& cb2)
- {
-
-
- return math::equals(ca1, cb1) ? 1
- : math::equals(ca1, cb2) ? 3
- : cb1 < cb2 ?
- ( ca1 < cb1 ? 0
- : ca1 > cb2 ? 4
- : 2 )
- : ( ca1 > cb1 ? 0
- : ca1 < cb2 ? 4
- : 2 );
- }
- template <typename Point1, typename Point2>
- static inline bool equals_point_point(Point1 const& point1, Point2 const& point2)
- {
- return strategy::within::cartesian_point_point::apply(point1, point2);
- }
- };
- #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
- namespace services
- {
- template <typename CalculationType>
- struct default_strategy<cartesian_tag, CalculationType>
- {
- typedef cartesian_segments<CalculationType> type;
- };
- }
- #endif
- }}
- namespace strategy
- {
- namespace within { namespace services
- {
- template <typename Geometry1, typename Geometry2, typename AnyTag1, typename AnyTag2>
- struct default_strategy<Geometry1, Geometry2, AnyTag1, AnyTag2, linear_tag, linear_tag, cartesian_tag, cartesian_tag>
- {
- typedef strategy::intersection::cartesian_segments<> type;
- };
- template <typename Geometry1, typename Geometry2, typename AnyTag1, typename AnyTag2>
- struct default_strategy<Geometry1, Geometry2, AnyTag1, AnyTag2, linear_tag, polygonal_tag, cartesian_tag, cartesian_tag>
- {
- typedef strategy::intersection::cartesian_segments<> type;
- };
- template <typename Geometry1, typename Geometry2, typename AnyTag1, typename AnyTag2>
- struct default_strategy<Geometry1, Geometry2, AnyTag1, AnyTag2, polygonal_tag, linear_tag, cartesian_tag, cartesian_tag>
- {
- typedef strategy::intersection::cartesian_segments<> type;
- };
- template <typename Geometry1, typename Geometry2, typename AnyTag1, typename AnyTag2>
- struct default_strategy<Geometry1, Geometry2, AnyTag1, AnyTag2, polygonal_tag, polygonal_tag, cartesian_tag, cartesian_tag>
- {
- typedef strategy::intersection::cartesian_segments<> type;
- };
- }}
- namespace covered_by { namespace services
- {
- template <typename Geometry1, typename Geometry2, typename AnyTag1, typename AnyTag2>
- struct default_strategy<Geometry1, Geometry2, AnyTag1, AnyTag2, linear_tag, linear_tag, cartesian_tag, cartesian_tag>
- {
- typedef strategy::intersection::cartesian_segments<> type;
- };
- template <typename Geometry1, typename Geometry2, typename AnyTag1, typename AnyTag2>
- struct default_strategy<Geometry1, Geometry2, AnyTag1, AnyTag2, linear_tag, polygonal_tag, cartesian_tag, cartesian_tag>
- {
- typedef strategy::intersection::cartesian_segments<> type;
- };
- template <typename Geometry1, typename Geometry2, typename AnyTag1, typename AnyTag2>
- struct default_strategy<Geometry1, Geometry2, AnyTag1, AnyTag2, polygonal_tag, linear_tag, cartesian_tag, cartesian_tag>
- {
- typedef strategy::intersection::cartesian_segments<> type;
- };
- template <typename Geometry1, typename Geometry2, typename AnyTag1, typename AnyTag2>
- struct default_strategy<Geometry1, Geometry2, AnyTag1, AnyTag2, polygonal_tag, polygonal_tag, cartesian_tag, cartesian_tag>
- {
- typedef strategy::intersection::cartesian_segments<> type;
- };
- }}
- }
- }}
- #endif
|