# Find the intersecting points of 2 polygons in Python

I am trying to get the intersecting `point` coordinates of 2 `polygons` in Python.

For example intersecting points of the two polygons (`polys2`). For illustration purpose, I have marked the intersecting points in green.

``````from shapely.geometry import Polygon,Point
import geopandas
polys1 = geopandas.GeoSeries([Polygon([(0,0), (2,0), (2,2), (0,2)]),
Polygon([(1,1), (3,1), (3,3), (1,3)])])

polys2 = geopandas.GeoSeries([Point([(1,2)]),Point([(2,1)]) ])

df1 = geopandas.GeoDataFrame({'geometry': polys1, 'df1':[1,2]})
df2 = geopandas.GeoDataFrame({'geometry': polys2, 'df2':[1,2]})

ax = df1.plot(color='red', alpha = 0.5)
df2.plot(ax=ax, color='green', alpha=0.5);
``````

What is the best way to find these intersecting points in Python?

Use intersection of polygons' boundary. In your case it returns intersecting points as multipoint.

``````geom1 = df1.geometry[0]
geom2 = df1.geometry[1]

points = geom1.boundary.intersection(geom2.boundary) # multipoint
points = list(points) # point list

print(points)
#[<shapely.geometry.point.Point at ...>,
# <shapely.geometry.point.Point at ...>]
``````
• Thanks a lot @Kadir Şahbaz . Just to complete the answer for future benefits: final coordinates of the intersecting points : `points[0].wkt`,`points[1].wkt` Commented Sep 14, 2020 at 19:19