Skip to content

Commit 487f5d3

Browse files
committed
fix: remove obsolete call for dissolve
1 parent 98bfbb9 commit 487f5d3

File tree

1 file changed

+0
-69
lines changed

1 file changed

+0
-69
lines changed

include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -202,70 +202,6 @@ inline void enrich_assign(Operations& operations, Turns& turns)
202202
#endif
203203
}
204204

205-
template <typename Operations, typename Turns>
206-
inline void enrich_adapt(Operations& operations, Turns& turns)
207-
{
208-
// Operations is a vector of indexed_turn_operation<>
209-
// If it is empty, or contains one or two items, it makes no sense
210-
if (operations.size() < 3)
211-
{
212-
return;
213-
}
214-
215-
bool next_phase = false;
216-
std::size_t previous_index = operations.size() - 1;
217-
218-
for (auto const& item : util::enumerate(operations))
219-
{
220-
auto const& index = item.index;
221-
auto const& indexed = item.value;
222-
auto& turn = turns[indexed.turn_index];
223-
auto& op = turn.operations[indexed.operation_index];
224-
225-
std::size_t const next_index = (index + 1) % operations.size();
226-
auto const& next_turn = turns[operations[next_index].turn_index];
227-
auto const& next_op = next_turn.operations[operations[next_index].operation_index];
228-
229-
if (op.seg_id.segment_index == next_op.seg_id.segment_index)
230-
{
231-
auto const& prev_turn = turns[operations[previous_index].turn_index];
232-
auto const& prev_op = prev_turn.operations[operations[previous_index].operation_index];
233-
if (op.seg_id.segment_index == prev_op.seg_id.segment_index)
234-
{
235-
op.enriched.startable = false;
236-
next_phase = true;
237-
}
238-
}
239-
previous_index = index;
240-
}
241-
242-
if (! next_phase)
243-
{
244-
return;
245-
}
246-
247-
// Discard turns which are both non-startable
248-
next_phase = false;
249-
for (auto& turn : turns)
250-
{
251-
if (! turn.operations[0].enriched.startable
252-
&& ! turn.operations[1].enriched.startable)
253-
{
254-
turn.discarded = true;
255-
next_phase = true;
256-
}
257-
}
258-
259-
if (! next_phase)
260-
{
261-
return;
262-
}
263-
264-
// Remove discarded turns from operations to avoid having them as next turn
265-
discarded_indexed_turn<Turns> const predicate(turns);
266-
operations.erase(std::remove_if(std::begin(operations),
267-
std::end(operations), predicate), std::end(operations));
268-
}
269205

270206
struct enriched_map_default_include_policy
271207
{
@@ -420,11 +356,6 @@ inline void enrich_turns(Turns& turns,
420356
#ifdef BOOST_GEOMETRY_DEBUG_ENRICH
421357
std::cout << "ENRICH-assign Ring " << pair.first << std::endl;
422358
#endif
423-
if BOOST_GEOMETRY_CONSTEXPR (OverlayType == overlay_dissolve)
424-
{
425-
enrich_adapt(pair.second, turns);
426-
}
427-
428359
enrich_assign(pair.second, turns);
429360
}
430361

0 commit comments

Comments
 (0)