@@ -29,6 +29,14 @@ struct DoubleSTRtree <: IntersectionAccelerator end
29
29
struct SingleNaturalTree <: IntersectionAccelerator end
30
30
struct DoubleNaturalTree <: IntersectionAccelerator end
31
31
struct ThinnedDoubleNaturalTree <: IntersectionAccelerator end
32
+
33
+ """
34
+ AutoAccelerator()
35
+
36
+ Let the algorithm choose the best accelerator based on the size of the input polygons.
37
+
38
+ Once we have prepared geometry, this will also consider the existing preparations on the geoms.
39
+ """
32
40
struct AutoAccelerator <: IntersectionAccelerator end
33
41
34
42
"""
@@ -279,8 +287,8 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
279
287
# as the nested loop above, and iterating through poly_b in order.
280
288
if Extents. intersects (ext_l, ext_b)
281
289
empty! (query_result)
282
- SortTileRecursiveTree. query! (query_result, tree_b. rootnode, ext_l) # this is already sorted and uniqueified in STRtree.'
283
- sort! (query_result)
290
+ SortTileRecursiveTree. query! (query_result, tree_b. rootnode, ext_l)
291
+ sort! (query_result) # STRTree.jl's query! does not sort!, even though query does...
284
292
# Loop over the edges in b that might intersect the edges in a
285
293
for j in query_result
286
294
b1t, b2t = edges_b[j]. geom
@@ -326,7 +334,7 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
326
334
tree_a = NaturalIndexing. NaturalIndex (edges_a)
327
335
tree_b = NaturalIndexing. NaturalIndex (edges_b)
328
336
329
- last_a_idx = 0
337
+ last_a_idx:: Int = 0
330
338
331
339
SpatialTreeInterface. dual_depth_first_search (Extents. intersects, tree_a, tree_b) do a_edge_idx, b_edge_idx
332
340
a1t, a2t = edges_a[a_edge_idx]. geom
@@ -382,7 +390,7 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
382
390
tree_a = NaturalIndexing. NaturalIndex (edges_a)
383
391
tree_b = NaturalIndexing. NaturalIndex (edges_b)
384
392
385
- last_a_idx = 1
393
+ last_a_idx:: Int = 1
386
394
387
395
SpatialTreeInterface. dual_depth_first_search (Extents. intersects, tree_a, tree_b) do a_thinned_idx, b_thinned_idx
388
396
a_edge_idx = indices_a[a_thinned_idx]
0 commit comments