stilt.Mesh.to_grid#
- Mesh.to_grid(*, cells_per_target=4.0, crs=None, max_cells=50000000)[source]#
Return a footprint grid fine enough to resolve the cells.
The bounds are the mesh’s extent, rounded outward to whole cells. The cell size is the smallest cell width divided by
cells_per_target, rounded down to one significant figure.- Parameters:
- Returns:
The grid, with longitude/latitude bounds.
- Return type:
Grid
Examples
>>> hexes = stilt.Mesh.from_h3(7, bounds) >>> grid = hexes.to_grid(cells_per_target=4)