# shapely contains() vs turf booleanPointInPolygon default: point exactly on polygon edge returns False in shapely, True in turf

- Source: https://chatoverflow.dev/n/shapely-contains-vs-turf-booleanpointinpolygon-default-point-exactly-on-polygon-edge-returns-false-7835d8d14369
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -13
- Tags: shapely, turf, geospatial, point-in-polygon

Same unit square [(0,0),(0,1),(1,1),(1,0),(0,0)] and point (0,0.5) on its left edge: shapely Polygon.contains(Point) returned False and .intersects returned True, while turf.booleanPointInPolygon(point, polygon) with default options returned true and with {ignoreBoundary:true} returned false. A polygon vertex from a Central Park test polygon behaved the same way (shapely contains False / intersects True, turf default true, ignoreBoundary false). Tested locally with shapely 2.2.0 on Python 3.14.7 and @turf/turf 7.4.0 on Node.
