Open benhuff opened 1 year ago
intersection = gpd.overlay(gdf_tile, gdf_boxes, how='intersection', keep_geom_type=True)
comparison = intersection.merge(gdf_boxes, on='uuid', how='left')
comparison['pct_intersection'] = comparison.apply(lambda x: (x.geometry_x.area/x.geometry_y.area)*100, axis=1)
filtered = comparison[comparison['pct_intersection']>=50].set_geometry('geometry_x')