Skip to content

Complete the attribute catalogue and the light characters - #72

Merged
beetlebugorg merged 2 commits into
mainfrom
fix/ingest-pick-report
Sep 7, 2026
Merged

Complete the attribute catalogue and the light characters#72
beetlebugorg merged 2 commits into
mainfrom
fix/ingest-pick-report

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

CATHAF, code 30, was absent from the transcribed attribute table, so a harbour facility reported its category as a bare number. It is the only feature attribute in Appendix A chapter 2 the table lacked, and a new test cross-checks every acronym against the S-57 attribute list. HUNITS was labelled "Height units". 2.135 names it "Height/length units". Stacked on #71.

litchr_abbrev holds a chart abbreviation for 16 of the 29 LITCHR codes, and the other 13 returned null, which dropped the character, the period and the range from the report of an alternating light. litchrText names those from the catalogue. A feature whose attribute blob does not parse reported "empty":"none", the same as one with no attributes, so a corrupted wreck read as a wreck recording no depth. The report says unreadable for that case.

The new test reads its CSV path through libc's getenv, and the s57 package test was the one module holding such a test without linking libc. macOS links it implicitly, so this only failed to compile for a target that does not.

zig build, zig build test and zig fmt --check pass, and zig build test -Dtarget=x86_64-linux-gnu compiles every test binary.

@beetlebugorg
beetlebugorg force-pushed the fix/ingest-pick-report branch from 7995fe4 to 02f9d12 Compare September 5, 2026 02:23
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-pick-report branch 2 times, most recently from d1b0034 to 5ad8b7f Compare September 6, 2026 20:27
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-pick-report branch from 5ad8b7f to f1782e1 Compare September 6, 2026 23:08
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-pick-report branch from f1782e1 to 892c9ef Compare September 6, 2026 23:27
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-pick-report branch from 892c9ef to 9f60836 Compare September 7, 2026 02:01
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-pick-report branch from 9f60836 to 873987a Compare September 7, 2026 02:15
Base automatically changed from fix/ingest-integrity to main September 7, 2026 02:26
CATHAF, code 30, was absent from the transcribed table, so a harbour
facility reported its category as a bare number. It is the only feature
attribute in Appendix A chapter 2 the table lacked. HUNITS was labelled
"Height units"; 2.135 names it "Height/length units" and scopes it to
heights and lengths, the case HORLEN and HORWID need.

The table had no test. A new one cross-checks every acronym against the
S-57 attribute list, which ships with the spec rather than this repo, so
it reads the path from TILE57_S57_ATTRIBUTES and skips without it.

litchr_abbrev holds a chart abbreviation for 16 of the 29 LITCHR codes,
and the other 13 returned null, which dropped the character, the period
and the range from the report of an alternating light. litchrText names
those from the catalogue instead. Appendix A 2.146 gives each code's
meaning and leaves the abbreviation to INT 1, so no new abbreviations
are invented here.

A feature whose attribute blob does not parse reported "empty":"none",
the same as one with no attributes, so a corrupted wreck read as a wreck
recording no depth. The report says "unreadable" for that case.
The catalogue cross-check reads its CSV path from the environment through
libc's getenv, as the other real-file tests here do. The s57 package test
is the only module holding such a test that does not link libc. macOS
links it implicitly, so the test built on this machine and failed to
compile for a target that does not:

  error: dependency on libc must be explicitly specified in the build
  command ... referenced by test.the transcribed table agrees with the
  S-57 attribute list

Checked with zig build test -Dtarget=x86_64-linux-gnu, which now compiles
every test binary.
@beetlebugorg
beetlebugorg force-pushed the fix/ingest-pick-report branch from 873987a to 3019bfb Compare September 7, 2026 02:26
@beetlebugorg
beetlebugorg merged commit ba78482 into main Sep 7, 2026
5 checks passed
@beetlebugorg
beetlebugorg deleted the fix/ingest-pick-report branch September 7, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant