reVeal.grid.create_grid#

create_grid(res, xmin, ymin, xmax, ymax, crs)[source]#

Create a regularly spaced grid at the specified resolution covering the specified bounds.

Parameters:
  • res (float) – Resolution of the grid (i.e., size of each grid cell along one dimension) measured in units of the specified CRS.

  • xmin (float) – Minimum x coordinate of bounding box.

  • ymin (float) – Minimum y coordinate of bounding box.

  • xmax (float) – Maximum x coordinate of bounding box.

  • ymax (float) – Maximum y coordinate of bounding box.

  • crs (str) – Coordinate reference system (CRS) of grid_resolution and bounds. Will also be assigned to the returned GeoDataFrame.

Returns:

geopandas.GeoDataFrame – GeoDataFrame containing the resulting grid.