libpysal.cg.
point_touches_rectangle
(point, rect)[source]¶Returns True if the point is in the rectangle or touches it’s boundary.
point_touches_rectangle(point, rect) -> bool
Examples
>>> rect = Rectangle(0,0,10,10)
>>> a = Point((5,5))
>>> b = Point((10,5))
>>> c = Point((11,11))
>>> point_touches_rectangle(a,rect)
1
>>> point_touches_rectangle(b,rect)
1
>>> point_touches_rectangle(c,rect)
0