@@ -29,6 +29,14 @@ struct DoubleSTRtree <: IntersectionAccelerator end
2929struct SingleNaturalTree <: IntersectionAccelerator end
3030struct DoubleNaturalTree <: IntersectionAccelerator end
3131struct 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+ """
3240struct AutoAccelerator <: IntersectionAccelerator end
3341
3442"""
@@ -282,8 +290,8 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
282290 # as the nested loop above, and iterating through poly_b in order.
283291 if Extents. intersects (ext_l, ext_b)
284292 empty! (query_result)
285- SortTileRecursiveTree. query! (query_result, tree_b. rootnode, ext_l) # this is already sorted and uniqueified in STRtree.'
286- sort! (query_result)
293+ SortTileRecursiveTree. query! (query_result, tree_b. rootnode, ext_l)
294+ sort! (query_result) # STRTree.jl's query! does not sort!, even though query does...
287295 # Loop over the edges in b that might intersect the edges in a
288296 for j in query_result
289297 b1t, b2t = edges_b[j]. geom
@@ -329,7 +337,7 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
329337 tree_a = NaturalIndexing. NaturalIndex (edges_a)
330338 tree_b = NaturalIndexing. NaturalIndex (edges_b)
331339
332- last_a_idx = 0
340+ last_a_idx:: Int = 0
333341
334342 SpatialTreeInterface. dual_depth_first_search (Extents. intersects, tree_a, tree_b) do a_edge_idx, b_edge_idx
335343 a1t, a2t = edges_a[a_edge_idx]. geom
0 commit comments