facett-osm — crate card
Reverse-engineered (from source — verify, don't trust the name)
- One-line pitch: An OSM GeoParquet reader — decode
osm2geoparquet/katana-osm WKB geometry into facett map points/ways. - Does:
decode_wkbparses a WKB blob (Point/LineString/Polygon, LE/BE, ignoring Z/M/SRID) into(lon,lat)vertices; reader functions (e.g.read_points/read_ways) stream a GeoParquet'sgeometrycolumn via a parquetParquetRecordBatchReaderBuilderand handfacett_map::Ways / points toMapView. Works from either an on-diskFileor an in-memorybytes::Bytes(so the wasm demo caninclude_bytes!Sigtuna with no filesystem). - Key deps:
facett-map(Way),facett-core(Theme),arrow-array,parquet(arrow+zstd, no default features),bytes,serde_json. - Shape: lib; tiny (single lib.rs).
- Observed role in the workspace: Re-exported by umbrella
facettasfacett::osm. How facett gets real OSM data (millions of points) for the map component + its tests; used by korp's map load from osm-katana GeoParquet.
Fill in (one line each — only the human knows these)
- Primary consumer(s):
- Why it exists (vs the obvious alternative):
- Hard constraint (airgap / no-C-deps / no-FFI / pure-Rust / etc.):
- Release cadence & independence (rides a parent? own repo someday?):
- Status (production / prototype / experimental / stubbed):
- Must-NOT-change invariant:
- Biggest known gap or TODO:
- Anything a newcomer would get wrong about it:
Coverage (nornir test matrix)
The one crate on the map hot path used to emit no functional cell. tests/testmatrix.rs now drives the whole decode pipeline in memory (via the _bytes readers — the filesystem-free path the wasm demo uses, so no osm2geoparquet binary is needed) and emits, behind the no-op testmatrix feature (--features testmatrix):
facett-osm/nodes · decodes_wkb_points— N WKB Points → N(lon,lat)vertices;facett-osm/ways · classifies_area_vs_line— a water Polygon → filled area, a highway LineString → stroked line (the tag-driven split the basemap render keys on);facett-osm · headless_render— the reader produced non-blank drawable geometry (emit_render: decoded way vertices > 0 over a non-degenerate bbox), so a WKB-decode regression reddens the cell instead of silently blanking every downstream map;facett-osm/wkb · truncated_blob_does_not_panic— a clipped WKB header decodes to nothing without an out-of-bounds panic (guards the bounds-check fix0b5f0a6).