Expand description
Normalisation: find a cheaper, equivalent mapping for what was stored.
Readers record the stored form (the “costume” in regular-in-what).
Normalisation tests whether it is really a lower rung, within a stated
tolerance, and if so adds the cheaper mapping alongside the stored one
and marks it primary. Every test returns a Report, accepted or not,
so it is always visible why a grid was labelled what it was.
Three tests are provided:
regular_axis: a 1D coordinate vector is evenly spaced (R2 to R1; GDAL’sIsRegularlySpacedandGuessGeoTransform);regular_axis_through: evenly spaced after a 1D change of frame (AVISO’s latitude vector is regular in Mercator y);regular_grid_through: 2D coordinate arrays are an affine grid after a change of frame (cryptic curvilinear to R1, the NSIDC case).
The frame change is a plain function supplied by the caller, so this crate needs no CRS backend.
Structs§
- Report
- The outcome of one normalisation test.
Enums§
- Tolerance
- How far stored coordinates may sit from the fitted mapping.
Functions§
- affine_
from_ axes - An affine transform from the primary mappings of a row dim and a col
dim, when both are R1 (
Regular1) in the same frame. - normalise_
domain - The conservative default (design doc 02, gate 2 default 3): every 1D
rectilinear mapping that is evenly spaced within
Float32tolerance gains a regular mapping, marked primary. Stored mappings are kept. - normalise_
domain_ with - As
normalise_domain, with a chosen tolerance. - regular_
axis - Test whether a 1D coordinate vector is evenly spaced.
- regular_
axis_ through - Test whether a 1D coordinate vector is evenly spaced after applying
fto every value (for example latitude to Mercator y).throughnames the framefmaps into. On success the returned positions are in that frame. - regular_
grid_ through - Test whether 2D coordinate arrays (centres, shaped
[nrow, ncol]) form an affine grid after mapping each(x, y)pair throughf.throughnames the framefmaps into.Nonefromffails the test.