stilt.config.Grid#

class stilt.config.Grid(*, xmin: float, xmax: float, ymin: float, ymax: float, xres: float, yres: float, projection: str = '+proj=longlat') → None[source]#

Footprint grid: longitude/latitude bounds, cell size, and projection.

The bounds are always longitude/latitude. With a projected projection, the grid covers the bounds’ extent in that projection and xres and yres are in its units.

Parameters#

Parameter

Description

Default

xmin

Western edge, in degrees longitude.

Required

xmax

Eastern edge, in degrees longitude.

Required

ymin

Southern edge, in degrees latitude.

Required

ymax

Northern edge, in degrees latitude.

Required

xres

Cell width in projection units (degrees for longlat, meters for UTM).

Required

yres

Cell height in projection units (degrees for longlat, meters for UTM).

Required

projection

Projection of the footprint grid, as a PROJ string. Particles and bounds are projected to it before gridding.

'+proj=longlat'

Methods#

from_geometries(geometries, **kwargs)

Return one grid that resolves several geometries.

from_geometry(geometry, *[, ...])

Return a grid fine enough to resolve the cells of a geometry.

to_xarray()

Return the grid as a CF-1.8 dataset of cell centers.