Skip to main content

Crate hypc

Crate hypc 

Source
Expand description

hypc: HPC1 reader/writer with SMC1 and GEOT support.

Byte-level format derived from the provided reference implementation.

Layout (header): b“HPC1“ (4) version: u32 (4) = 1 flags: u32 (4) bit0 => tilekey present count: u32 (4) number of points qbits: u8 (1) must be 16 reserved: [u8; 11] (11) tilekey payload if flags bit0 set decode_min: [f32; 3] (12) decode_max: [f32; 3] (12) payload: count * 3 * (qbits/8) bytes (for qbits=16 => count*6)

Trailing chunks: “SMC1” + u32(len) + payload(v1) -> semantic mask; encoding 0(raw) or 1(zlib) “GEOT” + fixed 24 bytes (v1) -> bbox in CRS:84 with Q7 (1e-7 deg) quantization.

Unknown chunks are assumed to be “TAG + u32 length + payload” for skipping.

Structs§

GeoExtentDeg
HypcPointCloud
In-memory representation of an HPC1 point cloud.
HypcWrite
Parameters for writing an HPC1 file.
SemanticMask

Enums§

GeoCrs
Smc1Encoding
TileKey

Constants§

FLAG_TILEKEY_PRESENT

Functions§

pack_tilekey
Encode TileKey into flags+reserved field.
read
Read HPC1 + optional chunks from an arbitrary reader (must implement Seek for skipping).
read_file
Read HPC1 + optional chunks from a path.
unpack_tilekey
Decode TileKey from flags+reserved if present/recognized.
write
Write HPC1 + optional chunks to an arbitrary writer.
write_file
Write HPC1 + optional chunks to a path.

Type Aliases§

Smc1ClassEntry
Palette entry: (class_id, precedence)