(poly, points)
| 37 | verify_valid_polygon(poly, points) |
| 38 | |
| 39 | def verify_valid_polygon(poly, points): |
| 40 | shell_coords = get_poly_coords(poly.shell, points) |
| 41 | hole_coords = [get_poly_coords(hole, points) for hole in poly.holes] |
| 42 | # Verify polygon outer shell |
| 43 | shapelyPoly = Polygon(shell=shell_coords) |
| 44 | assert shapelyPoly.is_valid |
| 45 | # Verify polygon outer shell and holes |
| 46 | shapelyPoly = Polygon(shell=shell_coords, holes=hole_coords) |
| 47 | # if not shapelyPoly.is_valid: |
| 48 | # np.save("scratch/error_{}.npy".format(points.shape[0]), points) |
| 49 | assert shapelyPoly.is_valid |
| 50 | |
| 51 | def verify_all(points, polylidar_kwargs): |
| 52 | pl = Polylidar3D(**polylidar_kwargs) |
no test coverage detected