cjseq
is a program for creating, processing, and modifying CityJSONSeq files, as well as converting CityJSON files to it.
- Install the Rust compiler.
- Run
cargo install cjseq
.
- Install the Rust compiler.
- Clone the repository:
git clone https://github.com/cityjson/cjseq.git
- Build the project:
cargo build --release
- Run the program:
./target/release/cjseq --help
cjseq
can take input from either stdin or a file, and it always outputs the results to stdout.
The output can be a CityJSON object or a CityJSONSeq stream.
Convert a CityJSON file to a CityJSONSeq stream:
cjseq cat -f myfile.city.json > myfile.city.jsonl
Alternatively use stdin:
cat myfile.city.json | cjseq cat` will output the stream to stdin.
Convert a CityJSONSeq stream to a CityJSON file:
cat ./data/3dbag_b2.city.jsonl | cjseq collect > 3dbag_b2.city.json
cat myfile.city.jsonl | cjseq filter --bbox 85007 446179 85168 446290 > mysubset.city.jsonl
- 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 to validate.