cjseq

Crates.iocjseq
lib.rscjseq
version0.3.1
sourcesrc
created_at2024-02-07 11:05:31.890346
updated_at2024-06-17 09:58:47.13354
descriptionCreate/process/modify CityJSONSeq
homepagehttps://github.com/cityjson/cjseq
repositoryhttps://github.com/cityjson/cjseq
max_upload_size
id1130405
size90,364
Hugo Ledoux (hugoledoux)

documentation

README

cjseq

crates.io

cjseq is a program for creating, processing, and modifying CityJSONSeq files, as well as converting CityJSON files to it.

Installation

Installing the binaries

  1. Install the Rust compiler.
  2. Run cargo install cjseq.

Compiling the project

  1. Install the Rust compiler.
  2. Clone the repository:
    git clone https://github.com/cityjson/cjseq.git
    
  3. Build the project:
    cargo build --release
    
  4. Run the program:
    ./target/release/cjseq --help
    

Usage

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 CityJSON to CityJSONSeq

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 CityJSONSeq to CityJSON

Convert a CityJSONSeq stream to a CityJSON file:

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

  1. the input CityJSON/Seq must be v1.1 or v2.0 (v1.0 will panic).
  2. the input JSON but be CityJSON schema-valid, use cjval to validate.
Commit count: 55

cargo fmt