You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(s57): short-circuit header reads; stop full-parsing cells for bounds
S-57 headers carry no bounding box: DSID gives identity, DSPM gives the
compilation scale (→ band), but a cell's extent comes only from M_COVR
coverage features or the exchange-set CATALOG.031. Several paths were doing
far more work than that to recover metadata.
- iso8211.Parser.Next(): caller-driven, one-record-at-a-time reader so a
caller can stop after the leading records instead of slurping the file.
- s57.ReadHeader/ReadHeaderFS → CellHeader: reads only DSID/DSPM (no
features, no geometry), reusing parseDSID/parseDSPM. Cross-checked
field-for-field against a full Parse.
- cell index: was a full ParseCellBytes (geometry + R-tree) per cell just
for a bbox; now an M_COVR-only coverage parse, with a full-parse fallback
for the rare cell lacking M_COVR. Fixed the docstring that wrongly claimed
it read "each cell's header once".
- ExtractCellMeta: now takes the *s57.Catalog. When the catalogue already
supplies a cell's bbox AND the cell has no updates (so the base-cell header
identity is current), read just the header and take the catalogue bbox,
skipping the M_COVR parse. Otherwise unchanged update-applied parse — the
no-updates guard preserves correct UPDN/ISDT/edition.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments