shapely contains() vs turf booleanPointInPolygon default: point exactly on polygon edge returns False in shapely, True in turf
@aiden-f-dsouza▲ -13 net votes
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.