Skip to content

Commit f33dc4b

Browse files
committed
fix: dissolve compilation
1 parent 787c1af commit f33dc4b

File tree

4 files changed

+59
-247
lines changed

4 files changed

+59
-247
lines changed

include/boost/geometry/extensions/algorithms/detail/overlay/dissolve_traverse.hpp

Lines changed: 0 additions & 82 deletions
This file was deleted.

include/boost/geometry/extensions/algorithms/detail/overlay/dissolver.hpp

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <boost/geometry/algorithms/union.hpp>
3737
#include <boost/geometry/algorithms/reverse.hpp>
3838

39-
#include <boost/geometry/policies/robustness/segment_ratio_type.hpp>
39+
#include <boost/geometry/policies/robustness/segment_ratio.hpp>
4040

4141
#include <boost/geometry/geometries/concepts/check.hpp>
4242

@@ -105,12 +105,10 @@ class plusmin_policy
105105
<
106106
typename Geometry1,
107107
typename Geometry2,
108-
typename RescalePolicy,
109108
typename OutputCollection,
110109
typename Strategy
111110
>
112111
static inline bool check_negative(Geometry1 a, Geometry2 b, // pass-by-value
113-
RescalePolicy const& rescale_policy,
114112
OutputCollection& output_collection,
115113
Strategy const& strategy)
116114
{
@@ -134,11 +132,7 @@ class plusmin_policy
134132

135133
typedef typename geometry::point_type<Geometry2>::type point_type;
136134

137-
typedef overlay::turn_info
138-
<
139-
point_type,
140-
typename segment_ratio_type<point_type, RescalePolicy>::type
141-
> turn_info;
135+
using turn_info = overlay::turn_info<point_type>;
142136
std::deque<turn_info> turns;
143137

144138
// Get (and stop on) any intersection
@@ -147,7 +141,7 @@ class plusmin_policy
147141
<
148142
false, false,
149143
overlay::assign_null_policy
150-
>(a, b, strategy, rescale_policy, turns, policy);
144+
>(a, b, strategy, turns, policy);
151145

152146
if (! policy.has_intersections)
153147
{
@@ -187,13 +181,11 @@ class plusmin_policy
187181
typename Geometry1,
188182
typename Geometry2,
189183
typename AreaType,
190-
typename RescalePolicy,
191184
typename OutputCollection,
192185
typename Strategy
193186
>
194187
static inline bool check(Geometry1 const& a, Geometry2 const& b,
195188
AreaType const& area_a, AreaType const& area_b,
196-
RescalePolicy const& rescale_policy,
197189
OutputCollection& output_collection,
198190
Strategy const& strategy)
199191
{
@@ -205,11 +197,11 @@ class plusmin_policy
205197
}
206198
else if (area_a > zero && area_b < zero)
207199
{
208-
return check_negative(a, b, rescale_policy, output_collection, strategy);
200+
return check_negative(a, b, output_collection, strategy);
209201
}
210202
else if (area_a < zero && area_b > zero)
211203
{
212-
return check_negative(b, a, rescale_policy, output_collection, strategy);
204+
return check_negative(b, a, output_collection, strategy);
213205
}
214206
return false;
215207
}
@@ -222,12 +214,10 @@ public :
222214
<
223215
typename Geometry1,
224216
typename Geometry2,
225-
typename RescalePolicy,
226217
typename OutputCollection,
227218
typename Strategy
228219
>
229220
static inline bool apply(Geometry1 const& a, Geometry2 const& b,
230-
RescalePolicy const& rescale_policy,
231221
OutputCollection& output_collection,
232222
Strategy const& strategy)
233223
{
@@ -254,7 +244,7 @@ public :
254244
// END DEBUG
255245

256246
return check(a, b, geometry::area(a), geometry::area(b),
257-
rescale_policy, output_collection, strategy);
247+
output_collection, strategy);
258248
}
259249

260250
};
@@ -326,7 +316,6 @@ struct dissolver_generic
326316
<
327317
typename Element,
328318
typename Geometry1, typename Geometry2,
329-
typename RescalePolicy,
330319
typename OutputCollection,
331320
typename Strategy
332321
>
@@ -337,7 +326,6 @@ struct dissolver_generic
337326
// which might change the collection itself and the address/contents of geometry1/geometry2
338327
Geometry1 geometry1,
339328
Geometry2 geometry2,
340-
RescalePolicy const& rescale_policy,
341329
OutputCollection& output_collection,
342330
Strategy const& strategy)
343331
{
@@ -348,8 +336,7 @@ struct dissolver_generic
348336
<< " (" << element2.dissolved << "," << element2.dissolved << ")"
349337
<< std::endl;
350338
*/
351-
return CombinePolicy::apply(geometry1, geometry2,
352-
rescale_policy, output_collection, strategy);
339+
return CombinePolicy::apply(geometry1, geometry2, output_collection, strategy);
353340
}
354341
return false;
355342
}
@@ -361,15 +348,13 @@ struct dissolver_generic
361348
typename HelperVector,
362349
typename IndexVector,
363350
typename InputRange,
364-
typename RescalePolicy,
365351
typename OutputCollection,
366352
typename Strategy,
367353
typename Box
368354
>
369355
static inline bool divide_and_conquer(HelperVector& helper_vector
370356
, IndexVector& index_vector
371357
, InputRange const& input_range
372-
, RescalePolicy const& rescale_policy
373358
, OutputCollection& output_collection
374359
, Strategy const& strategy
375360
, Box const& total_box
@@ -417,9 +402,9 @@ struct dissolver_generic
417402

418403
// 3: recursively call function (possibly divide in other dimension)
419404
divide_and_conquer<1 - Dimension>(helper_vector,
420-
lower_list, input_range, rescale_policy, output_collection, strategy, lower_box, changed, iteration + 1);
405+
lower_list, input_range, output_collection, strategy, lower_box, changed, iteration + 1);
421406
divide_and_conquer<1 - Dimension>(helper_vector,
422-
upper_list, input_range, rescale_policy, output_collection, strategy, upper_box, changed, iteration + 1);
407+
upper_list, input_range, output_collection, strategy, upper_box, changed, iteration + 1);
423408
return changed;
424409
}
425410

@@ -452,7 +437,6 @@ struct dissolver_generic
452437
element1, element2,
453438
get_geometry::apply(input_range, element1.index),
454439
get_geometry::apply(input_range, element2.index),
455-
rescale_policy,
456440
output_collection,
457441
strategy
458442
)
@@ -463,7 +447,6 @@ struct dissolver_generic
463447
element1, element2,
464448
get_geometry::apply(input_range, element1.index),
465449
get_geometry::apply(output_collection, element2.index),
466-
rescale_policy,
467450
output_collection,
468451
strategy
469452
)
@@ -474,7 +457,6 @@ struct dissolver_generic
474457
element1, element2,
475458
get_geometry::apply(output_collection, element1.index),
476459
get_geometry::apply(input_range, element2.index),
477-
rescale_policy,
478460
output_collection,
479461
strategy
480462
)
@@ -485,7 +467,6 @@ struct dissolver_generic
485467
element1, element2,
486468
get_geometry::apply(output_collection, element1.index),
487469
get_geometry::apply(output_collection, element2.index),
488-
rescale_policy,
489470
output_collection,
490471
strategy
491472
)
@@ -528,12 +509,10 @@ struct dissolver_generic
528509
template
529510
<
530511
typename InputRange,
531-
typename RescalePolicy,
532512
typename OutputCollection,
533513
typename Strategy
534514
>
535515
static inline void apply(InputRange const& input_range
536-
, RescalePolicy const& rescale_policy
537516
, OutputCollection& output_collection
538517
, Strategy const& strategy
539518
)
@@ -574,7 +553,7 @@ struct dissolver_generic
574553

575554
bool changed = false;
576555
while(divide_and_conquer<1>
577-
(helper_vector, index_vector, input_range, rescale_policy, unioned_collection, strategy, total_box, changed) && n < 5)
556+
(helper_vector, index_vector, input_range, unioned_collection, strategy, total_box, changed) && n < 5)
578557
{
579558
// Remove everything which is already dissolved.
580559
helper_vector.erase
@@ -689,8 +668,7 @@ inline void dissolver(InputRange const& input_range,
689668
typename tag<geometry_in>::type,
690669
typename tag<geometry_out>::type,
691670
detail::dissolver::plusmin_policy
692-
>::apply(input_range, detail::no_rescale_policy(),
693-
output_collection, strategy);
671+
>::apply(input_range, output_collection, strategy);
694672
}
695673

696674
template

0 commit comments

Comments
 (0)