Expand description
FIEL v0 field descriptors and optional raster sample payloads.
encode_field_section writes a declaration-only payload (12-byte header,
32-byte descriptors). encode_field_section_with_rasters also appends grid
metadata (16 bytes) and little-endian f32 samples, with descriptor sample
offsets locating them inside the same payload. Both existing APIs use the
current version-zero schema; raster support is not a new format version.
decode_field_section reads declarations; decode_field_raster_samples
resolves the selected raster. Envelope, range, codec and domain validation
are separate obligations. A successful declaration read does not establish
scientific accuracy, meaningful units or authentication of sample data.
Preserve field names, unit hashes, support/representation and sample bytes.
Do not infer that a FIEL unit hash and a MID2 registry identifier are
equivalent without a qualified mapping. See the typed payload companion in
docs/manuals/standards/10d-typed-field-payloads.md for coexistence contracts.
Structs§
- Continuous
Raster Field - A continuous environmental raster layer with raw sample data for encoding.
- Field
Descriptor - A single field descriptor — one entry in the Field section’s ontology table.
- Field
Entry - A field entry to encode into the Field section.
- Field
Inspection - Field
Inspection Limits - Field
Section Header - Header for the Field section.
- Raster
Grid Metadata - Header preceding raw sample payload for a grid field descriptor.
Enums§
- Field
Inspection Error - Field
Representation Kind - Field representation — how the field is stored.
- Field
Section Error - Errors from the Field section encoder/decoder.
- Field
Support Kind - Field support — where the field is defined.
- Field
Type Kind - Field type kind — what values the field holds.
Constants§
- FIELD_
DESCRIPTOR_ SIZE - Size of one FieldDescriptor in bytes.
- FIELD_
SECTION_ HEADER_ SIZE - Size of the FieldSectionHeader in bytes (u32 + u16 + u16 + u32 = 12).
- FIELD_
SECTION_ MAGIC - Magic bytes for the Field section: “FIEL” in little-endian.
- FIELD_
SECTION_ VERSION - Current version of the Field section encoding.
- MAX_
FIELDS_ PER_ SECTION - Maximum fields per section (limited by u16 field_count).
- RASTER_
GRID_ METADATA_ SIZE
Functions§
- decode_
field_ raster_ samples - Read continuous raster grid samples corresponding to a decoded descriptor.
- decode_
field_ section - Decode a
.10dField section from bytes. - encode_
field_ section - Encode a list of field entries into a
.10dField section. - encode_
field_ section_ with_ rasters - Encode a set of continuous raster fields (including sample payloads) into a
.10dField section. - field_
section_ size - Compute the byte size needed to encode the given number of fields.
- inspect_
field_ section - Supports the existing declaration-only schema and contiguous scalar/region/
grid samples emitted by
encode_field_section_with_rasters. Declared units are retained, not authenticated. Unknown sample schemas, gaps, aliases, tails, reserved metadata, invalid enums/shape and nonfinite samples fail closed. Unaligned input follows the same LE path. No output is mutated on error.