1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! Support library for `fcb`, the FlatCityBuf command-line tool.
//!
//! The binary itself lives in `src/main.rs`; installing this crate gives you
//! `fcb`, which converts between CityJSON / CityJSONSeq and `.fcb`:
//!
//! ```text
//! fcb ser city.jsonl city.fcb # CityJSONSeq -> .fcb (-A indexes every
//! # attribute, -g writes the extent)
//! fcb deser city.fcb city.jsonl # .fcb -> CityJSONSeq
//! fcb inspect city.fcb # terminal UI, or a static header report
//! # when stdout is not a TTY (--static
//! # forces it)
//! fcb cbor city.json city.cbor # CityJSON -> CBOR (size comparison)
//! fcb bson city.json city.bson # CityJSON -> BSON (size comparison)
//! ```
//!
//! Input and output are positional. `ser` takes any number of inputs before
//! the output, so `fcb ser a.jsonl b.jsonl merged.fcb` merges as it converts.
//!
//! The modules below are `pub` so the integration tests can drive them
//! directly; they are not a stable API. All the format work happens in
//! [`fcb_core`].
//!
//! `fcb ser` is what produces the oracle files the C++, Python and TypeScript
//! readers are validated against, so its output is load-bearing for the whole
//! repository.
use Error;
use Error;
/// CLI-specific error type