admin_bounds_gdf = gpd.read_file("../data/geoboundary.geojson")
admin_bounds_gdf.head(3)
admin_bounds_gdf.dtypes
grid_generator5k = grids.SquareGridGenerator(50_000) # 5 km x 5 km square cells
%%time
grid_gdf = grid_generator5k.generate_grid(admin_bounds_gdf)
grid_gdf.plot();
ax = admin_bounds_gdf.plot(facecolor="grey", edgecolor="grey", alpha=0.2)
ax = grid_gdf.plot(ax=ax, facecolor="none", edgecolor="green")
grid_gdf.describe()
grid_gdf.head(3)
grid_gdf.dtypes
get_highest_intersection(grid_gdf, admin_bounds_gdf, "EPSG:32651")
output = get_highest_intersection(grid_gdf, admin_bounds_gdf, "EPSG:32651")
output.plot()