Faster way of polygon intersection with shapely
Consider using Rtree to help identify which grid cells that a polygon may intersect. This way, you can remove the for loop used with the array of lat/lons, which is probably the slow part. Structure your code something like this: from shapely.ops import cascaded_union from rtree import index idx = index.Index() # Populate R-tree index … Read more