Repository navigation
feat(data): read GRIB2's complex packing (#2428, part 3) - #2809
elpidioassinaturas wants to merge 1 commit into
Conversation
Data representation templates 5.2 and 5.3: groups of their own widths, missing values, and spatial differencing of order 1 and 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI read the diff, the base-branch AGENTS.md, and the changed source. I did not build or run the tests, since this review had no build tool. The field-layout arithmetic (octet offsets, bit reads, list padding, differencing recurrences) checks out by hand against the spec layout the code uses. I also checked the test vectors by hand, and they match the code. Prior reviews: none on this PR, so no earlier concerns were left alone. Bugs
Security
Performance
Quality
AGENTS.md
Change sizeCompared with main (merge base 1d194ab to PR head ea2d118). Six files: 1 added, 5 modified, 0 removed, 0 renamed. Size before 407.8 KB, size after 430.0 KB, change +22.2 KB. The stats file reports
|
📖 Docs previewCommit |
Summary
Part 3 of #2428, its "complex packing" item: GRIB2 fields in complex packing, without (template 5.2) and with spatial differencing (5.3, order 1 and 2), are read. NCEP's GFS and CPTEC's MERGE (Brazil's merged satellite and gauge rain) are packed so; today they open as "GRIB2 complex packing (template 5.3), not read yet".
crates/data/src/raster/grib/complex.rs(new):f32's range. The primary and the secondary missing value both become NaN.grib.rs:unpack's scaling,(R + X × 2^E) / 10^D, is moved unchanged intoscaling, shared by both packings, andfield_valuestakes a missing value.Reaches: every path the GRIB reader already has (desktop, browser upload, command line, Python,
layer.addUrlwith and without"bytes"). No new command, parameter or dependency.Left for later: JPEG 2000, PNG, CCSDS, IEEE and GRIB1's second-order packing; other grids;
bytesin the browser.Where code comes from: written from WMO's FM 92 GRIB specification. No code was copied or translated from another project.
Testing
f32(4 of them identical; GDAL unpacks inf32, this reader inf64).f32. Constant fields are identical.cargo test -p rustgis-data(1,810 unit tests and 70 integration tests pass), clippy with-D warnings,cargo fmt --check,cargo xtask test-hygieneandcargo xtask layers. The rest of the workspace and the wasm build are left to CI.UI evidence
No visible UI change.
Related issue
Part of #2428.
🤖 Generated with Claude Code
Summary by CodeRabbit