I have a list of sublist which contains the LineString from Shapely such as following:
My_list = [
[(0, 0), (1, 1), (1,2), (2,2)],
[(0, 0), (1, 1), (2,1), (2,2)],
[(-1, 0), (1, -1), (-2,1), (2,0)]
]
In my list, I have three (in this example they are three, in my case they are thousands) sets which are defined as LineString in Shapely.
Now I like to iteratively find the intersection between each sublist, for example as I said, here I have three LineStrings. Lets call them a1
, a2
, a3
.
a1 = [(0, 0), (1, 1), (1,2), (2,2)]
a2 = [(0, 0), (1, 1), (2,1), (2,2)]
a3 = [(-1, 0), (1, -1), (-2,1), (2,0)]
I want to find the intersection check (and find the intersection as well) between each pair: (a1,a2), (a1,a3), (a2,a1), (a2,a3), (a3,a1), (a3,a2).