I have a question
I used two different library
import matplotlib.path as mplPath
point = (0.3, 0.2)
poly = [(0, 0), (0, 1), (1, 0), (1,1)]
polygon = mplPath.Path( np.array(poly) )
print(polygon.contains_point(point))
return: False
from shapely.geometry import Point, Polygon
point = Point(0.3, 0.2)
polygon = Polygon([(0, 0), (0, 1), (1, 0), (1,1)])
print(polygon.contains(point))
print( point.within(polygon) )
return: False False
However, two library all failed to detect (0.3, 0.2) is within the given polygon...
Why..? And, How do I can check weather a point is within more complicate polygon ?
Thank you !