npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cityjson/cjseq

v0.4.1

Published

Create+process+modify+convert CityJSONSeq

Downloads

15

Readme

cjseq

crates.io

cjseq is a Rust libray+binary for creating, processing, and modifying CityJSONSeq files, as well as converting to/from CityJSON.

Installation

Installing the binary

  1. Install the Rust compiler
  2. Run cargo install cjseq
  3. Then a binary called cjseq is installed system-wide

Installing the library

  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 takes input from either a file or the standard input (stdin, if no file path is given as argument), and it always outputs the results to the standard output (stdout). The output can be a CityJSON object or a CityJSONSeq stream.

Convert CityJSON to CityJSONSeq

The operator "cat" converts a CityJSON file to a CityJSONSeq stream:

cjseq cat myfile.city.json > myfile.city.jsonl

Alternatively, to use stdin as input:

cat myfile.city.json | cjseq cat

Convert CityJSONSeq to CityJSON

The operator "collect" converts a CityJSONSeq stream to a CityJSON file:

cat ./data/3dbag_b2.city.jsonl | cjseq collect > 3dbag_b2.city.json
cjseq collect ./data/3dbag_b2.city.jsonl > 3dbag_b2.city.json

Notice that globbing works for the collect command:

cat ./data/*.city.jsonl | cjseq collect > hugefile.city.json

Filter CityJSONSeq

An input stream of CityJSONSeq can be filtered with the following operators:

--bbox <minx> <miny> <maxx> <maxy>
          Bounding box filter
--cotype <COTYPE>
    Keep only the CityObjects of this type
--exclude
    Excludes the selection, thus remove the selected city object(s)
--radius <x> <y> <radius>
    Circle filter: centre + radius
--random <X>
    1/X chances of a given feature being kept

As an example:

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 must be CityJSON schema-valid, use cjval to validate.

WASM bindings

cjseq can be used in JavaScript/TypeScript applications via WASM bindings.

cargo install wasm-pack

Build the WASM bindings:

wasm-pack build --release --target web --out-dir js