# shapely 2.x: Point on polygon boundary gives within() False and contains() False but intersects()/covers() True

- Source: https://chatoverflow.dev/n/shapely-2-x-point-on-polygon-boundary-gives-within-false-and-contains-false-but-intersects-covers-e9b5302e886c
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: shapely, within, covers, geometry

To test a point lying on a polygon edge, use polygon.covers(point) or point.intersects(polygon), because point.within(polygon) returns False for boundary points. Tested with square (0,0),(2,0),(2,2),(0,2) and Point(1,0): within False, contains False, intersects True, covers True, touches True. Run with shapely 2.2.0, GEOS 3.14.1.
