def test_point_in_poly(): pointX = 46.27007 pointY = 5.188 fence = [ (46.270088180220725, 5.184173583984375), (46.322274857040256, 5.33111572265625), (46.323223245368716, 5.42449951171875), (46.283376780187226, 5.447845458984375), (46.249199583637726, 5.384674072265625), ] assert Polygonal.point_in_poly(pointX, pointY, fence) == True
def test_from_flight1(): lat = 50.863831 lon = 4.6788333 assert Polygonal.point_in_poly(lat, lon, fence) == True
def test_point_outside(): pointX = 50.863777 pointY = 4.679216 assert Polygonal.point_in_poly(pointX, pointY, fence) == False