I have N polygons (X) and 1 polygon (Y).
I want to find all polygons from X which intersects with Y as fast as possible.
Of course I can just make a for loop X and intersect each polygon with Y.
But it's not effective :( A lot of allocation and other work.
I know I can create single S2ShapeIndex from X.
And then intersect it with Y.
I thought maybe it will be faster if exist way to get initial shapes from intersection result?
I have N polygons (X) and 1 polygon (Y). I want to find all polygons from X which intersects with Y as fast as possible. Of course I can just make a for loop X and intersect each polygon with Y. But it's not effective :( A lot of allocation and other work.
I know I can create single S2ShapeIndex from X. And then intersect it with Y. I thought maybe it will be faster if exist way to get initial shapes from intersection result?