3 releases (breaking)
new 0.3.0 | Apr 18, 2024 |
---|---|
0.2.0 | Feb 9, 2024 |
0.1.0 | Feb 7, 2024 |
#293 in Encoding
32 downloads per month
54KB
1K
SLoC
cjseq
A program to create/process/modify CityJSONSeq files, and convert CityJSON.
Installation/compilation
To install the binaries on your system easily
- install the Rust compiler
cargo install cjseq
To compile the project (and eventually modify it)
- install the Rust compiler
git clone https://github.com/cityjson/cjseq.git
cargo build --release
(this will ensure the binaries are compiled too)./target/release/cjseq --help
Usage
cjseq
can either take its input from stdin, or from a file.
It always outputs to stdout the results (either a CityJSON object or a CityJSONSeq stream).
CityJSON => CityJSONSeq
cjseq cat -f myfile.city.json > myfile.city.jsonl
will convert the file myfile.city.json
to a CityJSONSeq stream and write it to the file myfile.city.jsonl
.
cat myfile.city.json | cjseq cat
will output the stream to stdin.
CityJSONSeq => CityJSON
cat ./data/3dbag_b2.city.jsonl | cjseq collect > 3dbag_b2.city.json
filter CityJSONSeq
cat myfile.city.jsonl | cjseq filter --bbox 85007 446179 85168 446290 > mysubset.city.jsonl
Input constraints
- the input CityJSON/Seq must be v1.1 or v2.0 (v1.0 will panic)
- the input JSON but be CityJSON schema-valid, use cjval
Dependencies
~1.8–2.7MB
~53K SLoC