0

In Shapely's tutorial there is a nice example (illustrated bellow) on how to find the intersection between exactly two points:

a = Point(1, 1).buffer(1.5)
b = Point(2, 1).buffer(1.5)
a.intersection(b)
a.union(b)

What it doesn't say though is how to find the intersection between more than three points at the same time. Any ideas?

user706838
  • 5,132
  • 14
  • 54
  • 78

1 Answers1

1

Sure it does, see shapely.ops.cascaded_union. There is no equivalent for intersection, but you just need to accumulate a result:

result = a.intersection(b)
result = result.intersection(c)

More tricks here.

Community
  • 1
  • 1
Mike T
  • 41,085
  • 18
  • 152
  • 203