Skip to main content

Module grid

Module grid 

Source
Available on crate feature encoder only.
Expand description

Grid discovery, the -180-first column roll, and regional cropping — the port of xuebuild/grid.py.

Structs§

BlockReduction
The thinning a source’s Downsample asks for, fixed to one file’s grid: every factor x factor block of the (source_height, source_width) plane becomes its maximum. Never serialized: the bundle’s grid is the thinned one. Mirrors BlockReduction in xuebuild/grid.py.
CropWindow
A rectangular window cut out of every extracted plane, indexed in the -180-first layout the column roll produces.
GridInfo

Functions§

crop_grid
Restrict a grid to the smallest whole-cell window covering bbox (west, south, east, north, degrees).
gaussian_rows
Which rows of the Gaussian grid of n a file’s are: the inverse of the iteration’s first guess, rounded, so a whole file’s are all of them and a file cut out of one starts wherever its first latitude says, its rows still consecutive. A file that is not on the grid is refused. Mirrors gaussian_rows in xuebuild/grid.py.
normalize_longitudes
Roll grids that start at Greenwich to the -180-first layout.
snap_global_longitudes
Give a global grid the exact step and origin its column count implies — the port of snap_global_longitudes in xuebuild/grid.py, which explains the rule; the two must agree to the bit.
snap_regional_steps
Give a regional grid the round step it was clearly published on — the port of snap_regional_steps in xuebuild/grid.py, which explains the rule; the two must agree to the bit.