FlatCityBuf is a new cloud-optimised format for 3D city models based on FlatBuffers and CityJSON.

The schemas and software for conversion to/from CityJSON and to read/write FlatCityBuf are publicly available at https://github.com/cityjson/flatcitybuf under a permissive license.

A FlatCityBuf file stores CityJSON’s semantics in FlatBuffers, next to a packed Hilbert R-tree (spatial index) and static B+trees (attribute indices). A client can therefore fetch only the bytes a query needs, over plain HTTP range requests: querying a 70GB file on cloud storage takes a handful of requests and no server component at all.

Try it right now in your browser: the web viewer opens the full 3DBAG (~10.7M buildings, ~68GB) over HTTP and queries it live.

Main features
  • Fast deserialisation: 9-250× faster than existing formats
  • Zero-copy data access: Efficient memory usage without data copying
  • Compact storage: 10-30% compression compared to CityJSON
  • Memory efficient: Uses 2-6× less memory
  • Spatial and attribute indices: Enables efficient queries to retrieve partial data
  • CityGML compliance: Adheres to the established CityGML v3.0 data model
  • Partial data access: Efficient queries through spatial and attribute indexing

Implementations

FlatCityBuf has four independent reader implementations. They are validated against each other on a shared conformance corpus of .fcb files: the expected output is produced by the Rust reader, and the C++, Python and TypeScript readers must reproduce it line for line on the same bytes.

Implementation Package Reads Writes Notes
Rust fcb_core, fcb_cli (crates.io) reference implementation, zero-copy, sync + async HTTP
C++ vcpkg (custom registry) or CMake native C++17, no Rust toolchain, no TLS dependency by default
Python flatcitybuf (PyPI) pure Python, no compiled extension
TypeScript @cityjson/flatcitybuf (npm) pure TypeScript, browser + Node.js, no WebAssembly

All four decode the same things: attributes, geometry, semantics, geometry templates, appearance (materials and textures), and the extents and relationships in the header.

The full API reference for all four implementations is published at cityjson.github.io/flatcitybufRust, C++, Python and TypeScript, rebuilt on every push to main.

The pages here are a tour; each implementation’s guide (building, testing, design notes) lives in the repository — docs/rust.md, docs/cpp.md, docs/py.md, docs/ts.md.

The fcb command-line tool converts CityJSON/CityJSONSeq to .fcb and back, and inspects a file — locally or over HTTP.

Where to start

  1. Grab an example dataset, or convert your own with the CLI.
  2. Look at it: fcb inspect city.fcb — a terminal UI on a terminal, a static report when piped or with --static.
  3. Query it from Rust, C++, Python or TypeScript.
  4. Stuck on performance or indexing choices? See the FAQ and performance tips.
If you use FlatCityBuf in an academic context

Baba, Hidemichi, Ledoux, Hugo, and Peters, Ravi (2025). FlatCityBuf: A new cloud-optimised CityJSON format, Int. Arch. Photogramm. Remote Sens. Spatial Inf. Sci., XLVIII-4/W15-2025, 17–24

Baba, Hidemichi FlatCityBuf: a new cloud-optimised CityJSON format. MSc thesis in Geomatics, Delft University of Technology. 2025.


Table of contents