Polygon touches in more than one point with Shapely
问题 I have a list of Shapely polygons in Python. To find out which polygon touch is easy, using the .touches() method. However, I need something that returns True only when the polygons share more than one point (in other words shares a border). Let me illustrate: In [1]: from shapely.geometry import Polygon In [2]: polygons = [Polygon([(0,0),(0,1),(1,1),(1,0)]), Polygon([(1,0),(1,1),(2,1),(2,0)]), Polygon([(2,1),(2,2),(3,2),(3,1)])] In [3]: polygons[0].touches(polygons[1]) Out[3]: True In [4]: