updated boost on windows
This commit is contained in:
@@ -217,14 +217,15 @@ inline bool has_self_intersections(Linear const& linear, Strategy const& strateg
|
||||
is_acceptable_turn<Linear>
|
||||
> interrupt_policy(predicate);
|
||||
|
||||
// TODO: skip_adjacent should be set to false
|
||||
detail::self_get_turn_points::get_turns
|
||||
<
|
||||
turn_policy
|
||||
false, turn_policy
|
||||
>::apply(linear,
|
||||
strategy,
|
||||
detail::no_rescale_policy(),
|
||||
turns,
|
||||
interrupt_policy);
|
||||
interrupt_policy, 0, true);
|
||||
|
||||
detail::is_valid::debug_print_turns(turns.begin(), turns.end());
|
||||
debug_print_boundary_points(linear);
|
||||
@@ -236,7 +237,9 @@ inline bool has_self_intersections(Linear const& linear, Strategy const& strateg
|
||||
template <typename Linestring, bool CheckSelfIntersections = true>
|
||||
struct is_simple_linestring
|
||||
{
|
||||
static inline bool apply(Linestring const& linestring)
|
||||
template <typename Strategy>
|
||||
static inline bool apply(Linestring const& linestring,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
simplicity_failure_policy policy;
|
||||
return ! boost::empty(linestring)
|
||||
@@ -247,7 +250,7 @@ struct is_simple_linestring
|
||||
&& ! detail::is_valid::has_spikes
|
||||
<
|
||||
Linestring, closed
|
||||
>::apply(linestring, policy);
|
||||
>::apply(linestring, policy, strategy.get_side_strategy());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -258,7 +261,10 @@ struct is_simple_linestring<Linestring, true>
|
||||
static inline bool apply(Linestring const& linestring,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
return is_simple_linestring<Linestring, false>::apply(linestring)
|
||||
return is_simple_linestring
|
||||
<
|
||||
Linestring, false
|
||||
>::apply(linestring, strategy)
|
||||
&& ! has_self_intersections(linestring, strategy);
|
||||
}
|
||||
};
|
||||
@@ -267,23 +273,44 @@ struct is_simple_linestring<Linestring, true>
|
||||
template <typename MultiLinestring>
|
||||
struct is_simple_multilinestring
|
||||
{
|
||||
private:
|
||||
template <typename Strategy>
|
||||
struct per_linestring
|
||||
{
|
||||
per_linestring(Strategy const& strategy)
|
||||
: m_strategy(strategy)
|
||||
{}
|
||||
|
||||
template <typename Linestring>
|
||||
inline bool apply(Linestring const& linestring) const
|
||||
{
|
||||
return detail::is_simple::is_simple_linestring
|
||||
<
|
||||
Linestring,
|
||||
false // do not compute self-intersections
|
||||
>::apply(linestring, m_strategy);
|
||||
}
|
||||
|
||||
Strategy const& m_strategy;
|
||||
};
|
||||
|
||||
public:
|
||||
template <typename Strategy>
|
||||
static inline bool apply(MultiLinestring const& multilinestring,
|
||||
Strategy const& strategy)
|
||||
{
|
||||
typedef per_linestring<Strategy> per_ls;
|
||||
|
||||
// check each of the linestrings for simplicity
|
||||
// but do not compute self-intersections yet; these will be
|
||||
// computed for the entire multilinestring
|
||||
if ( ! detail::check_iterator_range
|
||||
<
|
||||
is_simple_linestring
|
||||
<
|
||||
typename boost::range_value<MultiLinestring>::type,
|
||||
false // do not compute self-intersections
|
||||
>,
|
||||
per_ls, // do not compute self-intersections
|
||||
true // allow empty multilinestring
|
||||
>::apply(boost::begin(multilinestring),
|
||||
boost::end(multilinestring))
|
||||
boost::end(multilinestring),
|
||||
per_ls(strategy))
|
||||
)
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user