pub fn grid_cell(
lon: f64,
lat: f64,
deg: f64,
ncols: usize,
nrows: usize,
) -> (usize, usize)Expand description
The primary-grid cell containing a lon/lat position, as (row, col):
truncate toward zero, then clamp into the grid. The encoder’s
rasterizer, the runtime reader, and the measurement tools all share
this one formula, so what a lookup probes is exactly what the grid
indexed.